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

Use MD engine's default frequency to empty the Colvars traj buffer #744

Open
giacomofiorin opened this issue Oct 27, 2024 · 2 comments
Open
Labels

Comments

@giacomofiorin
Copy link
Member

The sizes of Linux write buffers have increased in many scenario over the years, partly due to higher memory capacity.

Not seeing output written for the first few lines of the .colvars.traj can be inconvenient in many cases. I have just finished a day-long NAMD test job where the DCD file (3.4 GB in size) was written frame by frame, but the .colvars.traj file (61 MB) was written all at the end in a single chunk.

The .colvars.traj file is already flushed every time a restart is written, but this cannot always be relied upon.

It would be useful to also record when the MD engine is writing trajectory frames, and use that frequency to empty the buffer in addition to the restart frequency.

Additionally, I would propose removing the hard-coded default value of 100 for colvarsTrajFrequency: thoughts on this?

@jhenin
Copy link
Member

jhenin commented Nov 6, 2024

It would be useful to also record when the MD engine is writing trajectory frames, and use that frequency to empty the buffer in addition to the restart frequency.

Agreed, but would take some work and add an item to the proxy interface, for a moderately useful piece of information. Low-tech, low-effort solution: define a reasonable default flush frequency and an option to override it.

Additionally, I would propose removing the hard-coded default value of 100 for colvarsTrajFrequency: thoughts on this?

Would that make the parameter mandatory, or would the trajectory not be written at all if the keyword is absent? I think writing the trajectory is a sane default, but then we need a default frequency - would you use the back-end traj frequency to sync the output?
Giving an option to disable it makes sense too, perhaps with a frequency of -1?

@HanatoK
Copy link
Member

HanatoK commented Nov 6, 2024

The .colvars.traj file is already flushed every time a restart is written, but this cannot always be relied upon.

Is it possible to implement a flush frequency? PLUMED has the FLUSH action which is useful in your case but Colvars has not.

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

No branches or pull requests

3 participants