ocl_get_devices doesn't find GPU, but NVIDIA's ocl_device_query does find GPU

Hi everyone! I know this may not be a LAMMPS-specific issue, but I figured the list would be the best forum to get advice on this.

I have access to a NVIDIA Quadro RTX 4000 with Windows 10 as the current OS. I’ve been trying to get the latest pre-compiled Windows binaries to work with the GPU. The NVIDIA drivers and CUDA have been installed. NVIDIA’s opencl examples work perfectly and show that the GPU is running the code.

When running lmp_serial -in in.lj, the simulation runs fine and takes two seconds on one thread. When running lmp_serial -sf gpu -in in.lj, I get the error
ERROR: Could not find/initialize a specified accelerator device (…/gpu_extra.h:35)
Last command: package gpu 1

LAMMPS doesn’t see the GPU. I tried running ocl_get_devices and I get the response of “Found 0 platform(s).” which confirms that LAMMPS doesn’t see the GPU. I ran NVIDIA’s ocl_device_query and got the response below which shows that NVIDIA’s code found the GPU.

"OpenCL SW Info:

OpenCL SDK Revision: 7027912

OpenCL Device Info:

1 devices found supporting OpenCL:


unfortunately, there is little that can be done to debug or resolve this situation by the LAMMPS developers. The windows binaries are compiled on Linux machines with a cross-compiler and we have no access to suitable hardware with windows and an nvidia gpu, and also limited time and experience. This all used to work fine many years ago on windows 7 when the current build procedure was established, but it seems that multiple developments on the OS and driver side (for both AMD and Nvidia GPUs) have rendered the GPU package support unusable for a growing number of people. We regret this, but the only viable solution to use the GPU under these circumstances is to have a Linux partition and do LAMMPS calculations there.

This is not likely to change until there would be a volunteer with experience in compiling/programming on windows, that is willing to collaborate with the LAMMPS developers to get a proper native windows port going (which would allow us to use CUDA instead of OpenCL for better performance and also possibly include KOKKOS) that then could also be signed and registered as a proper supported windows application (and distributed through the windows app store).

Sorry for the bad news,

I got ocl_get_devices worked
with extracted nvopencl64.dll and nvopencl32.dll from nvidia drivers and dropped to folders as in registry keys. Then import this keys.

Windows Registry Editor Version 5.00



but with run i got error

18.01.2020, 19:56, “Axel Kohlmeyer” <[email protected]…24…>:

Sorry, miss click sending and second part of my letter with error and ocl_devices:

3800 atoms in group target
WARNING: Using ‘neigh_modify every 1 delay 0 check yes’ setting during minimization (…/min.cpp:174)

finally all works fine on 2xGTX 770 on another windows 10 workstation after fixing nvopencl64.dll installation in below manner. So it is RTX graphics problem now?

21.01.2020, 23:06, “Maksim” <[email protected]…2375…>: