Merge branch release-2016 into release-2018
authorMark Abraham <mark.j.abraham@gmail.com>
Tue, 19 Dec 2017 13:23:59 +0000 (00:23 +1100)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 20 Dec 2017 11:42:06 +0000 (22:42 +1100)
Change-Id: I2c3aa754de1b8ff971854740da9815fff8a41f0d

1  2 
src/gromacs/mdlib/sim_util.cpp
src/gromacs/taskassignment/resourcedivision.cpp

index b746326ac9e4c8228240e6de43b15691610fece4,7c71829401c803004a47432df9b579b7c351d196..ee757e41813383d99063be53eb3a16f466be1a9e
@@@ -2724,12 -2582,17 +2724,16 @@@ void finish_run(FILE *fplog, const gmx:
         communication deadlocks, we always do the communication for the
         report, even if we've decided not to write the report, because
         how long it takes to finish the run is not important when we've
-        decided not to report on the simulation performance. */
-     bool    printReport = SIMMASTER(cr);
+        decided not to report on the simulation performance.
  
-     if (!walltime_accounting_get_valid_finish(walltime_accounting))
+        Further, we only report performance for dynamical integrators,
+        because those are the only ones for which we plan to
+        consider doing any optimizations. */
+     bool printReport = EI_DYNAMICS(inputrec->eI) && SIMMASTER(cr);
+     if (printReport && !walltime_accounting_get_valid_finish(walltime_accounting))
      {
 -        md_print_warn(cr, fplog,
 -                      "Simulation ended prematurely, no performance report will be written.");
 +        GMX_LOG(mdlog.warning).asParagraph().appendText("Simulation ended prematurely, no performance report will be written.");
          printReport = false;
      }
  
index a195d6050159895129f61a01e6e7531c70530d20,89fe730f805616d81190d486fb4082de073c0cc4..015c8b68575771e7f078ccbcaa897aef394b21c3
@@@ -216,6 -193,14 +216,14 @@@ gmx_unused static int get_tmpi_omp_thre
       */
      if (ngpu > 0)
      {
 -        if (hw_opt->nthreads_omp > 0)
++        if (hw_opt.nthreads_omp > 0)
+         {
+             /* In this case it is unclear if we should use 1 rank per GPU
+              * or more or less, so we require also setting the number of ranks.
+              */
+             gmx_fatal(FARGS, "When using GPUs, setting the number of OpenMP threads without specifying the number of ranks can lead to conflicting demands. Please specify the number of thread-MPI ranks as well (option -ntmpi).");
+         }
          nrank = ngpu;
  
          /* When the user sets nthreads_omp, we can end up oversubscribing CPU cores