refactor handling of pair/only flag for GPU and KOKKOS
This commit is contained in:
@ -136,7 +136,6 @@ FixGPU::FixGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||
double binsize = 0.0;
|
||||
char *opencl_args = nullptr;
|
||||
int block_pair = -1;
|
||||
int pair_only_flag = 0;
|
||||
int ocl_platform = -1;
|
||||
char *device_type_flags = nullptr;
|
||||
|
||||
@ -194,7 +193,7 @@ FixGPU::FixGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"pair/only") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal package gpu command");
|
||||
pair_only_flag = utils::logical(FLERR,arg[iarg+1],false,lmp);
|
||||
lmp->pair_only_flag = utils::logical(FLERR,arg[iarg+1],false,lmp);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"ocl_args") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal package gpu command");
|
||||
@ -224,16 +223,6 @@ FixGPU::FixGPU(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (force->newton_pair == 1 && _particle_split < 1)
|
||||
error->all(FLERR,"Cannot use newton pair on for split less than 1 for now");
|
||||
|
||||
if (pair_only_flag) {
|
||||
lmp->suffixp = lmp->suffix;
|
||||
lmp->suffix = nullptr;
|
||||
} else {
|
||||
if (lmp->suffixp) {
|
||||
lmp->suffix = lmp->suffixp;
|
||||
lmp->suffixp = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// pass params to GPU library
|
||||
// change binsize default (0.0) to -1.0 used by GPU lib
|
||||
|
||||
|
||||
Reference in New Issue
Block a user