Error of compling ROMS 3.0 with G95 and MPI

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Error of compling ROMS 3.0 with G95 and MPI

#1 Unread post by yang »

When i use G95 and MPICH2-1.0.7 to compile ROMS, i get the following error.
cd /root/roms/Projects/Upwelling/Build; g95 -c -fno-second-underscore -O2 -ffast-math -ffree-form mod_strings.f90
cd /root/roms/Projects/Upwelling/Build; g95 -c -fno-second-underscore -O2 -ffast-math mod_parallel.f90
Error: Can't open included file 'mpif.h'
In file mod_parallel.f90:76

integer, parameter :: MP_FLOAT = MPI_DOUBLE_PRECISION
1
Error: Symbol 'mpi_double_precision' at (1) has no IMPLICIT type
make: *** [/root/roms/Projects/Upwelling/Build/mod_parallel.o]

My installed MPI is ok, and the example with MPI can be run successfully. Does anybody else who run the ROMS with G95 and MPICH2 successfully, tell me why ?

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#2 Unread post by kate »

Did you set USE_MPIF90 to on? Mpich comes with a shell script that should be used for compiling, so the compile lines should have mpif90 instead of g95. The script knows the location of your mpif.h file.

yang
Posts: 56
Joined: Mon Sep 25, 2006 2:37 pm
Location: Institue of oceanology ,Chinese acedemy of scinece

Thanks

#3 Unread post by yang »

Thank you very much.Kate
I installed Intel complier and set USE_MPI= , USE_MPI90=on and FORT=ifort, then the script woks.
if i set USE_MPI=on , USE_MPI90=on and FORT=ifort, then the script will don't work.
Last edited by yang on Mon May 19, 2008 3:18 pm, edited 1 time in total.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#4 Unread post by kate »

If you don't have USE_MPI set to on, then USE_MPIF90 is not going to do anything either way. You are saying you can compile the serial code but not the parallel code? What goes wrong with USE_MPI=on , USE_MPI90=on and FORT=ifort? If it's the same error as above, then you need to reinstall MPICH for the ifort.

Post Reply