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

Add application-specific information to phase (e.g., timesteps) in JSON output #2171

Closed
lifflander opened this issue Jun 28, 2023 · 5 comments · Fixed by #2199
Closed

Add application-specific information to phase (e.g., timesteps) in JSON output #2171

lifflander opened this issue Jun 28, 2023 · 5 comments · Fixed by #2199
Assignees

Comments

@lifflander
Copy link
Collaborator

What Needs to be Done?

We want to be able to match up timesteps in NimbleSM with phases IDs.

@nlslatt
Copy link
Collaborator

nlslatt commented Oct 10, 2023

I think we should add a new std::unordered_map<PhaseType, std::shared_ptr<nlohmann::json>> to LBDataHolder that holds the phase-level (i.e., not object-specific) user-defined json. We should dump the string for the appropriate phase into the json file within a user_defined block alongside the phase id, tasks, and communication that are already in the json file for each phase. Avoid use of the initializer list constructor for json strings.

@nlslatt
Copy link
Collaborator

nlslatt commented Oct 10, 2023

We still need to figure out a good interface for this.

@nlslatt
Copy link
Collaborator

nlslatt commented Oct 11, 2023

@lifflander @nmm0 Any thoughts on an interface to this?

@lifflander
Copy link
Collaborator Author

@JacobDomagala I think for this issue we should add a new interface to the PhaseManager that can add user-defined data:

thePhase()->addUserDefinedData(phase_id, key, value)

For this to output correctly to file, we need key and value to be jsonable. We should store this data in the LBDataHolder by phase_id. We need to add both readers and writers for this in the toJson and the constructor I think for LBDataHolder.

@nlslatt
Copy link
Collaborator

nlslatt commented Nov 7, 2023

@nmm0 The ability to add user-defined phase-level information (like t or dt from the application) is now on develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants