Issue with KOKKOS installation

I am trying to install the KOKKOS package in LAMMPS using cmake in our HPC cluster.

GPU: NVIDIA GeForce RTX 2080 Super GPU

I followed the following steps:

git clone GitHub - lammps/lammps: Public development project of the LAMMPS MD software package
cd lammps;mkdir build; cd build

cmake -C …/cmake/presets/kokkos-cuda.cmake
-C …/cmake/presets/basic.cmake
-D BUILD_MPI=yes -D PKG_OPENMP=yes
-D Kokkos_ARCH_PASCAL61=no -D Kokkos_ARCH_TURING75=yes
-D Kokkos_ARCH_HOSTARCH=yes -D Kokkos_ARCH_GPUARCH=yes
-D Kokkos_ENABLE_HIP=yes -D Kokkos_ENABLE_OPENMP=yes
-D Kokkos_ENABLE_OPENMP=yes -D PKG_GPU=yes
-D GPU_API=CUDA -D GPU_ARCH=sm_61
…/cmake

And my kokkos-cuda.cmake file looks like:
more …/cmake/presets/kokkos-cuda.cmake

preset that enables KOKKOS and selects CUDA compilation with OpenMP

enabled as well. This preselects CC 5.0 as default GPU arch, since

that is compatible with all higher CC, but not the default CC 3.5

set(PKG_KOKKOS ON CACHE BOOL β€œβ€ FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL β€œβ€ FORCE)
set(Kokkos_ENABLE_CUDA ON CACHE BOOL β€œβ€ FORCE)
set(Kokkos_ARCH_PASCAL60 ON CACHE BOOL β€œβ€ FORCE)
set(BUILD_OMP ON CACHE BOOL β€œβ€ FORCE)
get_filename_component(NVCC_WRAPPER_CMD {CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE) set(CMAKE_CXX_COMPILER {NVCC_WRAPPER_CMD} CACHE FILEPATH β€œβ€ FORCE)

If KSPACE is also enabled, use CUFFT for FFTs

set(FFT_KOKKOS β€œCUFFT” CACHE STRING β€œβ€ FORCE)

hide deprecation warnings temporarily for stable release

set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL β€œβ€ FORCE)

And I am getting the following error:

loading initial cache file …/cmake/presets/kokkos-cuda.cmake
loading initial cache file …/cmake/presets/basic.cmake
– The CXX compiler identification is unknown
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Check for working CXX compiler: /zfshomes/mhassan01/pace-lammps/lammps/lib/kokkos/bin/nvcc_wrapper
– Check for working CXX compiler: /zfshomes/mhassan01/pace-lammps/lammps/lib/kokkos/bin/nvcc_wrapper - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:60 (message):
The C++ compiler

"/zfshomes/mhassan01/pace-lammps/lammps/lib/kokkos/bin/nvcc_wrapper"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /zfshomes/mhassan01/pace-lammps/lammps/build/CMakeFiles/CMakeScratch/TryCompile-248Vir

Run Build Command(s):/usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_2a10b/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_2a10b.dir/build.make CMakeFiles/cmTC_2a10b.dir/build
gmake[1]: Entering directory '/zfshomes/mhassan01/pace-lammps/lammps/build/CMakeFiles/CMakeScratch/TryCompile-248Vir'
Building CXX object CMakeFiles/cmTC_2a10b.dir/testCXXCompiler.cxx.o
/zfshomes/mhassan01/pace-lammps/lammps/lib/kokkos/bin/nvcc_wrapper    -o CMakeFiles/cmTC_2a10b.dir/testCXXCompiler.cxx.o -c /zfshomes/mhassan01/pace-lammps/lammps/build/CMakeFiles/CMakeScratch/TryCompile-248Vir/testCXXCompiler.cxx
/zfshomes/mhassan01/pace-lammps/lammps/lib/kokkos/bin/nvcc_wrapper: line 658: nvcc: command not found
gmake[1]: *** [CMakeFiles/cmTC_2a10b.dir/build.make:78: CMakeFiles/cmTC_2a10b.dir/testCXXCompiler.cxx.o] Error 127
gmake[1]: Leaving directory '/zfshomes/mhassan01/pace-lammps/lammps/build/CMakeFiles/CMakeScratch/TryCompile-248Vir'
gmake: *** [Makefile:127: cmTC_2a10b/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:22 (project)

– Configuring incomplete, errors occurred!


Not sure what I am doing wrong. Any suggestions to fix this issue is highly appreciated.

Here is what is wrong. Your environment doesn’t seem to include access to a CUDA toolkit.

1 Like