-
Notifications
You must be signed in to change notification settings - Fork 202
[WIP]Call WriteJobInfo for openpmd diagnostics #4360
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
base: development
Are you sure you want to change the base?
[WIP]Call WriteJobInfo for openpmd diagnostics #4360
Conversation
Sounds good, @dpgrote we could also add more of this info as attributes to openPMD diags. |
virtual ~FlushFormat() {} | ||
|
||
/** Write general info of the run into the plotfile */ | ||
void WriteJobInfo(const std::string& dir) const; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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. |
for more information, see https://pre-commit.ci
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?