Rename team option to neigh/thread

This commit is contained in:
Stan Moore 2019-04-08 16:02:18 -06:00
parent 149a57f3ae
commit b8d3c9e01b
3 changed files with 15 additions and 15 deletions

View File

@ -184,8 +184,8 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
binsize = 0.0;
gpu_direct_flag = 1;
team_flag = 0;
team_flag_set = 0;
neigh_thread = 0;
neigh_thread_set = 0;
neighflag_qeq_set = 0;
if (ngpu > 0) {
neighflag = FULL;
@ -319,12 +319,12 @@ void KokkosLMP::accelerator(int narg, char **arg)
else if (strcmp(arg[iarg+1],"on") == 0) gpu_direct_flag = 1;
else error->all(FLERR,"Illegal package kokkos command");
iarg += 2;
} else if (strcmp(arg[iarg],"team") == 0) {
} else if (strcmp(arg[iarg],"neigh/thread") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal package kokkos command");
if (strcmp(arg[iarg+1],"off") == 0) team_flag = 0;
else if (strcmp(arg[iarg+1],"on") == 0) team_flag = 1;
if (strcmp(arg[iarg+1],"off") == 0) neigh_thread = 0;
else if (strcmp(arg[iarg+1],"on") == 0) neigh_thread = 1;
else error->all(FLERR,"Illegal package kokkos command");
team_flag_set = 1;
neigh_thread_set = 1;
iarg += 2;
} else error->all(FLERR,"Illegal package kokkos command");
}
@ -345,8 +345,8 @@ void KokkosLMP::accelerator(int narg, char **arg)
force->newton = force->newton_pair = force->newton_bond = newtonflag;
if (team_flag && neighflag != FULL)
error->all(FLERR,"Must use KOKKOS package option 'neigh full' with 'team on'");
if (neigh_thread && neighflag != FULL)
error->all(FLERR,"Must use KOKKOS package option 'neigh full' with 'neigh/thread on'");
neighbor->binsize_user = binsize;
if (binsize <= 0.0) neighbor->binsizeflag = 0;

View File

@ -36,8 +36,8 @@ class KokkosLMP : protected Pointers {
int numa;
int auto_sync;
int gpu_direct_flag;
int team_flag;
int team_flag_set;
int neigh_thread;
int neigh_thread_set;
int newtonflag;
double binsize;
@ -89,8 +89,8 @@ U: Must use Kokkos half/thread or full neighbor list with threads or GPUs
Using Kokkos half-neighbor lists with threading is not allowed.
E: Must use KOKKOS package option 'neigh full' with 'team on'
E: Must use KOKKOS package option 'neigh full' with 'neigh_thread on'
The 'team on' option requires a full neighbor list
The 'neigh_thread on' option requires a full neighbor list
*/

View File

@ -867,11 +867,11 @@ template<class PairStyle, unsigned NEIGHFLAG, class Specialisation>
EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename Kokkos::Impl::enable_if<(NEIGHFLAG&PairStyle::EnabledNeighFlags) != 0, NeighListKokkos<typename PairStyle::device_type>*>::type list) {
EV_FLOAT ev;
if (!fpair->lmp->kokkos->team_flag_set)
if (!fpair->lmp->kokkos->neigh_thread_set)
if (list->inum <= 16384)
fpair->lmp->kokkos->team_flag = 1;
fpair->lmp->kokkos->neigh_thread = 1;
if (fpair->lmp->kokkos->team_flag) {
if (fpair->lmp->kokkos->neigh_thread) {
int vector_length = 8;
int atoms_per_team = 32;