Commit 7a5587d6 authored by stamoor's avatar stamoor
Browse files

Adding Kokkos error check

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14586 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent e2117af2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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");
+7 −3
Original line number Diff line number Diff line
@@ -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