I have encountered problems compiling LAMMPS with NVIDIA GPU’s using CUDA.
It fails with the VORO++ library, It seems it is related to the -Xcompiler flag. I was able to get over this by using g++ for the VORO++ library but I am unsure how this affects the result.

I am using the latest stable LAMMPS version (updated 17th Feb 2023)

Also I am having troubles with the CMAKE unit testing, in particular for the force styles.


Not at all. The VORONOI package is not interfaced with KOKKOS.

It is impossible to comment on this because you don’t provide any details about what your problems are. Please note that for unit testing, you need to use the ‘Debug’ build style. With Release the code uses aggressive optimization and that can change numerics and thus lead to failure of some of the unit tests. Those are deliberately designed to be very sensitive to small changes to be able to detect subtle changes. Please also note that unit testing currently is using KOKKOS only when compiled for OpenMP, not for CUDA.

As Axel said, it would be helpful if you could post the error message you are seeing, and we can take a look.

Thanks for the reply. Sorry for being vague, I encountered more than one problem and was afraid it was on my side, and wanted to check if ctest with kokkos cuda was a known issue.

I can share the problems I encountered, I apologize if my terminology is not accurate, I am far for being good at this. I built using cmake with the flag -D ENABLE_TESTING=yes

I got build errors due to gcc not recognizing the -Xcudafe flag. I think this was put by the nvcc_wrapper

I also got errors from nvcc when linking to I think this was due to linking to an “empty” library since my only contains INPUT(

I was able to finish the built by correcting this things. When I ran ctest many of the tests failed, and thought it as connected to the very dubious fixes that I applied. I can avoid this without the -D ENABLE_TESTING=yes but initially I thought it was a good thing to do.

Thanks again,



your post is not providing any specifics as to which command lines exactly you were using and what errors exactly you were encountering, thus it is impossible to help you or to provide any advice beyond what was already given.

I think i am fine for now