[lammps-users] Trying to compile with GPU option

Hi,

I am running:
MacBook Pro with NVIDIA GeForce 9400M
Mac OS X 10.6.6

With the following installed:
Xcode 3.2.5
CUDA 3.2
src/STUBS/

I am attempting to compile lammps-18Jan11 (after compiling & installing the
lib/gpu directory according to the instructions), but I get the following
message:
Undefined symbols:
  "ljc_gpu_clear()", referenced from:
Etc

I changed the default mac Makefile in src/MAKE/Makefile.mac, so that
cuda/lib64 now reads cuda/lib, since I don't have the lib64 directory. Other
than that, I haven't made any changes.

I appreciate your help.

Regards,
Anna.

Undefined symbols:
"ljc_gpu_clear()", referenced from:

That function is in the lib/gpu in ljc_gpu_clear.cpp,
so if you've followed the instructions you should be finding it.

Is lib/gpu/libgpu.a in your link line?
Does "strings lib/gpu/libgpu.a | grep ljc_gpu_clear" yield a hit?

Steve

Hi,

I am running:
MacBook Pro with NVIDIA GeForce 9400M
Mac OS X 10.6.6

With the following installed:
Xcode 3.2.5
CUDA 3.2
src/STUBS/

I am attempting to compile lammps-18Jan11 (after compiling & installing the
lib/gpu directory according to the instructions), but I get the following
message:
Undefined symbols:
"ljc_gpu_clear()", referenced from:
Etc

did you try to run the "nvc_get_devices" program?
what is its output?

axel.

For Mac, 64-bit nvidia libraries were not always available. The Makefile in lib/gpu uses the -m32 option for this reason. If compiling with this flag, the Makefile in src/MAKE/ should also use this option to generate 32-bit objects.

- Mike

Hi,

Thank you all for your replies. It seemed like this tip got me further - I
changed the -m32 to -m64 in lib/gpu/Makefile.mac (trying to compile lammps
proper with -m32 caused errors due to fftw not matching, etc).

However when I get to the linking stage, I get undefined symbols:
"_cuDeviceGetCount" referenced from ...
...
"_MPI_Type_create_hindexed" ...

etc

I'm pretty sure CUDA is installed, and I've added the appropriate
directories to my PATH, DYLD_LIBRARY_PATH & LD_LIBRARY_PATH.

Thanks again,

Regards,
Anna.

64-bit drivers may still be unavailable for mac. You will probably have to compile everything (including fftw) with m32 if you want to use GPU acceleration (or try to hunt down 64 bit cuda drivers). - Mike