Skip to content

Commit

Permalink
Merge pull request #11728 from wenduwan/nic_selection_b
Browse files Browse the repository at this point in the history
opal/common/ofi: match openfabrics device by uuid and osname
  • Loading branch information
lrbison committed Jun 6, 2023
2 parents 53ee39b + 2b282c1 commit e1f81c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions opal/mca/common/ofi/common_ofi.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,14 @@ static bool is_near(pmix_device_distance_t *distances,
continue;

for (i = 0; i < num_distances; i++) {
char lsguid[256], lnguid[256];
char lsguid[20], lnguid[20];
int ret;

ret = sscanf(distances[i].uuid, "fab://%256s::%256s", lnguid, lsguid);
if (!distances[i].osname || !osdev->name
|| strcmp(distances[i].osname, osdev->name))
continue;

ret = sscanf(distances[i].uuid, "fab://%19s::%19s", lnguid, lsguid);
if (ret != 2)
continue;
if (nguid && (0 == strcasecmp(lnguid, nguid))) {
Expand Down

0 comments on commit e1f81c6

Please sign in to comment.