Skip to content
Snippets Groups Projects
Commit 7d392fe2 authored by Matthew K Defenderfer's avatar Matthew K Defenderfer
Browse files

add more braces

parent acb490fa
No related branches found
No related tags found
6 merge requests!24Release v0.2.0,!22Update main to rel_v0.1.1-1,!21Fix some merge errors,!20Refactoring run-mmpol scripts,!19BUGFIX: Change ownership to executing USER and group to atlab. Also automatically gzip the log output,!18ENH: Change log storage organization and correctly apply log prefix and metadata to file name
...@@ -20,7 +20,7 @@ dry_run=false ...@@ -20,7 +20,7 @@ dry_run=false
usage() usage()
{ {
>&2 cat << EOF >&2 cat << EOF
Usage: $0 [ -h ] [ -o | --outdir ] [ -f | --output-prefix ] [-P | --policy-file] device Usage: $0 [ -h ] [ -o | --outdir ] [ -f | --output-prefix ] [ -P | --policy-file] device
EOF EOF
exit 1 exit 1
} }
...@@ -84,33 +84,33 @@ fi ...@@ -84,33 +84,33 @@ fi
device="$1" device="$1"
# Ensure device is specified # Ensure device is specified
if [[ -z "$device" ]]; then if [[ -z "${device}" ]]; then
echo "Error: Specify either the name of a fileset or a directory path" echo "Error: Specify either the name of a fileset or a directory path"
usage usage
fi fi
# set default output_log_prefix if not specified in the arguments # set default output_log_prefix if not specified in the arguments
if [[ -z "$output_log_prefix" ]]; then if [[ -z "${output_log_prefix}" ]]; then
modified_device=$(echo "$device" | sed -e 's|^/||' -e 's|/$||' -e 's|/|-|g') modified_device=$(echo "${device}" | sed -e 's|^/||' -e 's|/$||' -e 's|/|-|g')
output_log_prefix="list-policy_${modified_device}" output_log_prefix="list-policy_${modified_device}"
fi fi
# create temporary working directory for list aggregation # create temporary working directory for list aggregation
tmpglobal=$outdir/slurm-tmp-${SLURM_JOBID} tmpglobal=${outdir}/slurm-tmp-${SLURM_JOBID}
tmpscratch=$outdir/slurm-tmp-${SLURM_JOBID} tmpscratch=${outdir}/slurm-tmp-${SLURM_JOBID}
nodes=`scontrol show hostnames "${SLURM_JOB_NODELIST}" | tr '\n' ',' | sed -e 's/,$//'` nodes=`scontrol show hostnames "${SLURM_JOB_NODELIST}" | tr '\n' ',' | sed -e 's/,$//'`
cores="${SLURM_CPUS_PER_TASK}" cores="${SLURM_CPUS_PER_TASK}"
DATESTR=`date +'%Y%m%dT%H%M%S'` DATESTR=$(date +'%Y%m%dT%H%M%S')
policy=`basename $policy_file` policy=$(basename ${policy_file})
filetag="${policy}_slurm-${SLURM_JOBID}_${DATESTR}" filetag="${policy}_slurm-${SLURM_JOBID}_${DATESTR}"
cmd="mmapplypolicy ${device} -I defer \ cmd="mmapplypolicy ${device} -I defer \
-P $policy_file \ -P ${policy_file} \
-g $tmpglobal \ -g ${tmpglobal} \
-s $tmpscratch \ -s ${tmpscratch} \
-f ${outdir}/list-${SLURM_JOBID} \ -f ${outdir}/list-${SLURM_JOBID} \
-M FILEPATH=${device} \ -M FILEPATH=${device} \
-M JOBID=${SLURM_JOBID} \ -M JOBID=${SLURM_JOBID} \
......
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