Skip to content

Commit 6276d4e

Browse files
authored
minor: variable renaming
1 parent 6bfd2e1 commit 6276d4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pylops_mpi/utils/_nccl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ def initialize_nccl_comm() -> nccl.NcclCommunicator:
110110

111111
# Create a communicator for ranks on the same node
112112
node_comm = comm.Split_type(MPI.COMM_TYPE_SHARED)
113-
ranks_on_node = node_comm.Get_size()
113+
size_node = node_comm.Get_size()
114114

115115
device_id = int(
116116
os.environ.get("OMPI_COMM_WORLD_LOCAL_RANK")
117-
or (rank % ranks_on_node) % cp.cuda.runtime.getDeviceCount()
117+
or (rank % size_node) % cp.cuda.runtime.getDeviceCount()
118118
)
119119
cp.cuda.Device(device_id).use()
120120

0 commit comments

Comments
 (0)