Closed cmeesters closed 2 weeks ago
The changes in this pull request focus on enhancing the run_job
method within the Executor
class of the snakemake_executor_plugin_slurm
module. Key modifications include replacing subprocess.check_output
with subprocess.Popen
to improve error handling during SLURM job submissions. The new implementation captures both standard output and error, raising a WorkflowError
for failures. Additionally, whitespace is stripped from the job ID output, and logging statements have been adjusted for clarity.
File Path | Change Summary |
---|---|
snakemake_executor_plugin_slurm/init.py | Modified run_job method: replaced subprocess.check_output with subprocess.Popen , improved error handling, captured standard output and error, stripped whitespace from job ID, adjusted logging statements. |
Objective | Addressed | Explanation |
---|---|---|
Improve job submission handling to prevent hangs (#157) | ✅ | |
Enhance error reporting during job submission (#157) | ✅ |
run_job
method to add a requeue
option, relevant to job submission error handling.run_job
method, aligning with robustness improvements in this PR.--slurm_requeue
option, related to job submission and error handling changes in this PR.🐰 In the meadow where jobs do run,
SLURM's whispers now sound like fun.
With errors caught and logs so bright,
Snakemake dances in the moonlight!
No more hangs, just smooth delight,
A hop, a skip, all workflows take flight! 🌙✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@johanneskoester care to have a look?
@fgvieira can you test this on your cluster, too?
If either one of you can test this, it would be great. I do not trust the CI enough to consider this a mercyless test. Also, I would like to have feedback from @freekvh, how this code behaves on Snellius.
Hi @cmeesters I'm very much willing to test (on Snellius), but I am not getting this PR to work with poetry (see my comment here: https://github.com/snakemake/snakemake-executor-plugin-slurm/issues/157#issuecomment-2450822608) If you can advice how I can do this some other way, or fix the datrie-package related issues, I'd be happy to take another look.
I tested this on Snellius, I had issues, I added the details to our original issue: #157 , see https://github.com/snakemake/snakemake-executor-plugin-slurm/issues/157#issuecomment-2454899674
will hopefully fix #157
The issue is, that submission joined
stderr
andstdout
of thesbatch
call. Without add-onssbatch
only emits tostdout
and tostderr
only in the case of an error. However, admins can add informative messages tostderr
, when this occurs, parsing the message for the JobID failed. Now,stderr
andstdout
are considered separately.Summary by CodeRabbit
New Features
Bug Fixes
Chores