Fix incorrect warning about only using single core
authorErik Lindahl <erik@kth.se>
Mon, 13 Jul 2015 10:10:29 +0000 (12:10 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Fri, 17 Jul 2015 04:22:06 +0000 (06:22 +0200)
check_resource_division_efficiency() warned that only
a single core could be used, even when one of
thread-MPI or OpenMP support was present, but not both.

Fixes #1776.

Change-Id: I6ac98954c2ef74ed860750627f7a1b9f0710561e

src/programs/mdrun/resource-division.cpp

index 9042aee8a9c860ac8a4399d3abf55c3357de6c8e..6f4e1587ef60204be849280c95c6ea83e792a854 100644 (file)
@@ -576,11 +576,18 @@ void check_resource_division_efficiency(const gmx_hw_info_t *hwinfo,
     /* Check if we have more than 1 physical core, if detected,
      * or more than 1 hardware thread if physical cores were not detected.
      */
+#if !(defined GMX_OPENMP) && !(defined GMX_MPI)
     if ((hwinfo->ncore > 1) ||
         (hwinfo->ncore == 0 && hwinfo->nthreads_hw_avail > 1))
     {
         md_print_warn(cr, fplog, "NOTE: GROMACS was compiled without OpenMP and (thread-)MPI support, can only use a single CPU core\n");
     }
+#else
+    GMX_UNUSED_VALUE(hwinfo);
+    GMX_UNUSED_VALUE(cr);
+    GMX_UNUSED_VALUE(fplog);
+#endif
+
 #endif /* GMX_OPENMP && GMX_MPI */
 }