Fix deviceIdsAssigned() to return a unique list of IDs
authorSzilárd Páll <pall.szilard@gmail.com>
Tue, 23 Mar 2021 13:44:45 +0000 (13:44 +0000)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 23 Mar 2021 13:44:45 +0000 (13:44 +0000)
commitaf5010c5ff9b6ea9f5dad7836a9887c24a86afed
tree64e247089f838319ef5d7afb6e17907de2dfb30f
parente726ffa7b85c5cda92d28772a6642e712ae204d7
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
src/gromacs/taskassignment/taskassignment.cpp
src/gromacs/taskassignment/taskassignment.h