DARMA-tasking / vt

DARMA/vt => Virtual Transport
Other
35 stars 9 forks source link

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

Closed lifflander closed 12 months ago

lifflander commented 1 year ago

What Needs to be Done?

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

nlslatt commented 1 year ago

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 commented 1 year ago

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

nlslatt commented 1 year ago

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

lifflander commented 1 year ago

@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 commented 12 months ago

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