PDA

View Full Version : Compiling legacy Fortran code


nikhill
04-10-2009, 04:06 AM
Hello,

I am trying to compile a legacy nuclear physics code on a gfortran compiler. The file compiles properly on pathscale compiler. The compiler flags on pathscale are:

'mpif90 -static-data -O3 -i8 '

While on gfortran, I use:
'mpif90 -O3', and get the following error:

fortcom: Warning: m2v9_r10.f, line 6246: With Default Integer KIND = 4, arguments' data types are incompatible with intrinsic. [MAX0]
JNEW=MAX0(J1,I(J))

There are hundreds of these and the compilation aborts, so I have no clue what to do? I am newbie to fortran so am pretty lost.

Can someone please help me with this ? Thanks.

Nikhil

tzeis
04-12-2009, 08:13 PM
I believe the PathScale "-i8" option is setting the default integer size to 8 bytes. Try running gfortran with the "--help" option and see if there is a similar option for promoting the default integer size.