Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Added wall time/step metric to progress
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Nov 29, 2022
1 parent 8b10f65 commit 1b8a91f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/swiftest/swiftest/simulation_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ def _type_scrub(output_data):
post_message += f" nplm: {self.data['nplm'].values[0]}"
if self.param['ENERGY']:
post_message += f" dL/L0: {0.0:.5e} dE/|E0|: {0.0:+.5e}"
post_message += f" Wall time / step: {0.0:.5e} s"
pbar = tqdm(total=noutput, desc=pre_message, postfix=post_message, bar_format='{l_bar}{bar}{postfix}')
try:
with subprocess.Popen(shlex.split(cmd),
Expand All @@ -412,6 +413,7 @@ def _type_scrub(output_data):
post_message += f" dL/L0: {output_data['LTOTERR']:.5e}"
if "ETOTERR" in output_data:
post_message += f" dE/|E0|: {output_data['ETOTERR']:+.5e}"
post_message += f" Wall time / step: {output_data['WTPS']:.5e} s"
interval = output_data['ILOOP'] - iloop
if interval > 0:
pbar.update(interval)
Expand Down

0 comments on commit 1b8a91f

Please sign in to comment.