Skip to content

Commit 09fd7a1

Browse files
committed
opal/common/ofi: match openfabrics device by uuid and osname
This patch fixes a bug in device matching. uuid alone is not sufficient to match openfabrics devices, and therefore we need to also match osname. Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
1 parent 16e0752 commit 09fd7a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

opal/mca/common/ofi/common_ofi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,10 @@ static bool is_near(pmix_device_distance_t *distances,
648648
char lsguid[256], lnguid[256];
649649
int ret;
650650

651+
if (!distances[i].osname || !osdev->name
652+
|| strcmp(distances[i].osname, osdev->name))
653+
continue;
654+
651655
ret = sscanf(distances[i].uuid, "fab://%256s::%256s", lnguid, lsguid);
652656
if (ret != 2)
653657
continue;

0 commit comments

Comments
 (0)