Re: [AMBER-Developers] MPI_HOME

From: Jason Swails <>
Date: Wed, 2 Mar 2011 08:09:15 -0500


I had looked into this before, and my conclusion was that MPI_HOME is not
really necessary as long as cpp is not responsible for locating and
inserting mpif.h. For Fortran files that have the PP directive

#include "mpif.h"

instead of just

include "mpif.h"

lack of MPI_HOME proves fatal to the build process. I don't think that
actually exists anymore, though, as Professor Case went through and changed
all #include "mpif.h" to include "mpif.h".

However, I still think it's useful to have the defined MPI_HOME. I think
what we should actually do is define the MPI compilers as
$(MPI_HOME)/bin/mpif90, mpicc, mpiCC, etc.

A number of systems have multiple MPIs installed (especially Macs, whose
Developer package comes pre-installed with a Fortran-disabled version that
cannot work for Amber), and this is an effective way of avoiding the need to
define PATH in a special order.

Outside of this, however, I don't really see any need for MPI_HOME to be

All the best,

On Wed, Mar 2, 2011 at 2:41 AM, Scott Brozell <>wrote:

> Hi,
> On Mon, Feb 28, 2011 at 12:17:28PM -0500, Tyler Luchko wrote:
> > Is the MPI_HOME environment variable necessary in the configure script?
> It appears that it is only used to add a directory to the include path.
> However, MPI compilers should know where the MPI headers are. Setting
> MPI_HOME=. works for me though I have not tried building CUDA PMEMD nor
> compiling on a Cray XT5.
> >
> It is also used in pmemd_cu_includes.
> Note that MPI_HOME=. is not a good test since some mpif90, etc's,
> make symbolic links to the current directory:
> $ ~/amber/qa/amber mpif90 -show
> ln -s /usr/local/mpi/mvapich-1.1-fixes-pgi/include/mpif.h mpif.h
> pgf90 -noswitcherror -fPIC -L/usr/lib64 -Wl,-rpath-link
> -Wl,/usr/local/mpi/mvapich-1.1-fixes-pgi/lib/shared
> -L/usr/local/mpi/mvapich-1.1-fixes-pgi/lib/shared
> -L/usr/local/mpi/mvapich-1.1-fixes-pgi/lib -lmpichf90nc -lmpichfarg -lmpich
> -L/usr/lib64 -Wl,-rpath=/usr/lib64 -libverbs -libumad -lpthread -lpthread
> -lrt
> rm -f mpif.h
> I'm attempting more testing, but it would be nice to hear from the
> pmemd cuda people.
> scott
> _______________________________________________
> AMBER-Developers mailing list

Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
AMBER-Developers mailing list
Received on Wed Mar 02 2011 - 05:30:05 PST
Custom Search