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:
CL_PLATFORM_NAME: NVIDIA CUDA
CL_PLATFORM_VERSION: OpenCL 1.2 CUDA 10.2.95
OpenCL SDK Revision: 7027912
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).