Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaohanZhangCMU committed Oct 30, 2024
1 parent cdd3472 commit 00fa94e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions streaming/base/shared/prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _check_and_find(streams_local: list[str], streams_remote: list[Union[str, No
"""
prefix_int = 0
for prefix_int in _each_prefix_int():
name = _get_path(prefix_int, LOCALS)
name = _get_path(prefix_int, shm_name)

# Check if any shared memory filelocks exist for the current prefix
try:
Expand All @@ -130,7 +130,7 @@ def _check_and_find(streams_local: list[str], streams_remote: list[Union[str, No
except PermissionError:
continue
except FileNotFoundError:
if not local_leader:
if not local_leader and shm_name == LOCALS:
raise RuntimeError(f'Internal error: shared memory prefix was not registered by ' +
f'local leader. This may be because you specified ' +
f'different ``local`` parameters from different ranks.')
Expand Down Expand Up @@ -239,7 +239,7 @@ def get_shm_prefix(streams_local: list[str],
streams_remote,
shm_name=shm_name,
local_leader=False,
retry=2) for shm_name in SHM_TO_CLEAN
retry=1) for shm_name in SHM_TO_CLEAN
])
name = _get_path(prefix_int, LOCALS)
shm = SharedMemory(name, False)
Expand Down

0 comments on commit 00fa94e

Please sign in to comment.