From bfe273296038387e18dcadbdfe1d84fd429abd37 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Mon, 30 Oct 2017 18:13:07 +0100 Subject: [PATCH] Fix thread-MPI rank choice for orientation restraints Only a single rank is supported, so that must be what the thread-MPI code will choose. There's another check later on that catches the multi-rank MPI case. Change-Id: I9ccf5fbe958fc0c004a89ebc92a352460e9cba1f --- src/programs/mdrun/resource-division.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/programs/mdrun/resource-division.cpp b/src/programs/mdrun/resource-division.cpp index 7d489bb013..20efcca11c 100644 --- a/src/programs/mdrun/resource-division.cpp +++ b/src/programs/mdrun/resource-division.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2015,2016, by the GROMACS development team, led by + * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -54,6 +54,7 @@ #include "gromacs/mdtypes/commrec.h" #include "gromacs/mdtypes/inputrec.h" #include "gromacs/mdtypes/md_enums.h" +#include "gromacs/topology/mtop_util.h" #include "gromacs/topology/topology.h" #include "gromacs/utility/fatalerror.h" #include "gromacs/utility/gmxassert.h" @@ -365,6 +366,8 @@ int get_nthreads_mpi(const gmx_hw_info_t *hwinfo, checker.applyConstraint(inputrec->eI == eiLBFGS, "L-BFGS minimization"); checker.applyConstraint(inputrec->coulombtype == eelEWALD, "Plain Ewald electrostatics"); checker.applyConstraint(doMembed, "Membrane embedding"); + bool useOrientationRestraints = (gmx_mtop_ftype_count(mtop, F_ORIRES) > 0); + checker.applyConstraint(useOrientationRestraints, "Orientation restraints"); if (checker.mustUseOneRank()) { std::string message = checker.getMessage(); -- 2.11.4.GIT