Skip to content

Flush outputs (Amp.*, Poten.*, etc.)#40

Open
eirik-kjonstad wants to merge 1 commit into
ispg-group:mainfrom
eirik-kjonstad:flush-outputs
Open

Flush outputs (Amp.*, Poten.*, etc.)#40
eirik-kjonstad wants to merge 1 commit into
ispg-group:mainfrom
eirik-kjonstad:flush-outputs

Conversation

@eirik-kjonstad
Copy link
Copy Markdown
Contributor

@eirik-kjonstad eirik-kjonstad commented May 3, 2026

Suggestion to flush output files (Amp, Poten, etc.) so that we can follow the simulation in real time. Locally, I was seeing my tests running for hundreds of au without showing any lines in the outputs. These changes should make sure we see each timestep in the output files right after the write happens.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 3, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 53.95%. Comparing base (86dd529) to head (008ef9d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/modules/TrajectoryIOModule.f90 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
- Coverage   54.08%   53.95%   -0.13%     
==========================================
  Files          41       41              
  Lines        5985     6016      +31     
  Branches      807      810       +3     
==========================================
+ Hits         3237     3246       +9     
- Misses       2399     2420      +21     
- Partials      349      350       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielhollas
Copy link
Copy Markdown
Member

Thanks, I'll have to think about this, since this will likely slow down simulations with analytical potentials a lot. Note that I think we already flush FMS.out which can be checked that the simulation is progressing. I do agree that it might be useful to print stuff more often in a more typical case of ab initio simulations.

Side note, I am currently on holidays for the next two weeks so will be unlikely to do much reviewing.

@eirik-kjonstad
Copy link
Copy Markdown
Contributor Author

Thanks for the feedback!

Thanks, I'll have to think about this, since this will likely slow down simulations with analytical potentials a lot. Note that I think we already flush FMS.out which can be checked that the simulation is progressing.

That makes sense, and you're right that FMS.out lets you track the progress of the dynamics.

I do agree that it might be useful to print stuff more often in a more typical case of ab initio simulations.

Would an opt-in flag (e.g., flushAllOutputs=.true.) work? Happy to implement it if you think it's worthwhile. For context: on difficult trajectories I've tailed these outputs to verify restart correctness and check sensitivity to tightened thresholds (e.g., reproducibility of Amp and N values). This is especially helpful for CC dynamics, where 10 time steps can be an hour of wall time and early termination can save a lot of time.

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.

3 participants