You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to incorporate a run function that stops the simulation after a specified time interval (actual time, not MEEP time) has passed.
This would be especially useful for jobs that are submitted to clusters with designated walltimes. The user could pass the walltime to the MEEP solver so that any progress could be saved before the job scheduler kills the job.
I'm thinking of something similar to the opt.set_maxtime(maxtime) within nlopt's API.
The text was updated successfully, but these errors were encountered:
It would certainly be possible to have a stop_after_walltime(t) function that you could pass to run. (You could even write such a step function yourself — it doesn't require any Meep internals.)
Another possibility we have discussed is to have a stop_on_interrupt function that you can pass to run, which will catch SIGTERM or SIGINT (ctrl-c) and stop the simulation, executing any code that you have following the run (e.g. code to output fields or whatever).
(Both of these would be fine to implement in Python — the performance cost of checking the time or checking a flag to see if a signal handler has been called is negligible compared to the cost of a timestep.)
It would be nice to incorporate a
run
function that stops the simulation after a specified time interval (actual time, not MEEP time) has passed.This would be especially useful for jobs that are submitted to clusters with designated walltimes. The user could pass the walltime to the MEEP solver so that any progress could be saved before the job scheduler kills the job.
I'm thinking of something similar to the
opt.set_maxtime(maxtime)
within nlopt's API.The text was updated successfully, but these errors were encountered: