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

[WIP]Call WriteJobInfo for openpmd diagnostics #4360

Open
wants to merge 8 commits into
base: development
Choose a base branch
from

Conversation

dpgrote
Copy link
Member

@dpgrote dpgrote commented Oct 10, 2023

This PR has been rewritten to write out the job info as attributes in the openpmd file. This makes the attributes directly accessible from the Python interface.

Todo - is there a nice way to write out the input parameters to the openpmd file? They could be written out as attributes also, but that is a large number of attributes and would make it hard to find others. Is there a way to write out a dictionary?

@dpgrote dpgrote added component: openPMD openPMD I/O component: diagnostics all types of outputs labels Oct 10, 2023
@ax3l ax3l self-requested a review October 10, 2023 23:21
@ax3l ax3l self-assigned this Oct 10, 2023
@ax3l ax3l requested a review from WeiqunZhang October 11, 2023 18:37
@ax3l
Copy link
Member

ax3l commented Oct 11, 2023

Sounds good, @dpgrote we could also add more of this info as attributes to openPMD diags.
We can add arbitrary attributes we like to our files (does not have to be standardized).

virtual ~FlushFormat() {}

/** Write general info of the run into the plotfile */
void WriteJobInfo(const std::string& dir) const;
Copy link
Member

Choose a reason for hiding this comment

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

@dpgrote I wonder if this should be written by full diagnostics at all - or instead rather like the warpx_used_inputs file just in general, when the simulation starts?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. I like this kind of thing to be written out in the same place as the diagnostics so that it is associated with the output of the simulation. If this is written at the startup, the code would have to figure out where the diagnostics will be written.

@ax3l ax3l requested a review from atmyers October 11, 2023 18:42
@dpgrote
Copy link
Member Author

dpgrote commented Oct 11, 2023

Writing out this info as attributes in the openPMD data file is probably a better idea, so that it could be accessed in that standard way. This could include all of the input parameters as well which would be useful. I submitted this PR as a quick way to have this data accessible to see if anyone was interested. I needed it in one case so thought I would submit it. I do notice that the way this is setup for openPMD, this file will be written out and overwritten each time the diagnostics are written out.

@dpgrote dpgrote changed the title Call WriteJobInfo for openpmd diagnostics [WIP]Call WriteJobInfo for openpmd diagnostics Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: diagnostics all types of outputs component: openPMD openPMD I/O
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants