Added check for domain decomposition and shells.
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Wed, 25 Jun 2014 07:06:30 +0000 (09:06 +0200)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Wed, 25 Jun 2014 11:51:39 +0000 (13:51 +0200)
Fixes #1376 in as much as that it prevents incorrect calculations.
Can be left out when merging to 5.0 that does not support
particle decomposition. In 5.0 we can write a message about OpenMP
if that works with shells.
Change-Id: Ic07ae70cd3cd5298b6b2d579719da4d267b2d8fb

src/kernel/md.c

index c9415eee962b465f76003d59b269d30f7b4ef0c7..4c4a88c174dbd8b47337a13fed1d23c3dadf4c76 100644 (file)
@@ -351,6 +351,10 @@ double do_md(FILE *fplog, t_commrec *cr, int nfile, const t_filenm fnm[],
     {
         gmx_fatal(FARGS, "You have nstcalcenergy set to a value (%d) that is different from 1.\nThis is not supported in combinations with shell particles.\nPlease make a new tpr file.", ir->nstcalcenergy);
     }
+    if (shellfc && DOMAINDECOMP(cr))
+    {
+        gmx_fatal(FARGS, "In order to run parallel simulations with shells you need to use the -pd flag to mdrun.");
+    }
     if (shellfc && ir->eI == eiNM)
     {
         /* Currently shells don't work with Normal Modes */