lammps/lammps

Failed to use GPU acceleration for hybrid/overlay type potential

ruio248 opened this issue · 3 comments

When I tried to use GPU acceleration ,it is work for lj type potential .But for hybrid/overlay type potential I encountered the following error.

(base) usr@usr:/media/ruihao/lammps$ mpirun -np 4 lmp -sf gpu -pk gpu 1 -in in
LAMMPS (2 Aug 2023 - Update 2)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
DumpFolderName
Lattice spacing in x,y,z = 3.14 3.14 3.14
Created orthogonal box = (-188.4 -188.4 -188.4) to (188.4 188.4 188.4)
1 by 2 by 2 MPI processor grid
Created 3456000 atoms
using lattice units in orthogonal box = (-188.4 -188.4 -188.4) to (188.4 188.4 188.4)
create_atoms CPU = 0.051 seconds
3162509 atoms in group NO_FIX
293491 atoms in group FIX
2698631 atoms in group FREE
463878 atoms in group BATH
1 atoms in group CENTER
WARNING: Calling write_dump before a full system init. (src/write_dump.cpp:65)

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

Your simulation uses code contributions which should be cited:

  • GPU package (short-range, long-range and three-body potentials): doi:10.1016/j.cpc.2010.12.021, doi:10.1016/j.cpc.2011.10.012, doi:10.1016/j.cpc.2013.08.002, doi:10.1016/j.commatsci.2014.10.068, doi:10.1016/j.cpc.2016.10.020, doi:10.3233/APC200086
    The log file lists these citations in BibTeX format.

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

ERROR: GPU package styles must not be used multiple times (src/pair_hybrid.cpp:608)
Last command: run 2000
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.

LAMMPS Version and Platform
Version : 2 Aug 2023 - Update 2
OS: Ubuntu 20.04 LTS
Cuda version : 11.8
Driver Version: 535.113.01
GPU: 1 RTX 4090

Potential setting file :
pair_style hybrid/overlay eam/alloy zbl 1.4 1.8
pair_coeff * * eam/alloy WHff.eam.alloy W H
pair_coeff 1 1 zbl 74.0 74.0
pair_coeff 2 2 zbl 1.0 1.0
pair_coeff 1 2 zbl 74.0 1.0
mass 1 1.83840E+02
mass 2 1.00794E+00

@ruio248 is it possible to share with us a simplified input deck with a smaller system size to reproduce the issue?

ERROR: GPU package styles must not be used multiple times (src/pair_hybrid.cpp:608)

This error cannot be produced with the input you quoted since in the pair style command no pair style is listed more than once.

What you should get is:

ERROR: Must not use GPU neighbor lists with hybrid pair style (src/GPU/fix_gpu.cpp:280)

Which can be addressed with adding -pk gpu 4 neigh no to your command line.

I still face the same problem. Adding -pk gpu 4 neigh no seems not works for me ,the related file have uploaded
test_code.zip

issue 1

(base) ruihao@ruihao:/media/ruihao/lammps$ mpirun -np 4 lmp -sf gpu -pk gpu 1 neigh no -in in
LAMMPS (2 Aug 2023 - Update 2)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
DumpFolderName
Lattice spacing in x,y,z = 3.14 3.14 3.14
Created orthogonal box = (-188.4 -188.4 -188.4) to (188.4 188.4 188.4)
1 by 2 by 2 MPI processor grid
Created 3456000 atoms
using lattice units in orthogonal box = (-188.4 -188.4 -188.4) to (188.4 188.4 188.4)
create_atoms CPU = 0.072 seconds
3162509 atoms in group NO_FIX
293491 atoms in group FIX
2698631 atoms in group FREE
463878 atoms in group BATH
1 atoms in group CENTER
WARNING: Calling write_dump before a full system init. (src/write_dump.cpp:65)

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

Your simulation uses code contributions which should be cited:

  • GPU package (short-range, long-range and three-body potentials): doi:10.1016/j.cpc.2010.12.021, doi:10.1016/j.cpc.2011.10.012, doi:10.1016/j.cpc.2013.08.002, doi:10.1016/j.commatsci.2014.10.068, doi:10.1016/j.cpc.2016.10.020, doi:10.3233/APC200086
    The log file lists these citations in BibTeX format.

CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE

ERROR: GPU package styles must not be used multiple times (src/pair_hybrid.cpp:608)
Last command: run 2000
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 429.
Cuda driver error 4 in call at file '/home/ruihao/lammps/lammps-2Aug2023/lib/gpu/geryon/nvd_device.h' in line 430.

issue 2

(base) ruihao@ruihao:/media/ruiha/lammps$ mpirun -np 4 lmp -sf gpu -pk gpu 4 neigh no -in in
LAMMPS (2 Aug 2023 - Update 2)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
ERROR: Could not find/initialize a specified accelerator device (src/GPU/gpu_extra.h:57)
Last command: package gpu 4 neigh no