git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6196 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -17,7 +17,7 @@ PACKAGE = asphere class2 colloid dipole dsmc gpu granular \
|
|||||||
kspace manybody meam molecule opt peri poems reax replica \
|
kspace manybody meam molecule opt peri poems reax replica \
|
||||||
shock srd xtc
|
shock srd xtc
|
||||||
|
|
||||||
PACKUSER = user-ackland user-atc user-cd-eam user-cg-cmm user-cuda user-eff \
|
PACKUSER = user-ackland user-atc user-cd-eam user-cg-cmm user-eff \
|
||||||
user-ewaldn user-imd user-reaxc user-smd
|
user-ewaldn user-imd user-reaxc user-smd
|
||||||
|
|
||||||
PACKALL = $(PACKAGE) $(PACKUSER)
|
PACKALL = $(PACKAGE) $(PACKUSER)
|
||||||
|
|||||||
@ -289,7 +289,7 @@ void Atom::create_avec(const char *style, int narg, char **arg, char *suffix)
|
|||||||
AtomVec *Atom::new_avec(const char *style, int narg, char **arg,
|
AtomVec *Atom::new_avec(const char *style, int narg, char **arg,
|
||||||
char *suffix, int &sflag)
|
char *suffix, int &sflag)
|
||||||
{
|
{
|
||||||
if (suffix) {
|
if (suffix && lmp->offaccel == 0) {
|
||||||
sflag = 1;
|
sflag = 1;
|
||||||
char estyle[256];
|
char estyle[256];
|
||||||
sprintf(estyle,"%s/%s",style,suffix);
|
sprintf(estyle,"%s/%s",style,suffix);
|
||||||
|
|||||||
@ -144,7 +144,7 @@ void Force::create_pair(const char *style, char *suffix)
|
|||||||
|
|
||||||
Pair *Force::new_pair(const char *style, char *suffix, int &sflag)
|
Pair *Force::new_pair(const char *style, char *suffix, int &sflag)
|
||||||
{
|
{
|
||||||
if (suffix) {
|
if (suffix && lmp->offaccel == 0) {
|
||||||
sflag = 1;
|
sflag = 1;
|
||||||
char estyle[256];
|
char estyle[256];
|
||||||
sprintf(estyle,"%s/%s",style,suffix);
|
sprintf(estyle,"%s/%s",style,suffix);
|
||||||
|
|||||||
@ -811,6 +811,13 @@ void Input::accelerator()
|
|||||||
if (strcmp(lmp->asuffix,arg[0]) != 0)
|
if (strcmp(lmp->asuffix,arg[0]) != 0)
|
||||||
error->all("Accelerator command requires matching command-line -a switch");
|
error->all("Accelerator command requires matching command-line -a switch");
|
||||||
|
|
||||||
|
if (strcmp(arg[0],"off") == 0) {
|
||||||
|
if (narg != 1) error->all("Illegal accelerator command");
|
||||||
|
lmp->offaccel = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lmp->offaccel = 0;
|
||||||
if (strcmp(arg[0],"cuda") == 0) lmp->cuda->accelerator(narg-1,&arg[1]);
|
if (strcmp(arg[0],"cuda") == 0) lmp->cuda->accelerator(narg-1,&arg[1]);
|
||||||
else error->all("Illegal accelerator command");
|
else error->all("Illegal accelerator command");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,8 +58,9 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
|
|||||||
int screenflag = 0;
|
int screenflag = 0;
|
||||||
int logflag = 0;
|
int logflag = 0;
|
||||||
accelerator = NOACCEL;
|
accelerator = NOACCEL;
|
||||||
cuda = NULL;
|
|
||||||
asuffix = NULL;
|
asuffix = NULL;
|
||||||
|
offaccel = 0;
|
||||||
|
cuda = NULL;
|
||||||
|
|
||||||
int iarg = 1;
|
int iarg = 1;
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,7 @@ class LAMMPS {
|
|||||||
|
|
||||||
int accelerator; // accelerator flag
|
int accelerator; // accelerator flag
|
||||||
char *asuffix; // accelerator suffix
|
char *asuffix; // accelerator suffix
|
||||||
|
int offaccel; // 1 if accelerator flag currently disabled
|
||||||
class Cuda *cuda; // CUDA accelerator class
|
class Cuda *cuda; // CUDA accelerator class
|
||||||
|
|
||||||
LAMMPS(int, char **, MPI_Comm);
|
LAMMPS(int, char **, MPI_Comm);
|
||||||
|
|||||||
@ -640,7 +640,7 @@ void Modify::add_fix(int narg, char **arg, char *suffix)
|
|||||||
|
|
||||||
int success = 0;
|
int success = 0;
|
||||||
|
|
||||||
if (suffix) {
|
if (suffix && lmp->offaccel == 0) {
|
||||||
char estyle[256];
|
char estyle[256];
|
||||||
sprintf(estyle,"%s/%s",arg[2],suffix);
|
sprintf(estyle,"%s/%s",arg[2],suffix);
|
||||||
success = 1;
|
success = 1;
|
||||||
@ -784,7 +784,7 @@ void Modify::add_compute(int narg, char **arg, char *suffix)
|
|||||||
|
|
||||||
int success = 0;
|
int success = 0;
|
||||||
|
|
||||||
if (suffix) {
|
if (suffix && lmp->offaccel == 0) {
|
||||||
char estyle[256];
|
char estyle[256];
|
||||||
sprintf(estyle,"%s/%s",arg[2],suffix);
|
sprintf(estyle,"%s/%s",arg[2],suffix);
|
||||||
success = 1;
|
success = 1;
|
||||||
|
|||||||
@ -221,7 +221,7 @@ void Update::create_integrate(int narg, char **arg, char *suffix)
|
|||||||
void Update::new_integrate(char *style, int narg, char **arg,
|
void Update::new_integrate(char *style, int narg, char **arg,
|
||||||
char *suffix, int &sflag)
|
char *suffix, int &sflag)
|
||||||
{
|
{
|
||||||
if (suffix) {
|
if (suffix && lmp->offaccel == 0) {
|
||||||
sflag = 1;
|
sflag = 1;
|
||||||
char estyle[256];
|
char estyle[256];
|
||||||
sprintf(estyle,"%s/%s",style,suffix);
|
sprintf(estyle,"%s/%s",style,suffix);
|
||||||
|
|||||||
Reference in New Issue
Block a user