xBOUT icon indicating copy to clipboard operation
xBOUT copied to clipboard

Allow reading walltime variables

Open mikekryjak opened this issue 2 years ago • 1 comments

The walltime variables are defined here:

https://github.com/boutproject/BOUT-dev/blob/3d6cb4b7da6605e2d39828f07ece36c8d3886bcd/include/bout/monitor.hxx#L80-L110

They are slightly different in each processor which causes issues with xarray concatenation. For this reason, wall time stats have been dropped from xBOUT at load time so far.

This PR changes this. We read the proc 0 variables and drop the rest. This should be representative of the whole domain as the wtime load should be near identical for each processor anyway.

To keep the change simple, this also keeps three more variables from _BOUT_PER_PROC_VARIABLES which are not particularly useful (PE_XIND, PE_YIND and MYPE). Let me know if you think those should be removed.

Progress:

  • [x] Implement the change and test that it works
  • [ ] Work through pytest to resolve test issues

mikekryjak avatar May 23 '23 11:05 mikekryjak

Hello @mikekryjak! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 223:37: E701 multiple statements on one line (colon)

Line 475:5: E704 multiple statements on one line (def) Line 625:5: E704 multiple statements on one line (def)

pep8speaks avatar Jun 09 '24 16:06 pep8speaks