Skip to content
Permalink
Browse files
fix: provide proper error when using immediate submit in combination …
…with checkpoint jobs. (#1437)

* fix: provide proper error when using immediate submit in combination with checkpoint jobs.

* help text
  • Loading branch information
johanneskoester committed Feb 26, 2022
1 parent 6b9f5da commit 865cf0f22656e22cd2450e5537421ce70c1705f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
@@ -2120,7 +2120,8 @@ def get_argument_parser(profile=None):
"$ snakemake --cluster 'sbatch --dependency {dependencies}.\n"
"Assuming that your submit script (here sbatch) outputs the "
"generated job id to the first stdout line, {dependencies} will "
"be filled with space separated job ids this job depends on.",
"be filled with space separated job ids this job depends on. "
"Does not work for workflows that contain checkpoint rules.",
)
group_cluster.add_argument(
"--jobscript",
@@ -873,6 +873,14 @@ def files(items):
)
return False

if immediate_submit and any(dag.checkpoint_jobs):
logger.error(
"Immediate submit mode (--immediate-submit) may not be used for workflows "
"with checkpoint jobs, as the dependencies cannot be determined before "
"execution in such cases."
)
return False

updated_files.extend(f for job in dag.needrun_jobs for f in job.output)

if generate_unit_tests:

0 comments on commit 865cf0f

Please sign in to comment.