-
Notifications
You must be signed in to change notification settings - Fork 26
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
example/stop_ensemble #458
base: develop
Are you sure you want to change the base?
Conversation
…elps to alleviate the need to constantly check an ensemble to stop the workers when the workflow finishes. See README file for further details.
…show job <jobid> doesn't show up anymore. This was remedied by checking the specification filename printed at the top of the output file. This also allowed for improved robustness by doing a whole match between the and the WorkDir set in scontrol show job <jobid>.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions about this:
How can/should it be modified now that merlin monitor works?
Can/should it use exit $(MERLIN_STOP_WORKERS) to avoid the worker-killed but task not completed issue?
We should note this is only for slurm based systems
Is there an alternative way to do this, eg via modifying $(MERLIN_STOP_WORKERS) logic to cancel a worker’s batch job and any dependencies instead of just the worker? It might be more elegant than an example.
@bgunnar5 what do you think about creating a custom stop worker command that also shuts down a worker’s batch job (and any dependencies)? We could register a custom command that workers can listen for https://docs.celeryq.dev/en/latest/userguide/workers.html#id18 This would mean that $(MERLIN_STOP_WORKERS) could shut down batch jobs too and make it easy for any workflow to shut down its workers and allocation at the end |
@lucpeterson yeah I think ultimately baking this into Merlin rather than having it as a standalone example is probably the way to go. This also means that I could expand it to work for more than just slurm too. I'm not sure if this would need to be an entirely new custom command or if we could just add it on to the existing |
Yeah the stop workers command issues a broadcast call to shutdown workers remotely. If we made a new command that we could broadcast, this would slip in nicely. You could kill workers and batch jobs from either the command line or a workflow. |
@bgunnar5 @lucpeterson, I personally think that having a new command in the form of something along the lines |
@bgunnar5 Let me know if you would like some help in accomplishing this. I can work on this a little at a time if needed. |
Ideally we could be able to do something like We'll need to figure out how to register this custom command based on the scheduler so there will likely be some work to do within the script adapters themselves. Maybe each script adapter can have its own If you have time to work on it then I definitely won't stop you! |
@bgunnar5 Thanks for pointing me to the right locations of where |
A new example for having the workflow itself stop the workers assigned to it.