[Feature] Catch signals for SLURM jobs?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Begin with the SLURM job execution path and the Python SIGTERM handling around scancel; the issue does not identify a file or test. Determine whether cancellation should be converted into an exception that permits TemporaryDirectory cleanup, then define and test the expected behavior before implementing it.
Written by the indexing model from the issue text.
Description
This is just a thought triggered by an observation.
We noticed that when a SLURM job is scanceled that is currently inside a tempfile.TemporaryDirectory context manager, the context is not unwound (leaving behind a temporary directory that could potentially be large and which could potentially accumulate on nodes over time).
Apparently, this is expected behavior as the __exit__ block only runs during normal Python exception unwinding.
Now, I believe as an executorlib user one can work around this by catching the SIGTERM signal directly in the corresponding Python code and raising an exception instead, allowing the code to unwind. Or perhaps executorlib could do this for us, such that cancelling a slurm job is seen by the Python code as an exception being raised rather than a SIGTERM.
I'm not sure whether it is a good idea for executorlib to do this sort of transformation, just wanted to mention the idea
@gitdowski
- Dominant language
- Python
- Stars
- 77
- Forks
- 7
- Avg merge
- 10h 32m
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyiron/executorlib
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pyiron/executorlib#1054 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pyiron/executorlib#1032 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pyiron/executorlib#1005 ·
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 35/100
pyiron/executorlib#999 · 1 comment ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
pyiron/executorlib#942 ·
All issues in pyiron/executorlib
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100