-
Notifications
You must be signed in to change notification settings - Fork 12
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 tmpdir being set from base command #200
Conversation
Integration test But |
Yeah, that would probably be better than the current shell command. However, |
convert rule spades_assembly to a python script
Needs re-evaluation after other introduced changes
So @YibiChen noted some oddities with how tmpdir was being set, just want to verify that this was intended behaviour before merging into dev |
@YibiChen #201 (comment) for which rule? |
Actually all rules submitted jobs to remote nodes, according to the qsub_logs from pbs. In the test case |
Ok, it seems to be a known issue with snakemake. See snakemake/snakemake#522. One way to work around is to use |
Or something like this: snakemake/snakemake#522 (comment)? |
Or get it to set resources.tmpdir within the job. Maybe as addition to mqsub-snakemake? |
Similar issue: snakemake/snakemake#2423 |
Adding |
I'd prefer not to use something that has been deprecated in future versions of snakemake if possible |
It might be due to default-resources. In another snakemake, the command that is run within the job is a snakemake command with |
@YibiChen can you try setting tmpdir in default resources to none? |
@AroneyS I have tried to set tmpdir in default resources to none, and got an error directly. I think there some builded-in check to make sure tmpdir is given. It makes sense because the tmpdir in default resources is critical and would be used to overwrite the tmdir in the environment once the job is submmited to clusters. That's why our python scripts did not work. The tmpdir value given by PBS is never accessible as it was overwritten by snakemake immediately. It is designed to do so according to https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#standard-resources . I believe the snakemake team is aware of this problem and fix may come out. For now, we may just exam whether there is a |
What do you think "In cluster or cloud setups, its evaluation is delayed until the actual execution of the job." means from your link? What is it evaluating? Can we set |
@YibiChen actually maybe you can try the same setup with updated snakemake? Though there are heaps of breaking changes... Edit: snakemake/snakemake#1860 hmm... |
This is what I understand. The evaluation is referring to "setting the $TMPDIR variable for shell commands" (i.e. parsing resources.tmpdir to $TMPDIR in the env). It is delayed so it can overwrite the $TMPDIR given by PBS. |
Problem "sloved". It turns out the python scripts worked but I had "export TMPDIR=/tmp" in my bashrc... and I totally forgot about it. I have tested it again after removed that line. It works good now. |
that's pretty funny, but did you put this in your |
No worries. It's nothing to do with |
@rhysnewell new release? |
yeah, i'll spin it up |
Prior to this pull-request,
TMPDIR
was set usingtempfile.gettempdir()
at the time and using the current env of the Aviary command being run. However, when jobs are submitted to a HPC cluster, often they have a bespokeTMPDIR
set for each job (e.g. to clean up tmp files after job is finished).So, essentially, the PR is to allow jobs to fall back to their
TMPDIR
env variable if one was not forced by using--tmpdir
.