Skip to content

remote-job-local-storage-prefix gets parsed in local context #22

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

Closed
IceFreez3r opened this issue Jul 17, 2024 · 3 comments
Closed

remote-job-local-storage-prefix gets parsed in local context #22

IceFreez3r opened this issue Jul 17, 2024 · 3 comments

Comments

@IceFreez3r
Copy link

In our cluster environment the job specific tmp directory is accessible through both $MXQ_JOB_TMPDIR and $TMPDIR. The first one doesn't exist in the local context, the second one points to /scratch/local locally.
With

remote-job-local-storage-prefix: $TMPDIR

files are copied to /scratch/local

Retrieving /scratch/local/fs/resources/rnaseq/ENCSR700EBI.fastq from storage.

while with

remote-job-local-storage-prefix: $MXQ_JOB_TMPDIR

files land in the correct location

Retrieving /dev/shm/mxqd/mnt/job/51813391/fs/resources/rnaseq/ENCSR700EBI.fastq from storage.
@sebschmi
Copy link

This bug specifically prevents this snippet from the documentation from working:

If the shared scratch is e.g. specific for each job (e.g. controlled by a $JOBID), one can define a job-specific local storage prefix like this

default-storage-provider: fs
local-storage-prefix: /local/work/$USER
remote-job-local-storage-prefix: /local/work/$USER/$JOBID
shared-fs-usage:
  - persistence
  - software-deployment
  - sources
  - source-cache

@johanneskoester
Copy link
Contributor

From the help text:

In case they [the env vars] shall be expanded only within the remote job, mask them with a leading backslash, i.e. $SLURM_JOB_ID.

But I agree, the example in the docs here should explain that as well. This is done here now: #27

@johanneskoester
Copy link
Contributor

Actually the masking seems to never have properly worked. Hence, I have now changed the behavior into the more robust approach to always only expand the vars in this particular argument within the remote job: snakemake/snakemake#3222.

johanneskoester added a commit to snakemake/snakemake that referenced this issue Nov 29, 2024
…x within the remote job, not the main snakemake job (#3222)

fixes #3049,
snakemake/snakemake-storage-plugin-fs#22

### QC
<!-- Make sure that you can tick the boxes below. -->

* [x] The PR contains a test case for the changes or the changes are
already covered by an existing test case.
* [x] The documentation (`docs/`) is updated to reflect the changes or
this is not necessary (e.g. if the change does neither modify the
language nor the behavior or functionalities of Snakemake).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- No new features introduced.

- **Bug Fixes**
- Clarified help text for the `--remote-job-local-storage-prefix`
argument.

- **Chores**
- Minor formatting adjustments and removal of unnecessary comments in
the argument parser.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.

3 participants