Skip to content
Snippets Groups Projects
Commit 9a409a6a authored by John-Paul Robinson's avatar John-Paul Robinson
Browse files

Feat: add filesystem parameter to run scripts to replace hard coded scratch

This allows policy files for any gpfs filesystem to be run by the
run scripts by using a variable for filesystem rather than hard
coding.
Keep default value set to scratch for compatability with existing callers.
Now can include a seventh arg to invoke policy file on any gpfs
filesystem.
parent 427be758
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
# gather info to map mmapplypolicy to runtime configuration
# arguments passed via job env and runtime context
filesystem=${FILESYSTEM:-scratch}
policyfile=$POLICYFILE
tmpglobal=$DIR
tmpscratch=$DIR
......@@ -17,7 +18,7 @@ DATESTR=`date +'%Y-%m-%d-%H:%M:%S'`
policy=`basename $policyfile`
filetag="${policy}_slurm-${SLURM_JOBID}_${DATESTR}"
cmd="mmapplypolicy scratch -I prepare \
cmd="mmapplypolicy ${filesystem} -I prepare \
-P $policyfile \
-g $tmpglobal \
-s $tmpscratch \
......
......@@ -8,9 +8,10 @@ nodes=$3
cores=$4
ram=$5
partition=$6
filesystem=${7:-scratch}
DIR=$outdir POLICYFILE=$policy && \
DIR=$DIR POLICYFILE=$POLICYFILE \
DIR=$outdir POLICYFILE=$policy FILESYSTEM=${filesystem} && \
DIR=$DIR POLICYFILE=$POLICYFILE FILESYSTEM=${FILESYSTEM} \
sbatch \
-N $nodes \
-c $cores \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment