please test CMake support in 2 August 2018 version (or later)

Hi Stefan,

in the new CMake system, we just inherit the CMake-based build system
from Kokkos upstream.
So could you open an issue for the two things below with them at:

And please tag me with "@junghans" on the issue, too.



Hi Christoph,

It specifically goes wrong in fix_momentum_kokkos.cpp where it chokes on trying to use the non-const operator[] on omega, vcm and xcm, which it argues is wrong because omega is a const Few<double,3>. However, in kokkos_few, there is such an operator defined (KOKKOS_INLINE_FUNCTION T const& operator[](std::size_t i) const { … }.
It seems like Kokkos insists on trying to call the non-const variants in the parallel_for even though they should be const. If I forcefully change these variables to a const ref by doing the following it compiles:
const Few<double,3> &vcm_ref = vcm;

Kokkos::parallel_for(nlocal, LAMMPS_LAMBDA(int i) {
if (mask(i) & groupbit2) {
if (xflag2) v(i,0) -= vcm_ref[0];
if (yflag2) v(i,1) -= vcm_ref[1];
if (zflag2) v(i,2) -= vcm_ref[2];


Isn’t that the strangest? This does seem like an issue in Kokkos itself so I will file an issue there.

Actually, on second note, it might be an issue with the Lammps Kokkos package instead, since Few is defined there. For now I will file an issue on the LAMMPS Github.