Fixed -npstring command line argument in g_tune_pme
authorCarsten Kutzner <ckutzne@gwdg.de>
Fri, 14 Jun 2013 12:06:28 +0000 (14:06 +0200)
committerCarsten Kutzner <ckutzne@gwdg.de>
Wed, 26 Jun 2013 08:52:51 +0000 (10:52 +0200)
-npstring <str> is used to let g_tune_pme know how it should specify
the number of MPI processes to the mpirun command (with -np (default) or -n ).
You could provide it, but it actually -np was used in any case.

Change-Id: Ibb807b492dfb05c67628c18b7073092aa983f770

src/tools/gmx_tune_pme.c

index 0563cffa6a824d01744ca2f4dd54a9a900ac02ff..d944f6d40e71e501bbd5cf2f18c168548f1f3465 100644 (file)
@@ -2280,7 +2280,16 @@ int gmx_tune_pme(int argc, char *argv[])
     }
     else
     {
-        sprintf(bbuf, " -np %d ", nnodes);
+        /* This string will be used for MPI runs and will appear after the
+         * mpirun command. */
+        if (strcmp(procstring[0], "none") != 0)
+        {
+            sprintf(bbuf, " %s %d ", procstring[0], nnodes);
+        }
+        else
+        {
+            sprintf(bbuf, " ");
+        }
     }
 
     cmd_np = bbuf;