From: Szilárd Páll Date: Tue, 23 Mar 2021 13:44:45 +0000 (+0000) Subject: Fix deviceIdsAssigned() to return a unique list of IDs X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=af5010c5ff9b6ea9f5dad7836a9887c24a86afed;p=alexxy%2Fgromacs.git Fix deviceIdsAssigned() to return a unique list of IDs The method originally returned the rank's task-to-device mapping rather than the unique list of devices that have been assigned tasks. When #ranks > #devices this list contains duplicate device IDs. Due to the changes made in e2a2fe80 the vector returned by deviceIdsAssigned() was passed to setupGpuDevicePeerAccess() which results in redundant attempts to repeatedly enable peer access for the same device pairs. Refs #3980 --- diff --git a/src/gromacs/taskassignment/taskassignment.cpp b/src/gromacs/taskassignment/taskassignment.cpp index a9256ba27c..34acebbd26 100644 --- a/src/gromacs/taskassignment/taskassignment.cpp +++ b/src/gromacs/taskassignment/taskassignment.cpp @@ -265,7 +265,7 @@ GpuTaskAssignments GpuTaskAssignmentsBuilder::build(const gmx::ArrayRef taskAssignmentOnRanksOfThisNode; - std::vector deviceIdsAssigned; + std::vector deviceIdAssignment; try { // Use the GPU IDs from the user if they supplied @@ -320,7 +320,7 @@ GpuTaskAssignments GpuTaskAssignmentsBuilder::build(const gmx::ArrayRef deviceIdsAssigned() { return deviceIdsAssigned_; } };