Hello,
This is strange, since mpif90 makes a soft link to mpif.h in the local
directory. This suggests that neither the local directory nor
/usr/mpi/gcc/mvapich-1.1.0/include are in the searched include path (I'm
guessing LD_INCLUDE_PATH, since the libraries are searched in
LD_LIBRARY_PATH).
I see two options to fix this (though you may want to talk to your system
admin as to why the linker can't find the mpif.h header file in the local
directory). #1: use the following command before you begin to compile
export LD_INCLUDE_PATH=/usr/mpi/gcc/mvapich-1.1.0/include\:$LD_INCLUDE_PATH
Or, #2: change MPI_INCLUDE back to its default value in config.h. namely:
MPI_INCLUDE = -I$(MPI_HOME)/include
Something worth trying may also be to just add the present directory to
LD_INCLUDE_PATH (which may be a good permanent solution considering what
mpif90 is trying to do, though more experienced users may have advice
against this):
export LD_LIBRARY_PATH=.\:$LD_INCLUDE_PATH
I think that any of the above 3 solutions should be sufficient to resolve
that error (though of course I have no way of knowing if there will be other
errors after this one).
If this doesn't work, check the directory /usr/mpi/gcc/mvapich-1.1.0/include
. Is there a file called mpif.h in there? If not, that is definitely your
problem. Considering how easy this check is, that is probably worth doing
first. If it exists in that directory, then any of the above should fix
it. If it's not, try googling the issue to see what comes up (the MPI may
need to be reinstalled?) I just checked mvapich, mvapich2, mpich2, and
openmpi installations on machines I have access to, and every single one has
mpif.h in the $MPI_HOME/include directories (as I would expect them to), so
it should be there.
Good luck!
Jason
On Tue, May 11, 2010 at 9:38 PM, Senthil Natesan <sen.natesan.yahoo.com>wrote:
> Thanks Jason. I compiled Amber10 just few months back and applied all
> bugfixes that time. (I tried again today and it skipped all patches).
> ***********************************
> # mpif90 -show
> ln -s /usr/mpi/gcc/mvapich-1.1.0/include/mpif.h mpif.h
> gfortran -fPIC -fPIC -L/usr/lib64 -Wall -Wl,-rpath-link
> -Wl,/usr/mpi/gcc/mvapich-1.1.0/lib/shared
> -L/usr/mpi/gcc/mvapich-1.1.0/lib/shared -L/usr/mpi/gcc/mvapich-1.1.0/lib
> -lmpichf90nc -lmpichfarg -lmpich -L/usr/lib64 -libverbs -libumad -libcommon
> -lpthread -Wall -lpthread -lrt
> rm -f mpif.h
> ************************************
> so it is picking up the right compiler. Good news is that we narrowed down
> to just one error now.
> **************************************
> [tripos.craycx1 pmemd]$ make install
> cd src && make install
> make[1]: Entering directory
> `/home/tripos/amber10_install/amber10/src/pmemd/src'
> /lib/cpp -traditional -P -DPUBFFT -DMPI -DDIRFRC_EFS -DDIRFRC_COMTRANS
> -DDIRFRC_NOVEC -DFFTLOADBAL_2PROC gbl_constants.fpp gbl_constants.f90
> mpif90 -c -O3 gbl_constants.f90
> /lib/cpp -traditional -P -DPUBFFT -DMPI -DDIRFRC_EFS -DDIRFRC_COMTRANS
> -DDIRFRC_NOVEC -DFFTLOADBAL_2PROC gbl_datatypes.fpp gbl_datatypes.f90
> mpif90 -c -O3 gbl_datatypes.f90
> /lib/cpp -traditional -P -DPUBFFT -DMPI -DDIRFRC_EFS -DDIRFRC_COMTRANS
> -DDIRFRC_NOVEC -DFFTLOADBAL_2PROC state_info.fpp state_info.f90
> mpif90 -c -O3 state_info.f90
> /lib/cpp -traditional -P -DPUBFFT -DMPI -DDIRFRC_EFS -DDIRFRC_COMTRANS
> -DDIRFRC_NOVEC -DFFTLOADBAL_2PROC file_io_dat.fpp file_io_dat.f90
> mpif90 -c -O3 file_io_dat.f90
> /lib/cpp -traditional -P -DPUBFFT -DMPI -DDIRFRC_EFS -DDIRFRC_COMTRANS
> -DDIRFRC_NOVEC -DFFTLOADBAL_2PROC pmemd_lib.fpp pmemd_lib.f90
> pmemd_lib.fpp:40: error: mpif.h: No such file or directory
> make[1]: *** [pmemd_lib.o] Error 1
> make[1]: Leaving directory
> `/home/tripos/amber10_install/amber10/src/pmemd/src'
> make: *** [install] Error 2
> **************************************************
>
> $MPI_HOME/bin is very much in the path(please see the out put for mpif90
> -show above).
> any suggestions?
>
> thanks in advance..
>
> Senthil
>
>
>
>
>
>
> Hello,
>
> First thing to always check:
>
> all bugfixes have been downloaded and applied. Then try recompiling (but
> make clean before every fresh try!). If these don't work, see my advice
> below:
>
> I would probably opt for using the compiler wrappers (as long as you know
> they've been properly installed with your MPI). Doing this, you can get
> rid
> of everything in front of MPI_INCLUDE and MPI_LIBS (since mpif90 will take
> care of that for you).
>
> Then, change F90 = gfortran to F90 = mpif90 and LOAD = gfortran to LOAD =
> mpif90 . See the comments below for clarification:
>
> On Tue, May 11, 2010 at 6:13 PM, Senthil Natesan <sen.natesan.yahoo.com
> >wrote:
>
> > Dear Amber Users,
> >
> > I am installing PMEMD (Amber 10) on RHEL 5.3 (x86_64) using gfortran and
> > mvapichand got some errors. I am displaying my config.h file here and
> > please see the attachment for error output.
> >
> > config.h:
> > -----------------------------
> > MATH_DEFINES =
> > MATH_LIBS =
> > FFT_DEFINES = -DPUBFFT
> > FFT_INCLUDE =
> > FFT_LIBS =
> > NETCDF_HOME =
> > NETCDF_DEFINES =
> > NETCDF_MOD =
> > NETCDF_LIBS =
> > MPI_HOME = /usr/mpi/gcc/mvapich-1.1.0
> > MPI_LIBDIR2 = /usr/mpi/gcc/mvapich-1.1.0/lib/shared
> > MPI_DEFINES = -DMPI
> > MPI_INCLUDE = -I$(MPI_HOME)/include
> >
>
> change to
>
> MPI_INCLUDE =
>
>
> > MPI_LIBDIR = $(MPI_HOME)/lib
> > MPI_LIBS = -L$(MPI_LIBDIR) -lmpich -L$(MPI_LIBDIR2) -lmtl_common -lvapi
> > -lmosal -lmpga -lpthread
> >
>
> change to
>
> MPI_LIBS =
>
>
> > DIRFRC_DEFINES = -DDIRFRC_EFS -DDIRFRC_COMTRANS -DDIRFRC_NOVEC
> > CPP = /lib/cpp
> > CPPFLAGS = -traditional -P
> > F90_DEFINES = -DFFTLOADBAL_2PROC
> >
> > F90 = gfortran
> >
>
> change to
>
> F90 = mpif90
>
>
> > MODULE_SUFFIX = mod
> > F90FLAGS = -c
> > F90_OPT_DBG = -g -ftrace=full
> > F90_OPT_LO = -O0
> > F90_OPT_MED = -O2
> > F90_OPT_HI = -O3
> > F90_OPT_DFLT = $(F90_OPT_HI)
> > CC = gcc
> > CFLAGS =
> >
> > LOAD = gfortran
> >
>
> change to
>
> LOAD = mpif90
>
>
> > LOADFLAGS =
> > LOADLIBS =
> > -------------------------------------------------
> >
> > Any suggestions would be very helpful. Thanks,
> >
> > Senthil Natesan
> >
>
> However, a simple check to make sure that mpif90 is invoking the correct
> compiler is:
>
> mpif90 -show
>
> This should show you the include directories and library directories that
> it's providing as well as the specific libraries it's using.
>
> Hope this helps,
> Jason
>
> --
> Jason M. Swails
> Quantum Theory Project,
> University of Florida
> Ph.D. Graduate Student
> 352-392-4032
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
>
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
--
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue May 11 2010 - 20:30:03 PDT