[MITgcm-support] problems with MPI
Constantinos Evangelinos
ce107 at ocean.mit.edu
Fri Sep 15 10:22:19 EDT 2006
On Fri 15 Sep 2006 08:07, Martin Losch wrote:
> As I said before, I am no specialist, but maybe it helps to specify
> the libraries in the LIBS variable, too (o: (e.g., -lmpi, or whatever
> is required for your mpi installation). There are a few examples in
> tools/build_options. You can also try to use mpif77 for LINK and FC
> and mpicc for CC or something like that if that scripts is part of
> your mpi installation (it usually is).
Yes it does. I've modified the optfile so that it should work. There is no
real reason to add the Intel compiler include and library path manually in
the optfile - the compiler driver includes them transparently.
#!/bin/bash
CPP='/lib/cpp -traditional -P'
DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=1'
LIBS='-L/home/nstashchuk/mpich2-install/lib -lmpi'
FC=/opt/intel/fce/9.1.036/bin/ifort
INCLUDES='-I/home/nstashchuk/mpich2-install/include'
INCLUDEDIRS='/home/nstashchuk/mpich2-install/include'
FFLAGS='-extend_source -fno-alias -fno-fnalias -convert big_endian'
FOPTIM='-O2 -xP -ip'
LD='/opt/intel/fce/9.1.036/bin/ifort -static'
Now I assume that MPICH2 was compiled with the same compiler (otherwise you're
bound to have other problems with the name mangling of the Fortran routines).
In that case it is a better approach to use the MPI compiler drivers - you
still need to provide the MPI include path but nothing else:
#!/bin/bash
CPP='/lib/cpp -traditional -P'
DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=1'
LIBS=''
FC='/home/nstashchuk/mpich2-install/bin/mpif77'
INCLUDES='-I/home/nstashchuk/mpich2-install/include'
INCLUDEDIRS='/home/nstashchuk/mpich2-install/include'
FFLAGS='-extend_source -fno-alias -fno-fnalias -convert big_endian'
FOPTIM='-O2 -xP -ip'
LD='/home/nstashchuk/mpich2-install/bin/mpif77 -static'
Constantinos
--
Dr. Constantinos Evangelinos
Department of Earth, Atmospheric and Planetary Sciences
Massachusetts Institute of Technology
More information about the MITgcm-support
mailing list