Skip to content
Snippets Groups Projects

Add submit pol wrapper

Merged Matthew K Defenderfer requested to merge add-submit-pol-wrapper into main
1 unresolved thread
1 file
+ 12
13
Compare changes
  • Side-by-side
  • Inline
@@ -13,7 +13,6 @@ time="24:00:00"
@@ -13,7 +13,6 @@ time="24:00:00"
partition="amd-hdr100,medium"
partition="amd-hdr100,medium"
outdir="/data/rc/gpfs-policy/data"
outdir="/data/rc/gpfs-policy/data"
policy="./policy-def/list-path-external"
policy="./policy-def/list-path-external"
policy_dirplus="./policy-def/list-path-dirplus"
outfile=""
outfile=""
############################################################
############################################################
@@ -37,7 +36,7 @@ Wraps the run-mmpol.sh script for applying a policy file. Must be run directly
@@ -37,7 +36,7 @@ Wraps the run-mmpol.sh script for applying a policy file. Must be run directly
as root or via the run-submit-pol-job.py script. The default policy file is
as root or via the run-submit-pol-job.py script. The default policy file is
./policy/list-path-external
./policy/list-path-external
Usage: $0 [ -h ] [ -o | --outdir ] [ -f | --outfile ] [ --with-dirs ]
Usage: $0 [ -h ] [ -o | --outdir ] [ -f | --outfile ] [ -P | --policy ]
[ -N | --nodes ] [ -c | --cores ] [ -p | --partition ]
[ -N | --nodes ] [ -c | --cores ] [ -p | --partition ]
[ -t | --time ] [ -m | --mem ]
[ -t | --time ] [ -m | --mem ]
device
device
@@ -57,7 +56,7 @@ Path:
@@ -57,7 +56,7 @@ Path:
-f|--outfile Name of the policy output file
-f|--outfile Name of the policy output file
Policy Options:
Policy Options:
--with-dirs Change to ./policy/list-path-dirplus (default: False)
-P|--policy Path to policy file to apply to the given GPFS device
sbatch options:
sbatch options:
-N|--nodes Number of nodes to run the job on (default: 1)
-N|--nodes Number of nodes to run the job on (default: 1)
@@ -70,7 +69,7 @@ EOF
@@ -70,7 +69,7 @@ EOF
exit 0
exit 0
}
}
args=$(getopt -a -o ho:f:N:c:p:t:m: --long help,outdir:,outfile:,with-dirs,nodes:,cores:,partition:,time:,mem: -- "$@")
args=$(getopt -a -o ho:f:P:N:c:p:t:m: --long help,outdir:,outfile:,policy:,nodes:,cores:,partition:,time:,mem: -- "$@")
if [[ $? -gt 0 ]]; then
if [[ $? -gt 0 ]]; then
usage
usage
@@ -81,15 +80,15 @@ eval set -- ${args}
@@ -81,15 +80,15 @@ eval set -- ${args}
while :
while :
do
do
case $1 in
case $1 in
-h | --help) help ;;
-h | --help) help ;;
-o | --outdir) outdir=$2 ; shift 2 ;;
-o | --outdir) outdir=$2 ; shift 2 ;;
-f | --outfile) outfile=$2 ; shift 2 ;;
-f | --outfile) outfile=$2 ; shift 2 ;;
--with-dirs) policy="${policy_dirplus}" ; shift 1 ;;
-P | --policy) policy=$2 ; shift 2 ;;
-N | --nodes) nodes=$2 ; shift 2 ;;
-N | --nodes) nodes=$2 ; shift 2 ;;
-c | --cores) cores=$2 ; shift 2 ;;
-c | --cores) cores=$2 ; shift 2 ;;
-p | --partition) partition=$2 ; shift 2 ;;
-p | --partition) partition=$2 ; shift 2 ;;
-t | --time) time=$2 ; shift 2 ;;
-t | --time) time=$2 ; shift 2 ;;
-m | --mem-per-cpu) mem_per_cpu=$2 ; shift 2 ;;
-m | --mem-per-cpu) mem_per_cpu=$2 ; shift 2 ;;
--) shift; break ;;
--) shift; break ;;
*) >&2 echo Unsupported option: $1
*) >&2 echo Unsupported option: $1
usage ;;
usage ;;
Loading