From 1f19be90b8e714ce5b1abe84afadc40d747bd6cc Mon Sep 17 00:00:00 2001 From: sjplimp Date: Wed, 1 Jun 2011 17:34:26 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6287 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/input.cpp | 14 +++++--------- src/lammps.cpp | 16 +++++----------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index 004cb22237..60ea2615d9 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1249,24 +1249,20 @@ void Input::special_bonds() void Input::suffix() { - if (narg != 1) error->all("Illegal package command"); - + if (narg != 1) error->all("Illegal suffix command"); + if (strcmp(arg[0],"off") == 0) lmp->suffix_enable = 0; else if (strcmp(arg[0],"on") == 0) lmp->suffix_enable = 1; - else if (strcmp(arg[0],"opt") == 0 || strcmp(arg[0],"gpu") == 0 || - strcmp(arg[0],"cuda") == 0) { + else { delete [] lmp->suffix; int n = strlen(arg[0]) + 1; lmp->suffix = new char[n]; strcpy(lmp->suffix,arg[0]); lmp->suffix_enable = 1; - + if (!lmp->cuda && strcmp(lmp->suffix,"cuda") == 0) error->all("Cannot use suffix cuda without USER-CUDA installed"); - if (lmp->cuda && strcmp(lmp->suffix,"cuda") != 0 && me == 0) - error->warning("Non-cuda suffix used with USER-CUDA mode enabled"); - - } else error->all("Illegal suffix command"); + } } /* ---------------------------------------------------------------------- */ diff --git a/src/lammps.cpp b/src/lammps.cpp index 6c3364fe88..05f7670bf3 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -104,15 +104,11 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) } else if (strcmp(arg[iarg],"-suffix") == 0 || strcmp(arg[iarg],"-sf") == 0) { if (iarg+2 > narg) error->universe_all("Invalid command-line argument"); - if (strcmp(arg[iarg+1],"opt") == 0 || - strcmp(arg[iarg+1],"gpu") == 0 || - strcmp(arg[iarg+1],"cuda") == 0) { - delete [] suffix; - int n = strlen(arg[iarg+1]) + 1; - suffix = new char[n]; - strcpy(suffix,arg[iarg+1]); - suffix_enable = 1; - } + delete [] suffix; + int n = strlen(arg[iarg+1]) + 1; + suffix = new char[n]; + strcpy(suffix,arg[iarg+1]); + suffix_enable = 1; iarg += 2; } else error->universe_all("Invalid command-line argument"); } @@ -305,8 +301,6 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) int me; MPI_Comm_rank(world,&me); if (cuda && me == 0) error->message("USER-CUDA mode is enabled"); - if (cuda && suffix && strcmp(suffix,"cuda") != 0 && me == 0) - error->warning("Non-cuda suffix used with USER-CUDA mode enabled"); // allocate input class now that MPI is fully setup