From e3879a10483bcabd9d753b38862bacf59e9a076a Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 15 Aug 2014 15:35:51 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12332 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/lammps.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lammps.cpp b/src/lammps.cpp index 6f9025a900..c236961a87 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -608,6 +608,8 @@ void LAMMPS::post_create() { if (!suffix_enable) return; + // suffix will always be set if suffix_enable = 1 + if (strcmp(suffix,"gpu") == 0 && !modify->check_package("GPU")) error->all(FLERR,"Using suffix gpu without GPU package installed"); if (strcmp(suffix,"intel") == 0 && !modify->check_package("Intel")) @@ -615,7 +617,10 @@ void LAMMPS::post_create() if (strcmp(suffix,"omp") == 0 && !modify->check_package("OMP")) error->all(FLERR,"Using suffix omp without USER-OMP package installed"); - if (strcmp(suffix2,"omp") == 0 && !modify->check_package("OMP")) { + // suffix2 only currently set by -sf intel + // need to unset if LAMMPS was not built with USER-OMP package + + if (suffix2 && strcmp(suffix2,"omp") == 0 && !modify->check_package("OMP")) { delete [] suffix2; suffix2 = NULL; }