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

Docs HPCSlurmWithLocalScratch.md redundant? #7357

Open
mmterpstra opened this issue Jan 13, 2024 · 0 comments
Open

Docs HPCSlurmWithLocalScratch.md redundant? #7357

mmterpstra opened this issue Jan 13, 2024 · 0 comments

Comments

@mmterpstra
Copy link

This is a remark on https://github.com/broadinstitute/cromwell/blob/master/docs/tutorials/HPCSlurmWithLocalScratch.md there is a feature on slum config to edit the sbatch command. You could add in a find and replace in the config to do the same as the tutorial.

you can skip the first part of the tutorial by editing the slurm backend config (somewhat hotpatching the scripts on submission time).

old submit
submit = """
sbatch -J ${job_name} -D ${cwd} -o ${out} -e ${err} -t ${runtime_minutes} -p ${queue} ${"-c " +
cpu} --mem ${memory_mb} --wrap "/bin/bash ${script}"
"""

new submit for slurm auto configured job dir:
submit = """
perl -i.bak -wpe 's/^tmpDir=.*/tmpdir="$TMPDIR"/g' ${script} &&
sbatch -J ${job_name} --tmp=${disk} -D ${cwd} -o ${out} -e ${err} -t ${runtime_minutes} -p ${queue} ${"-c " +
cpu} --mem ${memory_mb} --wrap "/bin/bash ${script}"
"""

new submit for /genomics/local/ (not tested tough):
submit = """
perl -i.bak -wpe 's/^tmpDir=.*/tmpdir="$(mkdir -p "/genomics_local/$PID_$HOSTNAME"/" && echo "/genomics_local/$PID_$HOSTNAME"/"/g' ${script} &&
sbatch -J ${job_name} --tmp=${disk} -D ${cwd} -o ${out} -e ${err} -t ${runtime_minutes} -p ${queue} ${"-c " +
cpu} --mem ${memory_mb} --wrap "/bin/bash ${script}"
"""

The backend I'm running on is Slurm hpc with a version 1.0 workflow. This alternative workflow has its downsides but also benefits it is up to the hpc(user) to decide what works best in their own situation.

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

No branches or pull requests

1 participant