restartable runs in hoomd3

46 views
Skip to first unread message

annaliese...@u.northwestern.edu

unread,
Aug 25, 2021, 12:32:56 PM8/25/21
to hoomd-users

Hello!

This is a quick question. In hoomd v2, there is some (lovely and convenient) infrastructure for making runs restartable, like `hoomd.run_upto()`. Does something similar exist in v3 at the moment, and (if not) are there plans to implement something like that in the future? I've looked in the documentation and the github project and didn't find anything indicating there was, but I might have missed something.

This isn't urgent at all---I can certainly write a little workaround---I was just wondering if this is in the works!

Thanks,

Ali

Joshua Anderson

unread,
Aug 25, 2021, 1:12:07 PM8/25/21
to hoomd...@googlegroups.com
Ali,

Those existed in v2 because the API was not expressive or performant enough for users to implement their own workflows using them. This is fixed in v3, so you can now implement workflows in a few lines of Python code that integrate cleanly with your workflow engine, job submission system, or anything else.

For example, run_upto is:

sim.run(max(0, final_timestep - sim.timestep))

A wall time limit can be achieved with (made possible by a minimal overhead run() call):

while time.time() < end_time - buffer:
sim.run(10000)

Additionally, all operations are pickleable so if you want you can save them to a file and reload it when you continue your job.

I plan to include cover restartable jobs in a tutorial at some point. This tutorial will no longer recommend one script with multiple stages for workflows. Instead, it will use signac-flow (which many HOOMD users find convenient) to drive the different stages of the simulation: https://docs.signac.io/projects/flow/en/latest/
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
> --
> You received this message because you are subscribed to the Google Groups "hoomd-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hoomd-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/b4d46609-7b57-4a11-832a-1f3e88ade640n%40googlegroups.com.

annaliese...@u.northwestern.edu

unread,
Aug 25, 2021, 1:23:06 PM8/25/21
to hoomd-users
Hi Joshua,

That makes sense and is very helpful. I'm looking forward to learning more about your recommended workflow. Thank you!

Ali

Joshua Anderson

unread,
Aug 26, 2021, 2:26:53 PM8/26/21
to hoomd...@googlegroups.com
You can find the signac-flow's example of HOOMD-blue here: https://docs.signac.io/en/latest/examples/notebooks/signac_106_signac-flow_HOOMD-blue_Example.html

I know they are updating this for v3, but I don't know when that will be posted.
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan

> To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/b80090a4-f46a-445d-93e2-234e23f944d2n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages