File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
snakemake_executor_plugin_slurm Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2
+ language : " en-US"
3
+ early_access : false
4
+ reviews :
5
+ profile : " chill"
6
+ request_changes_workflow : false
7
+ high_level_summary : true
8
+ poem : true
9
+ review_status : true
10
+ collapse_walkthrough : false
11
+ auto_review :
12
+ enabled : true
13
+ drafts : false
14
+ chat :
15
+ auto_reply : true
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ def __post_init__(self):
76
76
self .logger .info (f"SLURM run ID: { self .run_uuid } " )
77
77
self ._fallback_account_arg = None
78
78
self ._fallback_partition = None
79
+ self ._preemption_warning = False # no preemption warning has been issued
79
80
# providing a short-hand, even if subsequent calls seem redundant
80
81
self .settings : ExecutorSettings = self .workflow .executor_settings
81
82
@@ -248,7 +249,6 @@ async def check_active_jobs(
248
249
"FAILED" ,
249
250
"NODE_FAIL" ,
250
251
"OUT_OF_MEMORY" ,
251
- "PREEMPTED" ,
252
252
"TIMEOUT" ,
253
253
"ERROR" ,
254
254
)
@@ -348,6 +348,16 @@ async def check_active_jobs(
348
348
self .report_job_success (j )
349
349
any_finished = True
350
350
active_jobs_seen_by_sacct .remove (j .external_jobid )
351
+ elif status == "PREEMPTED" and not self ._preemption_warning :
352
+ self ._preemption_warning = True
353
+ self .logger .warning (
354
+ """
355
+ ===== A Job preemption occured! =====
356
+ Leave Snakemake running, if possible. Otherwise Snakemake
357
+ needs to restart this job upon a Snakemake restart.
358
+
359
+ We leave it to SLURM to resume your job(s)"""
360
+ )
351
361
elif status == "UNKNOWN" :
352
362
# the job probably does not exist anymore, but 'sacct' did not work
353
363
# so we assume it is finished
You can’t perform that action at this time.
0 commit comments