Skip to content

Commit

Permalink
oops, forgot not everyone does time-parallelism again
Browse files Browse the repository at this point in the history
  • Loading branch information
jshipton committed May 1, 2024
1 parent afb235b commit e76ffe6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gusto/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ def dump(self, state_fields, t, step, initial_steps=None):
completed by a multi-level time scheme. Defaults to None.
"""
output = self.output
if self.ensemble is not None:
write_file = self.ensemble.ensemble_comm.rank == 0
else:
write_file = True

# Diagnostics:
# Compute diagnostic fields
Expand Down Expand Up @@ -726,7 +730,7 @@ def dump(self, state_fields, t, step, initial_steps=None):
# dump fields
self.write_nc_dump(t)

if output.dump_vtus and self.ensemble.ensemble_comm.rank == 0:
if output.dump_vtus and write_file:
# dump fields
self.pvd_dumpfile.write(*self.to_dump)

Expand Down

0 comments on commit e76ffe6

Please sign in to comment.