Compiling Initial in linux with Ifort 8.0

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
michelesimioli

Compiling Initial in linux with Ifort 8.0

#1 Unread post by michelesimioli »

Some code in the source dir for the "initial" program does not compile straight away if you use the Intel ifort (8.0) compiler on a Linux (Red Hat, Gentoo and Knoppix) platform. Here are the workarounds which I found in my case:

Program get_date.F line 111: undefined type for variable 'mon'
Solution: put the cpp directive
#define sun
at line 2

Program def_out.F problem 1: line 29 : Mv has already been defined
This is because by default Ifort folds everything to uppercase, and if you use the compilation flag -as_is then you lose all the inbuilt functions
Solution: substitute MMv for Mv in all the occurrences in the file (twice)

Program def_out.F problem 2: lines 161, 165, 169, 174: mixing types in assignment for variable Vname
Solution: cast RHS to integer with the function lenstr(), e.g. in line 161
lsdim=lenstr(Vname(6,idFsur))

Program get_ncfields.F: line 35 -- same as problem 1 above (4 occurrences)
Program get_ncfields.F: lines 193, 199, 205, 211, 217, 223, 286, 298 -- same as problem 2 above

Happy coding

Post Reply