Skip to content

Commit

Permalink
when turning mpi off, don't broadcast if mpi was never enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Apr 16, 2024
1 parent 01e109c commit 8df9aca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phoebe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def on(self, nprocs=None):
self.nprocs = nprocs

def off(self):
if self.within_mpirun and self.myrank == 0:
if self.within_mpirun and self.enabled and self.myrank == 0:
self.comm.bcast({'worker_command': 'release'}, root=0)

self._enabled = False
Expand Down

0 comments on commit 8df9aca

Please sign in to comment.