allow to set pair team size with neigh/thread on from -pk kokkos

This commit is contained in:
Trung Nguyen
2025-06-07 16:07:36 -05:00
parent e62f45b2b5
commit 8305e27835
2 changed files with 9 additions and 0 deletions

View File

@ -80,6 +80,8 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
threads_per_atom = 1;
threads_per_atom_set = 0;
pair_team_size = 128;
pair_team_size_set = 0;
int iarg = 0;
while (iarg < narg) {
@ -547,6 +549,11 @@ void KokkosLMP::accelerator(int narg, char **arg)
threads_per_atom = utils::inumeric(FLERR, arg[iarg+1], false, lmp);
threads_per_atom_set = 1;
iarg += 2;
} else if (strcmp(arg[iarg],"pair/team/size") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal package kokkos command");
pair_team_size = utils::inumeric(FLERR, arg[iarg+1], false, lmp);
pair_team_size_set = 1;
iarg += 2;
} else error->all(FLERR,"Illegal package kokkos command");
}

View File

@ -57,6 +57,8 @@ class KokkosLMP : protected Pointers {
double binsize;
int threads_per_atom;
int threads_per_atom_set;
int pair_team_size;
int pair_team_size_set;
static int is_finalized;
static int init_ngpus;