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: fixed bug in missing input file handling for cluster jobs #1544

Merged
merged 2 commits into from Mar 31, 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
2 changes: 1 addition & 1 deletion snakemake/executors/__init__.py
Expand Up @@ -767,7 +767,7 @@ def get_job_args(self, job):
if len(wait_for_files) > 20:
wait_for_files_file = self.get_jobscript(job) + ".waitforfilesfile.txt"
with open(wait_for_files_file, "w") as fd:
print(wait_for_files, sep="\n", file=fd)
print(*wait_for_files, sep="\n", file=fd)

waitfiles_parameter = format_cli_arg(
"--wait-for-files-file", wait_for_files_file
Expand Down
3 changes: 2 additions & 1 deletion snakemake/io.py
Expand Up @@ -821,7 +821,8 @@ def get_missing():
"Waiting at most {} seconds for missing files.".format(latency_wait)
)
for _ in range(latency_wait):
if not get_missing():
missing = get_missing()
if not missing:
return
time.sleep(1)
missing = "\n".join(get_missing())
Expand Down
4 changes: 3 additions & 1 deletion tests/test14/Snakefile.nonstandard
Expand Up @@ -12,7 +12,9 @@ rule all:
input: 'test.predictions', 'test.2.inter2'

rule compute1:
input: '{name}.in'
input:
'{name}.in',
expand("raw.{i}.txt", i=range(22))
output: ['{name}.%s.inter'%c for c in chromosomes]
params: prefix="{name}"
run:
Expand Down
Empty file added tests/test14/raw.0.txt
Empty file.
Empty file added tests/test14/raw.1.txt
Empty file.
Empty file added tests/test14/raw.10.txt
Empty file.
Empty file added tests/test14/raw.11.txt
Empty file.
Empty file added tests/test14/raw.12.txt
Empty file.
Empty file added tests/test14/raw.13.txt
Empty file.
Empty file added tests/test14/raw.14.txt
Empty file.
Empty file added tests/test14/raw.15.txt
Empty file.
Empty file added tests/test14/raw.16.txt
Empty file.
Empty file added tests/test14/raw.17.txt
Empty file.
Empty file added tests/test14/raw.18.txt
Empty file.
Empty file added tests/test14/raw.19.txt
Empty file.
Empty file added tests/test14/raw.2.txt
Empty file.
Empty file added tests/test14/raw.20.txt
Empty file.
Empty file added tests/test14/raw.21.txt
Empty file.
Empty file added tests/test14/raw.3.txt
Empty file.
Empty file added tests/test14/raw.4.txt
Empty file.
Empty file added tests/test14/raw.5.txt
Empty file.
Empty file added tests/test14/raw.6.txt
Empty file.
Empty file added tests/test14/raw.7.txt
Empty file.
Empty file added tests/test14/raw.8.txt
Empty file.
Empty file added tests/test14/raw.9.txt
Empty file.