I can't seem to get ROMS3 to compile with gfortran and MPICH2. I have no trouble compiling the serial version. I have compiled (and recompiled) the MPICH2 package with gfortran (with no apparent problems) but when I attempt to compile ROMS I consistently get:
cd Build; gfortran -c -frepack-arrays -O3 -ffast-math -ffree-form 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: *** [Build/mod_parallel.o] Error 1
any suggestions? thanks, David
ROMS3 with gfortran and MPICH2
-
- Posts: 6
- Joined: Wed Jun 25, 2003 5:46 pm
- Location: Univ. of Washington - School of Oceanography
ROMS3 with gfortran and MPICH2
That's the bizarre thing. It is. I should have mentioned this. I had no problem, by the way, of getting the PGI version of this to compile with MPICH2.jcwarner wrote:check your environment and see if the location of mpif.h is in your INCLUDE list.
David
I actually use gfortran and MPICH2 to get roms3 working...
My netcdf library path and MPICH2 installation path are in directories under my home one, so i must do some changes in the "Compilers/Linux-gfortran.mk" file...
Here is the output of the diff Linux-gfortran.mk Linux-gfortran.mk.original command:
As you can see, i installed the netcdf library under the "/home/roms/ROMS/lib/netcdf_gfortran/" directory, and the MPICH2 stuff under the "home/roms/ROMS/lib/mpich2-gfortran/" one...
With this changes it works for me....
Regards
My netcdf library path and MPICH2 installation path are in directories under my home one, so i must do some changes in the "Compilers/Linux-gfortran.mk" file...
Here is the output of the diff Linux-gfortran.mk Linux-gfortran.mk.original command:
Code: Select all
51,52c51,52
< NETCDF_INCDIR ?= /home/roms/ROMS/lib/netcdf_gfortran/include
< NETCDF_LIBDIR ?= /home/roms/ROMS/lib/netcdf_gfortran/lib
---
> NETCDF_INCDIR ?= /usr/local/include
> NETCDF_LIBDIR ?= /usr/local/lib
67c67
< FC := /home/roms/ROMS/lib/mpich2-gfortran/bin/mpif90
---
> FC := mpif90
With this changes it works for me....
Regards