Dear all,
I am trying to compile LAMMPS, the 23Jun2022 version on Windows 10 using WSL, with the GPU package enabled, which in principle was successful using the default settings, like below.
cmake -D PKG_GPU=on -C …/cmake/presets/most.cmake …/cmake
Running the lmp-executable works, but with the commandline option “-pk gpu x” with x beeing 0, 1, or any other integer I get the error:
ERROR: Invalid OpenCL platform ID. (src/GPU/gpu_extra.h:77)
Running ocl_get_devices shows the problem:
“Found 0 platform(s).”
as well as lmp -h shows:
"…
Accelerator configuration:
GPU package API: OpenCL
GPU package precision: mixed
OPENMP package API: OpenMP
OPENMP package precision: double
Compatible GPU present: no
…"
Trying to compile using CUDA instead of OpenCL (following this advice to get the neccessary CUDA-software: CUDA on WSL 2 User Guide) gives:
“CMake Error at Modules/Packages/GPU.cmake:44 (message):
Could not find bin2c, use -DBIN2C=/path/to/bin2c to help cmake finding it.” failing to compile in the first place.
Could someone maybe point me in the right direction to get this to work?
From my understanding, the issue is not with LAMMPS itself, but with the WSL not accessing the GPU, right?
My experience with these issues is very limited so any help is greatly appreciated!
Kind regards!
Jakob