git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6700 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
|
||||
#ifdef FIX_CLASS
|
||||
|
||||
FixStyle(gpu,FixGPU)
|
||||
FixStyle(GPU,FixGPU)
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@ -68,6 +68,8 @@ Comm::Comm(LAMMPS *lmp) : Pointers(lmp)
|
||||
cutghostuser = 0.0;
|
||||
ghost_velocity = 0;
|
||||
|
||||
nthreads = 1;
|
||||
|
||||
// initialize comm buffers & exchange memory
|
||||
|
||||
maxsend = BUFMIN;
|
||||
|
||||
@ -29,6 +29,7 @@ class Comm : protected Pointers {
|
||||
double cutghost[3]; // cutoffs used for acquiring ghost atoms
|
||||
double cutghostuser; // user-specified ghost cutoff
|
||||
int ***grid2proc; // which proc owns i,j,k loc in 3d grid
|
||||
int nthreads; // OpenMP threads per MPI process
|
||||
|
||||
Comm(class LAMMPS *);
|
||||
virtual ~Comm();
|
||||
|
||||
@ -1123,6 +1123,23 @@ void Input::package()
|
||||
if (!lmp->cuda)
|
||||
error->all("Package cuda command without USER-CUDA installed");
|
||||
lmp->cuda->accelerator(narg-1,&arg[1]);
|
||||
|
||||
} else if (strcmp(arg[0],"gpu") == 0) {
|
||||
char **fixarg = new char*[2+narg];
|
||||
fixarg[0] = "package_gpu";
|
||||
fixarg[1] = "all";
|
||||
fixarg[2] = "GPU";
|
||||
for (int i = 1; i < narg; i++) fixarg[i+2] = arg[i];
|
||||
modify->allow_early_fix = 1;
|
||||
modify->add_fix(2+narg,fixarg,NULL);
|
||||
modify->allow_early_fix = 0;
|
||||
delete [] fixarg;
|
||||
|
||||
} else if (strcmp(arg[0],"omp") == 0) {
|
||||
if (narg != 2) error->all("Illegal package command");
|
||||
comm->nthreads = atoi(arg[1]);
|
||||
if (comm->nthreads < 1) error->all("Illegal package command");
|
||||
|
||||
} else error->all("Illegal package command");
|
||||
}
|
||||
|
||||
|
||||
@ -94,6 +94,8 @@ Modify::Modify(LAMMPS *lmp) : Pointers(lmp)
|
||||
id_restart_peratom = style_restart_peratom = NULL;
|
||||
index_restart_peratom = NULL;
|
||||
|
||||
allow_early_fix = 0;
|
||||
|
||||
ncompute = maxcompute = 0;
|
||||
compute = NULL;
|
||||
}
|
||||
|
||||
@ -33,6 +33,8 @@ class Modify : protected Pointers {
|
||||
int nfix_restart_global; // stored fix global info from restart file
|
||||
int nfix_restart_peratom; // stored fix peratom info from restart file
|
||||
|
||||
int allow_early_fix; // 1 if allow fix creation at start of script
|
||||
|
||||
class Fix **fix; // list of fixes
|
||||
int *fmask; // bit mask for when each fix is applied
|
||||
|
||||
|
||||
Reference in New Issue
Block a user