Skip to content

Commit

Permalink
make workers also participate in vmec.run
Browse files Browse the repository at this point in the history
  • Loading branch information
smiet committed Nov 20, 2023
1 parent 025880a commit efa1274
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/simsopt/mhd/boozer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ def run(self):
Run booz_xform on all the surfaces that have been registered.
"""

if (self.mpi is not None) and (not self.mpi.proc0_groups):
logger.info("This proc is skipping Boozer.run since it is not a group leader.")
return

if not self.need_to_run_code:
logger.info("Boozer.run() called but no need to re-run Boozer transformation.")
return
Expand All @@ -126,7 +122,13 @@ def run(self):
logger.info("Preparing to run Boozer transformation. Registry:{}".format(s))

if isinstance(self.equil, Vmec):
#partake in parallel VMEC job
self.equil.run()
#skedaddle if you are not proc0 of your group
if (self.mpi is not None) and (not self.mpi.proc0_groups):
logger.info("This proc is skipping the rest of boozer.run since it is not a group leader.")
return

wout = self.equil.wout # Shorthand

# Get the half-grid points that are closest to the requested values
Expand Down

0 comments on commit efa1274

Please sign in to comment.