Handle multidir/multisim with single argument correctly
authorErik Lindahl <erik@kth.se>
Thu, 18 Jun 2015 17:26:27 +0000 (19:26 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 20 Jun 2015 17:30:40 +0000 (19:30 +0200)
Mdrun would only initialize the multi option correctly
with more than one argument, which caused mdrun to fail
in strange ways since it looked for topol.tpr in the
current directory instead.

Fixes #1712.

Change-Id: Ib89860fdff5f8523eee6c2f5a068390b8d4e3c8d

src/programs/mdrun/mdrun.cpp

index ec7ec368dc9b680f7467821911f6a5d2be51fae7..ee2806226522a9d471111c6eccccdd6091a6dc6f 100644 (file)
@@ -661,14 +661,14 @@ int gmx_mdrun(int argc, char *argv[])
         gmx_fatal(FARGS, "Replica exchange number of exchanges needs to be positive");
     }
 
-    if (nmultisim > 1)
+    if (nmultisim >= 1)
     {
 #ifndef GMX_THREAD_MPI
         gmx_bool bParFn = (multidir == NULL);
         init_multisystem(cr, nmultisim, multidir, NFILE, fnm, bParFn);
 #else
-        gmx_fatal(FARGS, "mdrun -multi is not supported with the thread library. "
-                  "Please compile GROMACS with MPI support");
+        gmx_fatal(FARGS, "mdrun -multi or -multidir are not supported with the thread-MPI library. "
+                  "Please compile GROMACS with a proper external MPI library.");
 #endif
     }