Skip to content

Commit

Permalink
fix: Close the libfabric domain before closing the fabric
Browse files Browse the repository at this point in the history
Signed-off-by: Raghu Raja <[email protected]>
  • Loading branch information
rajachan committed Feb 29, 2024
1 parent 76fd368 commit a7a09e7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/nccl_ofi_rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -5819,9 +5819,15 @@ static void release_device_ofi_resources(nccl_net_ofi_rdma_device_t *device)
nccl_net_ofi_rdma_device_rail_t *end = device->device_rails + device->num_rails;

for (; begin != end; ++begin) {
if (begin->info) fi_freeinfo(begin->info);
if (begin->fabric) fi_close(&begin->fabric->fid);
if (begin->domain) fi_close(&begin->domain->fid);
if (begin->domain) {
fi_close(&begin->domain->fid);
}
if (begin->fabric) {
fi_close(&begin->fabric->fid);
}
if (begin->info) {
fi_freeinfo(begin->info);
}
}
}

Expand Down

0 comments on commit a7a09e7

Please sign in to comment.