Lammps KOKKOS Compile Error

Hi all

regarding Cuda and C++11 it is worth noting that CUDA 6.5 supports all C++11 features we need (in host and in device code) for LAMMPS. What you need to do is use a new enough gcc as the host compiler. We are testing 4.7.2, 4.8.3 and 4.9.2 with Kokkos in general (as well as Clang and Intel). My default compilation right now is either Cuda 7.0 with GCC 4.7.2 or Cuda 6.5 with GCC 4.7.2. Intel as a host compiler for NVCC is not well tested.

That said the error you are seeing is wrong assignment of a Kokkos::View which lives on the gpu to a Kokkos::View on the host which is not allowed.
This is an error which should have nothing to do with C++11 and rather looks like an internal issue.

Kokkos::View<F_FLOAT *[6], Kokkos::LayoutRight, LMPHostType, Kokkos::MemoryTraits<5U>, Kokkos::Impl::ViewDefault>,
const Kokkos::View<F_FLOAT *[6], Kokkos::LayoutRight, Kokkos::Cuda::execution_space, Kokkos::MemoryManaged, Kokkos::Impl::ViewDefault>

Currently I can not reproduce the issues you are seeing. One thing to try to just get a base line is to disable UVM, AVX, and OpenMP and see where that gets us.
Actually considering that, enabling UVM could cause that. It did produce similar issues earlier this year in other Kokkos stuff. For LAMMPS you don't need UVM (in fact it will in almost all cases slow things down), so you can try just disabling that.