Incremental gsd frame writing in 4.2

37 views
Skip to first unread message

Bryan VanSaders

unread,
Oct 18, 2023, 6:01:24 PM10/18/23
to hoomd-users
Hello,

When running hoomd 4.2.1, dumping gsd files and viewing them with ovito 3.9.2, I find that gsd files have no frames in them until my hoomd script has completely finished. In prior times (using hoomd 2.9) the frames would be written incrementally as the simulation progressed. This was nice from my point of view, as it allowed me to peek in at the progress during debug runs.

So my questions are:

1. What causes the new behavior? Is hoomd saving *all* frames in a buffer before writing (this seems like a problem)?
2. Is there any way to recover the old behavior, forcing more often writes-to-disk?

I am creating the writer in mode 'wb', for reference.

Thanks

Chris Jones

unread,
Oct 18, 2023, 6:25:00 PM10/18/23
to hoomd-users

Hi Bryan,

This is new behavior that started in hoomd 4.0. The documentation for the GSD writer has a few notes about it. There is a flush() method for the writer object that you can call in your script to manually write the gsd to file, or you can play around with the maximum_write_buffer_size parameter. It's not necessarily the case that the GSD writer is waiting for the entire simulation to finish before writing to file, but it doesn't write to file after each new frame, which is what I believe it did in hoomd 2 and 3.

Bryan VanSaders

unread,
Oct 19, 2023, 12:22:20 PM10/19/23
to hoomd-users
Thanks Chris, I missed that in the docs.
Reply all
Reply to author
Forward
0 new messages