Small fix for g_tune_pme
authorCarsten Kutzner <ckutzne@gwdg.de>
Thu, 20 Dec 2012 12:20:28 +0000 (13:20 +0100)
committerCarsten Kutzner <ckutzne@gwdg.de>
Thu, 20 Dec 2012 12:20:28 +0000 (13:20 +0100)
Setting the "-err" command line flag in g_tune_pme would, in combination with the "-launch" flag
prevent a proper launch of mdrun after tuning since "-err" would also appear on the mdrun
command line. This patch removes the "-err" switch from the mdrun arguments list.

Change-Id: Idb2e3cf2e4eca587180b932faccc227be171b3d7

src/tools/gmx_tune_pme.c

index 574a85bc5679bf477c3387dc34604c6ba6a4b03d..4995d9ca263b9ecd377dc017423386b6afb8ff41 100644 (file)
@@ -1567,15 +1567,14 @@ static void check_input(
 /* Returns TRUE when "opt" is needed at launch time */
 static gmx_bool is_launch_file(char *opt, gmx_bool bSet)
 {
-    /* Apart from the input .tpr we need all options that were set
+    /* Apart from the input .tpr and the error log we need all options that were set
      * on the command line and that do not start with -b */
-    if (0 == strncmp(opt,"-b", 2) || 0 == strncmp(opt,"-s", 2))
+    if (0 == strncmp(opt,"-b", 2) || 0 == strncmp(opt,"-s", 2) || 0 == strncmp(opt,"-err", 4))
+    {
         return FALSE;
+    }
 
-    if (bSet)
-        return TRUE;
-    else
-        return FALSE;
+    return bSet;
 }