Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Jun 25, 2024
1 parent 0052e21 commit 4f6a814
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion meshmode/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,11 @@ def membership_list_to_map(
stored as a sorted :class:`numpy.ndarray`).
"""
from pytools import unique

# FIXME: not clear why the sorted() call is necessary here
return {
entry: np.where(membership_list == entry)[0]
for entry in unique(list(membership_list))}
for entry in sorted(unique(membership_list))}


# FIXME: Move somewhere else, since it's not strictly limited to distributed?
Expand Down
2 changes: 1 addition & 1 deletion test/test_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def _test_connected_parts(mpi_comm, connected_parts):
for i_remote_part in range(num_parts):
if all_connected_masks[i_remote_part][mpi_comm.rank]:
parts_connected_to_me.add(i_remote_part)
assert parts_connected_to_me == connected_parts
assert parts_connected_to_me == set(connected_parts)


# TODO
Expand Down

0 comments on commit 4f6a814

Please sign in to comment.