First set of changes for Kokkos HIP
This commit is contained in:
@ -100,8 +100,8 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
|
||||
} else if (strcmp(arg[iarg],"g") == 0 ||
|
||||
strcmp(arg[iarg],"gpus") == 0) {
|
||||
#ifndef KOKKOS_ENABLE_CUDA
|
||||
error->all(FLERR,"GPUs are requested but Kokkos has not been compiled for CUDA");
|
||||
#if !defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_HIP)
|
||||
error->all(FLERR,"GPUs are requested but Kokkos has not been compiled for CUDA or HIP");
|
||||
#endif
|
||||
if (iarg+2 > narg) error->all(FLERR,"Invalid Kokkos command-line args");
|
||||
ngpus = atoi(arg[iarg+1]);
|
||||
@ -164,9 +164,9 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
if (logfile) fprintf(logfile," will use up to %d GPU(s) per node\n",ngpus);
|
||||
}
|
||||
|
||||
#ifdef KOKKOS_ENABLE_CUDA
|
||||
#ifdef LMP_KOKKOS_GPU
|
||||
if (ngpus <= 0)
|
||||
error->all(FLERR,"Kokkos has been compiled for CUDA but no GPUs are requested");
|
||||
error->all(FLERR,"Kokkos has been compiled for CUDA or HIP but no GPUs are requested");
|
||||
#endif
|
||||
|
||||
#ifndef KOKKOS_ENABLE_SERIAL
|
||||
|
||||
Reference in New Issue
Block a user