Re: [AMBER] cuda parallel - can't find mpi.h

From: Jonathan Gough <jonathan.d.gough.gmail.com>
Date: Fri, 1 Jun 2012 12:40:54 -0400

You guys rock!!! This is all very helpful info!!

At present I only have a single gpu. I thought that the parallel version
was needed for multiple cpu's (instead of one) with one or more gpu's.

The mpich info is also helpful. I will certainly give that a go.

.ross I did actually build a centos 6 box between wed and thurs and did the
amber/nvidia install. It helped me confirm that the tesla card was d-e-a-d
(diff motherboard and os). BUT: I will say that I found it harder to get
it up and running than I did the ubuntu box. ubuntu has a number of things
that just work, which I didn't realize until i installed centos. That being
said, they both obviously have their issues. my ghetto beowulf cluster
runs on centos (rocks) so I will eventually have it up and running on
both... again. for now, this is good enough to work through the tutorials!

Thanks again gents!

JOnathan

On Fri, Jun 1, 2012 at 12:19 PM, Ross Walker <ross.rosswalker.co.uk> wrote:

> AAARRRGHHHH!!! This is why "I hate Ubuntu"(tm). Ubuntu installs the mpi
> libraries, binaries and header files in non-standard paths, separate from
> the way everyone else does it. Granted the GPU installation of AMBER has to
> rely on several assumption for parallel builds, as there is not an MPI
> wrapper for the NVCC compiler but it is so much simpler on other versions
> of
> Linux.
>
> Essentially the problem is that Ubuntu places it's package installed
> OpenMPI
> in:
>
> /usr/bin/openmpi...
>
>
> /usr/include/openmpi...
>
> Or something similar. This means there is no way to have $MPI_HOME that can
> be automated to point to the binaries and the include files. You have two
> options. The first is to locate mpi.h which will be in
> /usr/include/openmpi... or something similar - I don't have an Ubuntu
> machine at hand right now so I can't find the exact path. However, once you
> have this edit the AMBER config.h file and change the -I/usr/include in
> PMEMD_CU_INCLUDES to -I/usr/include/the_path_to_mpi.h
>
> Then make again and it should work. The second option is to ditch OpenMPI
> altogether since the performance sucks and instead switch to using mpich2.
> You can either build this yourself from source obtained from the mpich2
> site
> or I think you can do the following on Ubuntu.
>
> sudo apt-get remove openmpi-bin libopenmpi-dev
> sudo apt-get install libmpich2-dev mpich2
>
> This 'should' I hope put things in a more consistent path. I.e. where
> $MPI_HOME/bin and $MPI_HOME/lib and $MPI_HOME/include all point to valid
> paths.
>
> On the other hand do you have multiple 'identical' GPUs in your machine? -
> If not then there is nothing to be gained by building the parallel version
> of pmemd.cuda.
>
> All the best
> Ross
>
> > -----Original Message-----
> > From: Jonathan Gough [mailto:jonathan.d.gough.gmail.com]
> > Sent: Friday, June 01, 2012 8:45 AM
> > To: AMBER Mailing List
> > Subject: [AMBER] cuda parallel - can't find mpi.h
> >
> > I did search for this answer, but it was not there exactly. What was
> > there
> > i tried and it didn't work.
> >
> > ubuntu 12.04
> > amber 12
> > openmpi
> >
> > in .bashrc
> > export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
> > export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
> > export AMBERHOME=/home/jonathan/amber12
> > export PATH=$PATH:/usr/local/cuda/bin
> > export CUDA_HOME=/usr/local/cuda
> > export PATH=$PATH:/$CUDA_HOME/bin
> >
> >
> > serial compile and test worked/passed
> >
> > parallel compile and test worked/passed
> >
> > cuda compile and test worked/passed (finally - thanks Ross, David case,
> > Jason and others)
> > (this uses the 'dac' method of editing of the config.h file moving
> > ./cuda/cuda.a infront of the flags post configure, pre install)
> >
> > finally while trying to compile the paralllel cuda version, I get the
> > following error.
> >
> > make[3]: Entering directory `/home/jonathan/amber12/src/pmemd/src'
> > make -C ./cuda
> > make[4]: Entering directory `/home/jonathan/amber12/src/pmemd/src/cuda'
> > /usr/local/cuda/bin/nvcc -use_fast_math -O3 -gencode
> > arch=compute_13,code=sm_13 -gencode arch=compute_20,code=sm_20 -DCUDA -
> > DMPI
> > -DMPICH_IGNORE_CXX_SEEK -I/usr/local/cuda/include -IB40C
> > -IB40C/KernelCommon -I/usr/include -c kForcesUpdate.cu
> > In file included from gpu.h:15:0,
> > from kForcesUpdate.cu:14:
> > gputypes.h:30:17: fatal error: mpi.h: No such file or directory
> > compilation terminated.
> > make[4]: *** [kForcesUpdate.o] Error 1
> > make[4]: Leaving directory `/home/jonathan/amber12/src/pmemd/src/cuda'
> > make[3]: *** [cuda/cuda.a] Error 2
> > make[3]: Leaving directory `/home/jonathan/amber12/src/pmemd/src'
> > make[2]: *** [cuda_parallel] Error 2
> >
> >
> > Here are the path's that are in place using whereis
> >
> > mpi: /usr/include/mpi
> >
> > openmpi: /etc/openmpi /usr/lib/openmpi /usr/include/openmpi
> > /usr/share/openmpi
> >
> > mpif90: /usr/bin/mpif90.openmpi /usr/bin/mpif90
> > /usr/bin/X11/mpif90.openmpi
> > /usr/bin/X11/mpif90 /usr/share/man/man1/mpif90.1.gz
> >
> > the one it can't find is at:
> > /usr/include/mpi/mpi.h
> >
> > Previously it was suggested to add MPI_HOME. to the path /usr and I did
> > try
> > that. no dice.
> >
> > (export MPI_HOME=/usr)
> >
> > -- also tried
> >
> > (export PATH=$PATH:/$MPI_HOME/usr/bin/mpif90)
> >
> > no dice
> >
> > tried it without the mentioned edit in the config.h file, no dice
> > I did a full clean and recompiled parallel successfully and it passed
> > all
> > tests.
> > parallel cuda compile (after that) still gives the same error.
> >
> > jason mentioned adding the path to the nvcc flags, which I understand
> > in
> > theory, but I'm not sure exactly of how the syntax is supposed to look.
> > (if
> > someone could show me that would be great =))
> >
> > any insight on fixing this would be appreciated!
> >
> > Thanks,
> > Jonathan
> > _______________________________________________
> > 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
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Jun 01 2012 - 10:00:03 PDT
Custom Search