CUDA Guide for LAMMPS

Dear Lammps-Community,

I greatly appreciate the flexibility and the extend of the LAMMPS package together with the detailed support provided by both manual and mailing list.

However, I was wondering if guides or tutorials exist for using LAMMPS together with CUDA?

I managed to build my LAMMPS executables for my local desktop and our HPC in a way that CUDA is supported. It provides a sufficient performance boost while running the Lennard-Jones examples in the bench-folder, however when I switch to my current systems I can hardly detect any gain in performance.

I use the following settings for cmake, which seem to work well:

cmake -D BUILD_OMP=on -D PKG_OPT=on -D PKG_USER-OMP=on -D PKG_GPU=on -D GPU_API=cuda -D PKG_KOKKOS=on -D GPU_PREC=mixed -D PKG_ASPHERE=on -D PKG_BODY=on -D PKG_COLLOID=on -D PKG_CORESHELL=on -D PKG_DIPOLE=on -D PKG_MANYBODY=on -D PKG_MC=on -D PKG_MISC=on -D PKG_MOLECULE=on -D PKG_RIGID=on -D PKG_USER-DRUDE=on -D PKG_USER-MEAMC=on -D GPU_ARCH=sm_61 …/cmake

The GPU is a NVIDIA Quadro P600.

The LAMMPS executable I built is clearly running simulations on my GPU while using the following command: mpirun –np X lmp –in in.lj –sf gpu –pk gpu 1 (i.e., using the bench Lennard-Jones file)

Therefore, I am asking if there are any general guidelines or tutorials for writing input for LAMMPS, which performs well with CUDA?

I just would like to know if there is an already existing documentation who to enhance the input for my future simulations.

Nevertheless, I am well aware that the efficiency of GPU-accelerated simulations highly depends on the properties of the investigated systems and that providing comprehensive CUDA guidelines might be complicated and cumbersome.

I would like to thank you very much for any help and references regarding CUDA-convenient creation of LAMMPS input.

Sincerely yours,

Michael Bley

Dr. Michael Bley

Applied Theoretical Physics - Computational Physics

Albert-Ludwigs-University, Freiburg im Breisgau

Hi Michael, the guidelines are most definitely specific to each accelerator package used in LAMMPS:
https://lammps.sandia.gov/doc/Speed_packages.html

You can, for example, compare what you got with the GPU package with results with the newer KOKKOS package.

Giacomo

however when I switch to my current systems I can hardly detect any gain in performance.

Is the model you want to run (pair styles, boundary conditions, integrators, etc)
supported by either of the CUDA options in LAMMPS (GPU and KOKKOS packages)?

Steve