Hi,
I think there is an issue in the compilation of lammps-7th Aug, 2019 version when building with KOKKOS package.
I am using the following command for building :
cmake -D BUILD_OMP=yes -D LAMMPS_MACHINE=mpi -D PKG_ASPHERE=yes -D PKG_MANYBODY=on -D PKG_USER-COLVARS=on -D PKG_MOLECULE=on -D PKG_KSPACE=on -D PKG_RIGID=on -D PKG_REPLICA=on -D PKG_KOKKOS=on -D KOKKOS_ARCH=“BDW;Pascal61” -D KOKKOS_ENABLE_CUDA=yes -D KOKKOS_ENABLE_OPENMP=yes -D KOKKOS_CXX_COMPILER=/home/madhur.aggarwal/lammps_kokkos_test/lammps-stable/lammps-7Aug19/lib/kokkos/bin/nvcc_wrapper …/cmake
When I run the above command (documentation says value of variable CMAKE_CXX_COMPILER should be specified, but running with that tells me to specify value of KOKKOS_CXX_COMPILER instead), I get the following error :
CMake Error at /home/madhur.aggarwal/lammps_kokkos_test/lammps-stable/lammps-7Aug19/lib/kokkos/cmake/kokkos_functions.cmake:98 (message):
Invalid compiler for CUDA. The compiler must be nvcc_wrapper or Clang, but
compiler ID was GNU
Call Stack (most recent call first):
/home/madhur.aggarwal/lammps_kokkos_test/lammps-stable/lammps-7Aug19/lib/kokkos/CMakeLists.txt:23 (set_kokkos_cxx_compiler)
– Configuring incomplete, errors occurred!
See also “/home/madhur.aggarwal/lammps_kokkos_test/lammps-stable/lammps-7Aug19/build/CMakeFiles/CMakeOutput.log”.
I do not see any error in my CMakeOutput.log file. Some lines at the start of my CMakeOutput.log file look like this:
The system is: Linux - 4.15.0-65-generic - x86_64
Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” succeeded.
Compiler: /usr/bin/c++
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source “CMakeCXXCompilerId.cpp” produced “a.out”
The CXX compiler identification is GNU, found in “/home/madhur.aggarwal/lammps_kokkos_test/lammps-stable/lammps-7Aug19/build/CMakeFiles/3.5.1/CompilerIdCXX/a.out”
Also, I have NVIDIA Pascal gen 6.1 GPUs, so I modified kokkos/bin/nvcc_wrapper file to make default_arch=“sm_61”.
Please let me know if anyone has any ideas to solve this issue.
Thanks,
Madhur Aggarwal