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

Do not write to /tmp when --tmpdir-prefix is set #4910

Closed
arunisaac opened this issue May 2, 2024 · 2 comments · Fixed by #4918
Closed

Do not write to /tmp when --tmpdir-prefix is set #4910

arunisaac opened this issue May 2, 2024 · 2 comments · Fixed by #4918

Comments

@arunisaac
Copy link

arunisaac commented May 2, 2024

Even when I set --tmpdir-prefix to a directory other than /tmp, toil-cwl-runner writes to /tmp. This can be quite bad on a HPC machine where /tmp is part of the root filesystem and writing to /tmp is frowned upon. For reference, here's my full toil command:

$ toil-cwl-runner --batchSystem single_machine --workDir work --tmpdir-prefix tmp-toil --tmp-outdir-prefix tmp-toil-out --outdir outputs/hornbeam-assemble/ --jobStore jobstore/hornbeam-assemble assemble.cwl hornbeam-assemble-inputs.yml

and here are the contents of the file toil-cwl-runner wrote to /tmp.

$ cat /tmp/tmp5gs4l2gp
toil.bus.JobUpdatedMessage	kind-CWLWorkflow/instance-gzk2lelm	0
toil.bus.JobIssuedMessage	assemble.cwl	kind-CWLWorkflow/instance-gzk2lelm	1
toil.bus.QueueSizeMessage	1
toil.bus.JobCompletedMessage	assemble.cwl	kind-CWLWorkflow/instance-gzk2lelm	0
toil.bus.ExternalBatchIdMessage	1	4925	SingleMachineBatchSystem
toil.bus.JobUpdatedMessage	kind-CWLWorkflow/instance-gzk2lelm	0
toil.bus.JobIssuedMessage	assemble.cwl.bwa-index._:249e87ff-7b2e-4209-8e3f-60f56bef1135	kind-CWLJob/instance-krz6hyqg	2
toil.bus.QueueSizeMessage	1
toil.bus.ExternalBatchIdMessage	2	4927	SingleMachineBatchSystem

Running TMPDIR=/some/other/path toil-cwl-runner ... works around this. But, this should not be necessary given the existence of the --tmpdir-prefix argument.

┆Issue is synchronized with this Jira Story
┆Issue Number: TOIL-1559

@adamnovak
Copy link
Member

That looks like the message bus log file that the leader writes. It's part of the Toil core, while --tmpdir-prefix is part of only toil-cwl-runner.

It looks like toil-cwl-runner doesn't take --tmpdir-prefix and use it to change the temporary directory for the toil-cwl-runner Python process itself; it only uses it in the CWL "runtime context" and to pick a Toil work directory.

@arunisaac
Copy link
Author

arunisaac commented May 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants