git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6221 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2011-05-26 22:45:42 +00:00
parent b220fdbcf5
commit ab5592e67b
2 changed files with 7 additions and 11 deletions

View File

@ -808,23 +808,20 @@ void Input::accelerator()
if (domain->box_exist)
error->all("Accelerator command after simulation box is defined");
if (narg < 1) error->all("Illegal accelerator command");
if (!lmp->asuffix || (strcmp(lmp->asuffix,arg[0]) != 0))
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->accelerator = 0;
return;
}
if (strcmp(arg[0],"on") == 0) {
} else if (strcmp(arg[0],"on") == 0) {
if (narg != 1) error->all("Illegal accelerator command");
lmp->accelerator = 1;
return;
}
if (strcmp(arg[0],"cuda") == 0) lmp->cuda->accelerator(narg-1,&arg[1]);
else error->all("Illegal accelerator command");
} else if (strcmp(arg[0],"cuda") == 0) {
if (!lmp->cuda) error->all("Accelerator cuda command without "
"USER-CUDA package installed");
lmp->cuda->accelerator(narg-1,&arg[1]);
} else error->all("Illegal accelerator command");
}
/* ---------------------------------------------------------------------- */

View File

@ -50,8 +50,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
screen = NULL;
logfile = NULL;
// create CUDA class
// cuda = true version if USER-CUDA installed, else dummy
// create CUDA class if USER-CUDA installed, else dummy
cuda = new Cuda(this);
if (!cuda->cuda_exists) {