Hi, everyone.
I installed LAMMPS with a GPU accelerator on my machine. I used Opencl API and the installation was successful. But when I run my simulation an error occurs and is pasted below:
mpirun -np 12 /sw/pub/apps/lammps_fortran_mpi_gpu/bin/lmp_fotran_mpi_gpu -sf gpu -pk gpu 1 -in mixturePetro_293.txt
LAMMPS (22 Jul 2025)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread.
using 1 OpenMP thread(s) per MPI task
UCL Error: Error compiling PTX Program…
I have compatibles nvidia driver and nvcc compiler:
nvidia-smi
Wed Aug 6 13:03:18 2025
±----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.172.08 Driver Version: 570.172.08 CUDA Version: 12.8
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:23:50_PST_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_0
My configure:
cmake -D CMAKE_INSTALL_PREFIX=/sw/pub/apps/lammps_fortran_mpi_gpu -D BUILD_MPI=y -D LAMMPS_MACHINE=fortran_mpi_gpu -D CMAKE_C_COMPILER=gcc -D CMAKE_CXX_COMPILER=g++ -D CMAKE_FORTRAN_COMPILER=gfortran -D FFT=fftw3 -D BUILD_TOOLS=no -D PKG_GPU=yes -D GPU_API=CUDA -D GPU_PREC=mixed -D GPU_ARCH=sm_120 -D CUDA_MPS_SUPPORT=y -D PKG_ORIENT=ON -D PKG_OPENMP=ON -D PKG_MEAM=ON -D PKG_MANYBODY=ON -DBIN2C=/usr/local/cuda-12.8/bin/bin2c -D PKG_MOLECULE=on -D PKG_RIGID=on ../cmake
The compilation always work fine. I have used several GPU_ARCH values, from sm_50 to sm_120, and the behavior is the same. During cuda files compilations, there are not error mesages. The lammps executable works for CPU calculation. I think I have tried all possible solutions pointed others users. Anyone can help me?
Thanks