diff --git a/src/KOKKOS/neigh_list_kokkos.h b/src/KOKKOS/neigh_list_kokkos.h index 393fa478a1..45e768927c 100644 --- a/src/KOKKOS/neigh_list_kokkos.h +++ b/src/KOKKOS/neigh_list_kokkos.h @@ -76,7 +76,7 @@ public: typename ArrayTypes::t_int_1d d_numneigh; // # of J neighs for each I NeighListKokkos(class LAMMPS *lmp): - NeighList(lmp) {_stride = 1; maxneighs = 16; kokkos = 1; + NeighList(lmp) {_stride = 1; maxneighs = 16; kokkos = 1; maxatoms = 0; execution_space = ExecutionSpaceFromDevice::space; }; ~NeighListKokkos() {numneigh = NULL; ilist = NULL;}; diff --git a/src/KOKKOS/neighbor_kokkos.cpp b/src/KOKKOS/neighbor_kokkos.cpp index ff154c9919..ae8ae82c13 100644 --- a/src/KOKKOS/neighbor_kokkos.cpp +++ b/src/KOKKOS/neighbor_kokkos.cpp @@ -92,6 +92,9 @@ void NeighborKokkos::init_cutneighsq_kokkos(int n) void NeighborKokkos::create_kokkos_list(int i) { + if (style != BIN) + error->all(FLERR,"KOKKOS package only supports 'bin' neighbor lists"); + if (requests[i]->kokkos_device) { lists[i] = new NeighListKokkos(lmp); device_flag = 1; @@ -227,9 +230,6 @@ void NeighborKokkos::build(int topoflag) template void NeighborKokkos::build_kokkos(int topoflag) { - if (style != BIN) - error->all(FLERR,"KOKKOS package only supports 'bin' neighbor lists"); - typedef DeviceType device_type; int i,m;