Dear LAMMPS developer and community,
I am running into errors when I try to build the most recent version of LAMMPS with KOKKOS for GPU, which I don’t know how to resolve given my limited knowledge regarding code compilation.
To give context of the environment, the version of LAMMPS is Sep-29-2021, the version of Cmake for the HPC I am using is 3.18.4, the version of gcc I load is 9.3.0.
With the standard Cmake approach I am instructed from the manual at section 3.7.4, I exactly followed the commands:
mkdir build-kokkos-cuda
cd build-kokkos-cuda
cmake -C …/cmake/presets/basic.cmake -C …/cmake/presets/kokkos-cuda.cmake …/cmake
then it’s giving me the errors of:
– The CXX compiler identification is unknown
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - failed
– Check for working CXX compiler: /Users/etainwuyiyi2/lammps_2021_09/lib/kokkos/bin/nvcc_wrapper
– Check for working CXX compiler: /Users/etainwuyiyi2/lammps_2021_09/lib/kokkos/bin/nvcc_wrapper - broken
CMake Error at /opt/homebrew/Cellar/cmake/3.21.3/share/cmake/Modules/CMakeTestCXXCompiler.cmake:62 (message):
The C++ compiler
“/Users/etainwuyiyi2/lammps_2021_09/lib/kokkos/bin/nvcc_wrapper”
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/etainwuyiyi2/lammps_2021_09/build-kokkos-cuda/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make -f Makefile cmTC_06889/fast && /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/cmTC_06889.dir/build.make CMakeFiles/cmTC_06889.dir/build
Building CXX object CMakeFiles/cmTC_06889.dir/testCXXCompiler.cxx.o
/Users/etainwuyiyi2/lammps_2021_09/lib/kokkos/bin/nvcc_wrapper -arch arm64 -o CMakeFiles/cmTC_06889.dir/testCXXCompiler.cxx.o -c /Users/etainwuyiyi2/lammps_2021_09/build-kokkos-cuda/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
/Users/etainwuyiyi2/lammps_2021_09/lib/kokkos/bin/nvcc_wrapper: line 562: nvcc: command not found
make[1]: *** [CMakeFiles/cmTC_06889.dir/testCXXCompiler.cxx.o] Error 127
make: *** [cmTC_06889/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
– Configuring incomplete, errors occurred!
See also “/Users/etainwuyiyi2/lammps_2021_09/build-kokkos-cuda/CMakeFiles/CMakeOutput.log”.
See also “/Users/etainwuyiyi2/lammps_2021_09/build-kokkos-cuda/CMakeFiles/CMakeError.log”.
Don’t know how I can work around with this, really appreciate any suggestions and pointing out where I am doing wrong.
With best regards,
Grey