comments on getting the most out of multi-core machines
my 'day job' is a medium sized software operation. we have between 5 and 50 programmers assigned to a given project; and a project is usually a couple of thousand source files (mix of f77,c,c++, ada). all this source get's stuck in between 50 and 100 libraries, and the end result is less than a dozen executables...one of which is much larger than the rest. it is a rare single file that takes more than 30 seconds to compile (at least with gcc3 and higher). linking the largest executable takes about 3 minutes. (sorry to be so long-winded getting to the topic!!) ordinary case is i change a file and re-link. takes less than 3.5 minutes. even if gcc was infinitely fast, it would still be 3 minutes. the other case is compiling everything from scratch (which is done regularly). Using a tool like SCons which can build a total dependency graph, i have learned that roughly j100 would be ideal. of course i am stuck with -j4 today. given enough cores to throw the work on, best case is still 3.5 minutes. (of course, this is a simplified analysis) my point in all of this is that effort at the higher policy levels (by making the build process mult-threaded at the file level) pays off today and for the near future. changing gcc to utilize multi-core systems may be a lot harder and less beneficial than moving up the problem space a notch or two. regards, bud davis
g77 and PR21931
hi, if this bug get's fixed, will there be an upcoming release of gcc3.4 that could include it ? http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21931 it will be some work to figure it out, fix it, and make sure everyone is happy. i don't want to make that investment if it will not get out to the world at large; my personal situation is content with maintaining a local copy of g77 with the offending patche(s) reverted. my plan would be to contact all those who have expressed interest in this compiler option and make sure that all needs are addressed (if possible). --bud davis
RE: V/S to GCC/G77 fortran conversion
->We have several fortran programs developed under MS' Visual Studio and ->would like to convert them to be GCC/G77 compatible. ->Short of converting the programs manaully, is anyone aware of a conversion ->package capable of doing the conversion automagically? if you are willing to move to the 3.X version of gcc, there is an excellent fortran compiler (g77) with many, many compiler options and features to run fortran-77 code from other compilers. with gcc-4.X, gfortran is available. gfortran is not as lenient about non-standard code, but has the advantage of supporting the modern language features. IMHO, f2c is a poor replacement for g77; i would use g77 in almost every situation dealing with old code. As far as hand modifying the code, it is in most cases very small syntactic differences that can be accomplished with a perl script or even spending a few minutes of time in the editor for each file. Although many will disagree, fortran code is very portable between dialects; once the compiler eats the code the results are usually as expected. HTH, bud davis
Re: Equivalence problem with g77
g77 does not allow you to define an equivalence after DATA statements. here is a reduced example: INTEGER*4DEBUGidx PARAMETER (DEBUGidx = 1) INTEGER*4MAPelements PARAMETER (MAPelements = 262) INTEGER*4MAPlevel(0:MAPelements-1) DATA MAPlevel ( 0) / 5/ EQUIVALENCE (DEBUGlevel, MAPlevel(DEBUGidx)) END Move the DATA statements after the equivalence and it will compile. g77 is no longer supported. the replacement fortran compiler, gfortran, compiles your example code without error. upgrading to gfortran might be an option. gfortran is available with versions of gcc > 4.0, with the caveat that 4.0 is beta and 4.2 is very usable. since g77 is no longer in active development; you have a couple of options: first, if you are willing to maintain your own version of g77, you can change g77 to work the way you want. source is available in many places. second, and probably simpler, is to write a script which pre-processes the include files to get things in the correct order. from your example, the logic would be very simple...copy from input to output all statements except DATA, save all the DATA in a list and write them after the input file is completely read. HTH, Bud Davis