Skip to content

Commit

Permalink
Backport PR yt-project#4875: BUG: create duplicate of MPI communicato…
Browse files Browse the repository at this point in the history
…r, to avoid double comm.Free
  • Loading branch information
matthewturk authored and meeseeksmachine committed Apr 26, 2024
1 parent 785befa commit b9d21e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yt/utilities/parallel_tools/parallel_analysis_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def enable_parallelism(suppress_logging=False, communicator=None):

# if no communicator specified, set to COMM_WORLD
if communicator is None:
communicator = MPI.COMM_WORLD
communicator = MPI.COMM_WORLD.Dup()
else:
communicator = communicator.Dup()

parallel_capable = communicator.size > 1
if not parallel_capable:
Expand Down

0 comments on commit b9d21e3

Please sign in to comment.