diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 0d17ca4d5d0569faf042c94b42ff0e4db45e9b0a..0dbb1754a0340f0602ab401b5dc100c83aab27fd 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -37,7 +37,7 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) // process any command-line args that invoke Kokkos settings - int ngpu = 0; + ngpu = 0; int device = 0; num_threads = 1; numa = 1; @@ -159,6 +159,8 @@ void KokkosLMP::accelerator(int narg, char **arg) else if (strcmp(arg[iarg+1],"n2") == 0) neighflag = N2; else if (strcmp(arg[iarg+1],"full/cluster") == 0) neighflag = FULLCLUSTER; else error->all(FLERR,"Illegal package kokkos command"); + if (neighflag = HALF && num_threads == 0 || ngpu == 0) + error->all(FLERR,"Must use Kokkos half/thread or full neighbor list with threads or GPU"); iarg += 2; } else if (strcmp(arg[iarg],"binsize") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal package kokkos command"); diff --git a/src/KOKKOS/kokkos.h b/src/KOKKOS/kokkos.h index 3f86a7bac66124cab78352f6dcb917af5c7b7be3..4db638803efa58b46df952019f9054cb7475d61b 100644 --- a/src/KOKKOS/kokkos.h +++ b/src/KOKKOS/kokkos.h @@ -27,7 +27,7 @@ class KokkosLMP : protected Pointers { int forward_comm_classic; int exchange_comm_on_host; int forward_comm_on_host; - int num_threads; + int num_threads,ngpu; int numa; KokkosLMP(class LAMMPS *, int, char **); @@ -49,11 +49,15 @@ Self-explanatory. See Section 2.7 of the manual for details. E: GPUs are requested but Kokkos has not been compiled for CUDA -UNDOCUMENTED +Recompile Kokkos with CUDA support to use GPUs. E: Kokkos has been compiled for CUDA but no GPUs are requested -UNDOCUMENTED +One or more GPUs must be used when Kokkos is compiled for CUDA. + +E: Must use Kokkos half/thread or full neighbor list with threads or GPU + +Using Kokkos half neighbor list with threading is not allowed. E: Illegal ... command