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

Add stop_after_walltime and stop_on_interrupt #860

Merged
merged 4 commits into from
May 9, 2019
Merged

Add stop_after_walltime and stop_on_interrupt #860

merged 4 commits into from
May 9, 2019

Conversation

ChristopherHogan
Copy link
Contributor

Closes #850.
Usage:

sim.run(until=mp.stop_after_walltime(60*60))
sim.run(until=200, stop_on_interrupt=True)

@stevengj @oskooi

@stevengj
Copy link
Collaborator

stevengj commented May 7, 2019

I think it would be better to have an easy way to combine multiple stopping conditions:

sim.run(until=[200, mp.stop_after_walltime(3600), stop_on_interrupt()])

where until is now a list of stopping conditions, and the simulation stops if any of them returns true.

@stevengj stevengj merged commit a2c1cb3 into NanoComp:master May 9, 2019
@ChristopherHogan ChristopherHogan deleted the chogan/issue_850 branch May 24, 2019 14:08
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
* Add stop_after_walltime and stop_on_interrupt

* Fix doc typo [ci skip]

* Let until take a list of stopping conditions

* Fix docs for run
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.

Feature request: simulation timeout run function
2 participants