Skip to content

Conversation

steffi7574
Copy link
Member

  1. Compute trajectory output only if requested in the config. The configuration string is parsed in the constructor of the Output class, which stores booleans to determine which output was requested by the user. If booleans are true, the 0-th petsc rank opens the files writes the data per timestep, and closes the files. Note that the computation of reduced output values per oscillator (expected Energy and population) require an MPI allreduce over petsc ranks, hence all petsc ranks need to participate in the computation, whereas only the 0-th rank writes them to the open file.

  2. Rename *DataFiles to *TrajectoryDataFiles to make it more clear that those relate to data written at each time step.

Previously, trajectory output for the expected energy level and the
population were computed even though they were not written to files,
which increases compute time because this is done at each time step.
Now, the values are only computed if the user had requested this output
in the configuration file.

The configuration string is parsed in the constructor of the Output
class, which stores booleans to determine which output was requested by
the user. If booleans are true, the 0-th petsc rank opens the files,
writes the data per timestep, and closes the files.

Note that computing reduced output values per oscillator require an MPI
allreduce over all petsc ranks. Hence, all petsc ranks need to compute
the output whereas only the 0-th rank writes them to the open file.
@steffi7574 steffi7574 requested a review from tdrwenski June 12, 2025 20:43
@tdrwenski tdrwenski merged commit cd648a8 into main Jun 13, 2025
10 checks passed
@tdrwenski tdrwenski deleted the bugfix-output branch June 13, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants