From 90d9828b356aaa5aeba07424fcc4520ffde4cd2e Mon Sep 17 00:00:00 2001 From: Erik Lindahl Date: Mon, 13 Jul 2015 12:10:29 +0200 Subject: [PATCH] Fix incorrect warning about only using single core 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/programs/mdrun/resource-division.cpp b/src/programs/mdrun/resource-division.cpp index 9042aee8a9..6f4e1587ef 100644 --- a/src/programs/mdrun/resource-division.cpp +++ b/src/programs/mdrun/resource-division.cpp @@ -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 */ } -- 2.22.0