Skip to content
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

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

Merged
merged 2 commits into from Feb 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion snakemake/__init__.py
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions snakemake/workflow.py
Expand Up @@ -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:
Expand Down