Cannot compile latest version of LAMMPS with GPU package

Dear All,

Hi, I was able to compile LAMMPS Sept 2010 version with GPU package;
however when I downloaded the latest version of LAMMPS today
(31March2011), I was not able to compile the package. I can compile
the new version if I didn't include the GPU package.

I was able to build the gpu library and can do ./nvc_get_devices. The
output is as follows:

Dear All,

Hi, I was able to compile LAMMPS Sept 2010 version with GPU package;
however when I downloaded the latest version of LAMMPS today
(31March2011), I was not able to compile the package. I can compile
the new version if I didn't include the GPU package.

[...]

=============================================================================

What could be wrong? Any comments/help is very much appreciated.

you are not providing any error messages.
do we have to guess what error happened?

my wild guess is that you are missing -lcuda
since the latest GPU code accesses the driver
interface directly in several places and this
is not covered by linking to the runtime
library (-lcudart) alone.

but this is just a guess...

axel.

The errors are too many so I am attaching a file. -lcuda doesn't work.

out (283 KB)

The errors are too many so I am attaching a file. -lcuda doesn't work.

the error message all point to MPI.

you have to make sure that lib/gpu
and lammps itself are compiled and linked
consistently across the same MPI library.

it looks like you are comping lammps with the stubs library,
but lib/gpu with OpenMPI.

that cannot work.

axel.

Ok, the gpu lib was complied using Makefile.linux which uses mpic++.
So when I compiled Makefile.openmpi, first I got an error then I added
-lcuda in gpu_SYSLIB and then that worked.

But I just want to run serially and with fftw and the STUBS directory
makes that possible. So my question is how do I change the Makefile in
/lib/gpu so that it points to STUBS ? The Makefile.Linux in /lib.gpu
has references to GERYON which is not present in the 5Sep2010 version.

By the way, the Makefile.serial that comes with download points to
STUBS also and has the same error as with my custom Makefile. I
suggest a Makefile.serial be included also in /lib/gpu and the
Makefiles that comes with the download should include -lcuda such
that:

" gpu_SYSLIB = -lcuart - lcuda "

Thanks for the Axel.

Ok, the gpu lib was complied using Makefile.linux which uses mpic++.
So when I compiled Makefile.openmpi, first I got an error then I added
-lcuda in gpu_SYSLIB and then that worked.

But I just want to run serially and with fftw and the STUBS directory
makes that possible. So my question is how do I change the Makefile in

there is no different between running in serial with STUBS
and using "mpirun -np 1" with openmpi.

/lib/gpu so that it points to STUBS ? The Makefile.Linux in /lib.gpu
has references to GERYON which is not present in the 5Sep2010 version.

By the way, the Makefile.serial that comes with download points to
STUBS also and has the same error as with my custom Makefile. I

sure. the problem is not in the lammps makefile, but how the library
is compiled.

suggest a Makefile.serial be included also in /lib/gpu and the

try: http://git.icms.temple.edu/git/?p=lammps-icms.git;a=blob_plain;f=lib/gpu/Makefile.serial;hb=HEAD
you may also need:
http://git.icms.temple.edu/git/?p=lammps-icms.git;a=blob_plain;f=lib/gpu/Nvidia.makefile;hb=HEAD
to go with it.

axel.

Axel,

Thanks for the references. I got it to work.