Re: [AMBER-Developers] Ubuntu and MPI home directory

From: Jason Swails <jason.swails.gmail.com>
Date: Fri, 9 Mar 2012 11:11:58 -0500

On Fri, Mar 9, 2012 at 10:32 AM, Scott Le Grand <varelse2005.gmail.com>wrote:

> I just finished helping a guy get AMBER compiling on a Ubuntu 11.10
> system. In the process I learned that the configure script:
>
> 1) Sets the location of mpi.h to $MPI_HOME/include where MPI_HOME is either
> defined or determined from the directory containing mpif90.
>

This was my doing. It used to be that setting MPI_HOME explicitly was
required, but when we moved over to using the MPI compiler wrappers, this
became unnecessary, since the wrappers handled providing the required
include and lib paths. pmemd.cuda, however, introduced an MPI-dependency
in a file compiled with nvcc for which no MPI compiler wrapper existed,
which sparked the need in the first place.

If we assume that any MPI is installed using --prefix, then I figured the
above approach should be general (it also has the added benefit of checking
that the MPI has Fortran built into it).


>
> This does not work on Ubuntu if MPI has been installed through the OS:
>
> Amazon Linux:
> which mpif90
> /usr/lib64/openmpi/bin/mpif90


> which works
>
> Ubuntu with explicitly installed MPI (my work system):
> which mpif90
> /usr/local/bin/mpif90
>
> also works
>
> Ubuntu:
> which mpif90
> /usr/bin/mpif90
>
> which obviously doesn't work...
>

Why doesn't this work? Is there something wrong with having -I/usr/include
on the compile line? I'll try to reproduce this behavior when I get a
chance.


> 2) Linking order matters.
>
> On this machine:
>
> ./cuda/cuda.a -lcurand -lcufft -lcudart
>
> works
>
> -lcurand -lcufft -lcudart ./cuda/cuda.a
>
> does not work.
>
> I'm happy to change configure to reflect #2 as that seems harmless. But
> I'm awfully leery about addressing #1 as that seems fraught with peril.
>

What compiler are you using here? I have never seen an issue building
pmemd.cuda, so I'm a little puzzled here.

All the best,
Jason

-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Mar 09 2012 - 08:30:05 PST
Custom Search