Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
quick fix in creating sub-communicator for hierarchy memory type
Browse files Browse the repository at this point in the history
  • Loading branch information
linhu-nv authored and zhuofan1123 committed Oct 8, 2024
1 parent 7680289 commit 5aed03c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/wholememory/memory_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ class hierarchy_wholememory_impl : public wholememory_impl {
#endif
} else {
int world_rank = -1, local_size = -1;
wholememory_communicator_get_size(&world_rank, global_comm);
wholememory_communicator_get_rank(&world_rank, global_comm);
wholememory_communicator_get_local_size(&local_size, global_comm);
wholememory_split_communicator(
&cross_comm_, global_comm, world_rank % local_size, world_rank / local_size);
Expand Down Expand Up @@ -2038,7 +2038,7 @@ wholememory_error_code_t create_wholememory(wholememory_handle_t* wholememory_ha
#endif
} else {
int world_rank = -1, local_size = -1;
wholememory_communicator_get_size(&world_rank, comm);
wholememory_communicator_get_rank(&world_rank, comm);
wholememory_communicator_get_local_size(&local_size, comm);
wholememory_split_communicator(
&local_comm, comm, world_rank / local_size, world_rank % local_size);
Expand Down

0 comments on commit 5aed03c

Please sign in to comment.