Hi Fred
If you look very carefully at your Fortran code you will probably
find a small error/inconsistency that g77 allowed but gfortran picked
up on or compiled "as written rather than as intended". My move from
g77 to gfortran when building Mosflm (which is moderately large) was
pretty painless, but I did find that when I got errors of this type
the fault was when the code did not adhere to standards.
Generally speaking, gfortran adheres to the current Fortran standards
more strictly than g77. Recent versions give Mosflm executables that
are within a few percent of the performance that I get with the Intel
Fortran ifort compilers (actually, sometimes faster, sometimes
slower)- I've checked this on both Mac and Linux.
I use gfortran for development, ifort for checking things are still
okay, and also run an old Linux box with g77 for further checking in
case I've missed something earlier. My Windows executable of Mosflm
still uses g77 (the mingw cross-compiler run on OSX).
However, there are persistent reports out there of people who find
their code runs much faster when compiled with ifort - so I guess
this is very much code dependent.
I can have a look at your code if it would help.
HTH
On 6 Mar 2013, at Wed6 Mar 09:48, vellieux wrote:
Hello,
For those who still know the Fortran language and its Fortran 77
variant, I used to have a g77 compiler here (Linux box), and now on
the new box it's no longer g77 but gfortran.
When compiling Fortran77 code (these are the flags used for
compilation: -o ../bin/$1 -std=legacy -Wno-globals -w -O3 -malign-
double -funroll-loops -ffast-math -fno-second-underscore $1.f ,
followed by the libraries on that same compile line)
I get errors (at run time) of the type:
At line 138 of file program.f (unit = 6, file = 'stdout')
Fortran runtime error: Missing initial left parenthesis in format
When looking at this code (which compiled perfectly well using g77
- I removed the flag "-fno-globals" which doesn't seem to exist any
more in gfortran) the Fortran code that I see appears to have all
parentheses in the correct places.
Any idea of what must be done with existing Fortran 77 code in
order to get it to compile and run with gfortran ? Otherwise any
idea which compiler should be used to compile Fortran 77 code ?
Thanks in advance,
Fred.
--
Fred. Vellieux (B.Sc., Ph.D., hdr)
ouvrier de la recherche
IBS / ELMA
41 rue Jules Horowitz
F-38027 Grenoble Cedex 01
Tel: +33 438789605
Fax: +33 438785494
Harry
--
Dr Harry Powell, MRC Laboratory of Molecular Biology, MRC Centre,
Hills Road, Cambridge, CB2 0QH
Chairman of European Crystallographic Association SIG9
(Crystallographic Computing)