Print

Print


Hi Fred

I regularly compile F77 code with gfortran: I always get lots of warnings and the occasional error that I didn't get with g77 mainly because gfortran is much stricter applying the standard (and a good thing too!).  I also regularly use ifort (which isn't quite as strict as gfortran and consequently sometimes doesn't spot some real errors).

Maybe if you could post the bit of code it's complaining about (including say +=5 lines on each side) we could make some specific suggestions.  It's hard to make suggestions which will cover all eventualities.

Cheers

-- Ian


On 6 March 2013 09:48, vellieux <[log in to unmask]> 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