Warnings with KoKKOs cuda - calling a __host__ function from a __host__ __device__ function is not allowed

Hi,

On compiling the LAMMPS (5 June 2019) with KOKKOS cuda, I get the following warnings in several files:
src/KOKKOS/pair_tersoff_zbl_kokkos.cpp(351): warning: calling a host function from a host device function is not allowed

The build proceeds to completion. Is this a known issue?
I am using gcc 7.4 and cmake 3.16.2, cuda 10.1.243 and my configure command is:
cmake -D CMAKE_BUILD_TYPE=Release -DBUILD_MPI=yes -DLAMMPS_MACHINE=mpikokkoscuda -DPKG_MANYBODY=yes -DPKG_KOKKOS=yes -DKOKKOS_ARCH=“HSW;Volta70” -DKOKKOS_ENABLE_CUDA=yes -DKOKKOS_ENABLE_OPENMP=yes -DPKG_USER-MEAMC=yes -DCMAKE_CXX_COMPILER=/gpfs/fs1/nvydyanathan/LAMMPS/mylammps/lib/kokkos/bin/nvcc_wrapper …/cmake

regards,
Naga

I’ve been seeing these warnings for a while when compiling KOKKOS with CUDA and so far, there was no negative side effect. I think the fix for this is going to be in the next LAMMPS patch release and thus also in the upcoming stable release. According to the description of the pull request, these warnings will become a problem when using the CLang compiler.

Axel.

These warnings are harmless. Usually there is a missing “KOKKOS_INLINE_FUNCTION” somewhere, we need to go through and get rid of all the compiler warnings again…

Stan