Skip to content

Commit 00ce678

Browse files
committed
More warning workarounds
1 parent f1e7a02 commit 00ce678

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/gromacs/fileio/trxio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ bool read_next_frame(const gmx_output_env_t* oenv, t_trxstatus* status, t_trxfra
844844

845845
const bool buildIsDoublePrecision = GMX_DOUBLE;
846846
const bool compareTimesAsDouble =
847-
buildIsDoublePrecision && (status->fio ? gmx_fio_is_double(status->fio) : false);
847+
((buildIsDoublePrecision) && (status->fio ? gmx_fio_is_double(status->fio) : false);
848848
do
849849
{
850850
clear_trxframe(fr, FALSE);

src/gromacs/hardware/detecthardware.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static DeviceDetectionResult detectAllDeviceInformation(const PhysicalNodeCommun
149149
* and send the information to the other ranks over MPI. This
150150
* avoids creating a start-up bottleneck with each MPI rank on a
151151
* node making the same GPU API calls. */
152-
constexpr bool allRanksMustDetectGpus = (GMX_GPU_OPENCL != 0 || GMX_GPU_SYCL != 0);
152+
constexpr bool allRanksMustDetectGpus = ((GMX_GPU_OPENCL != 0) || (GMX_GPU_SYCL != 0));
153153
bool gpusCanBeDetected = false;
154154
if (isMainRankOfPhysicalNode || allRanksMustDetectGpus)
155155
{

src/gromacs/mdrun/runner.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,14 @@ static DevelopmentFeatureFlags manageDevelopmentFeatures(const gmx::MDLogger& md
316316
(pmeRunMode == PmeRunMode::GPU || pmeRunMode == PmeRunMode::Mixed)
317317
&& ((numRanksPerSimulation > 1 && numPmeRanksPerSimulation == 0)
318318
|| numPmeRanksPerSimulation > 1);
319-
const bool pmeGpuDecompositionSupported =
320-
canUseGpuAwareMpi && GpuConfigurationCapabilities::PpPmeDirectComm
321-
&& ((GpuConfigurationCapabilities::PmeDecomposition && pmeRunMode == PmeRunMode::GPU)
322-
|| (GpuConfigurationCapabilities::Pme && pmeRunMode == PmeRunMode::Mixed));
319+
const bool runConfigurationCouldUsePmeDecompositionOnGpu =
320+
(GpuConfigurationCapabilities::PmeDecomposition && pmeRunMode == PmeRunMode::GPU);
321+
const bool runConfigurationCouldUsePmeDecompositionOnCpu =
322+
(GpuConfigurationCapabilities::Pme && pmeRunMode == PmeRunMode::Mixed);
323+
const bool runConfigurationCouldUsePmeDecomposition =
324+
(runConfigurationCouldUsePmeDecompositionOnGpu || runConfigurationCouldUsePmeDecompositionOnCpu);
325+
const bool pmeGpuDecompositionSupported = canUseGpuAwareMpi && GpuConfigurationCapabilities::PpPmeDirectComm
326+
&& runConfigurationCouldUsePmeDecomposition;
323327

324328
const bool forcePmeGpuDecomposition = std::getenv("GMX_GPU_PME_DECOMPOSITION") != nullptr;
325329

0 commit comments

Comments
 (0)