Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix errors in I/O #818

Merged
merged 5 commits into from
Nov 21, 2022
Merged

Conversation

SeverinDiederichs
Copy link
Member

@SeverinDiederichs SeverinDiederichs commented Nov 19, 2022

This PR resolves #815

As @AlexanderSinn pointed out, an openPMD::series is appended to the outputSeries vector at each time step. This vector was intended to be a vector over levels.

In this PR, the outputSeries vector is initialized once per level and per time step, and the series is reset at the end of the time step. This removes the unwanted openPMD series, which then give errors since they were never used, but also the problem that the IO of prematurely exited simulation was unusable. Now, it is usable for the finished time steps. Note, that it will still give an error if half-written time steps are in the directory. Still, with this PR it is possible to copy iterations to other folders and analyze them before the full run is finished.

  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

@SeverinDiederichs SeverinDiederichs added bug Something isn't working component: diagnostics About any types of diagnostics labels Nov 19, 2022
Copy link
Member

@MaxThevenet MaxThevenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! I had a suggestion of a few lines, I couldn't do it through GH, comments, so I opened a small PR to your branch instead.

Copy link
Member

@MaxThevenet MaxThevenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR!

@MaxThevenet MaxThevenet merged commit c96a1fc into Hi-PACE:development Nov 21, 2022
@SeverinDiederichs SeverinDiederichs deleted the fix_io_bugs2 branch November 21, 2022 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: diagnostics About any types of diagnostics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix diagnostics
3 participants