Merge remote-tracking branch 'gerrit/release-4-5-patches' into release-4-6
[alexxy/gromacs.git] / src / mdlib / domdec.c
index ecf3ac3c95f08ebed2402249fc634935785f71dc..abed24fd224a3d9d4e818ef2d49db8cb2dbe12ea 100644 (file)
@@ -8257,7 +8257,8 @@ void dd_partition_system(FILE            *fplog,
         /* Print load every nstlog, first and last step to the log file */
         bLogLoad = ((ir->nstlog > 0 && step % ir->nstlog == 0) ||
                     comm->n_load_collect == 0 ||
-                    (step + ir->nstlist > ir->init_step + ir->nsteps));
+                    (ir->nsteps >= 0 &&
+                     (step + ir->nstlist > ir->init_step + ir->nsteps)));
 
         /* Avoid extra communication due to verbose screen output
          * when nstglobalcomm is set.