diff --git a/src/exceptions.py b/src/run-policy/exceptions.py similarity index 100% rename from src/exceptions.py rename to src/run-policy/exceptions.py diff --git a/src/policy/list-30day-with-excludes b/src/run-policy/policy-def/list-30day-with-excludes similarity index 100% rename from src/policy/list-30day-with-excludes rename to src/run-policy/policy-def/list-30day-with-excludes diff --git a/src/policy/list-path b/src/run-policy/policy-def/list-path similarity index 100% rename from src/policy/list-path rename to src/run-policy/policy-def/list-path diff --git a/src/policy/list-path-dirplus b/src/run-policy/policy-def/list-path-dirplus similarity index 100% rename from src/policy/list-path-dirplus rename to src/run-policy/policy-def/list-path-dirplus diff --git a/src/policy/list-path-external b/src/run-policy/policy-def/list-path-external similarity index 100% rename from src/policy/list-path-external rename to src/run-policy/policy-def/list-path-external diff --git a/src/run-mmpol.sh b/src/run-policy/run-mmpol.sh similarity index 100% rename from src/run-mmpol.sh rename to src/run-policy/run-mmpol.sh diff --git a/src/run-submit-pol-job.py b/src/run-policy/run-submit-pol-job.py similarity index 98% rename from src/run-submit-pol-job.py rename to src/run-policy/run-submit-pol-job.py index 4ab3f91685d7ddeae4b16e8471991c788c44e58e..3e9fe9cf4b9820aa42108fb90c5395aff0d71adb 100755 --- a/src/run-submit-pol-job.py +++ b/src/run-policy/run-submit-pol-job.py @@ -133,8 +133,7 @@ def main(): cmd = f'{cmd} --with-dirs' print(f"Command: {cmd}") - proc = subprocess.run(cmd,shell=True) - proc.communicate() + subprocess.run(cmd,shell=True) exit() if __name__ == '__main__': diff --git a/src/submit-pol-job b/src/run-policy/submit-pol-job similarity index 79% rename from src/submit-pol-job rename to src/run-policy/submit-pol-job index ecba3262d3ab8b9ef7cce3d3a2dcccacd717d394..25d1a56e5184e187d17b6a70b377ffc5e69c9393 100755 --- a/src/submit-pol-job +++ b/src/run-policy/submit-pol-job @@ -12,7 +12,8 @@ mem_per_cpu="8G" time="24:00:00" partition="amd-hdr100,medium" outdir="/data/rc/gpfs-policy/data" -policy="./policy/list-path-external" +policy="./policy-def/list-path-external" +policy_dirplus="./policy-def/list-path-dirplus" outfile="" ############################################################ @@ -80,15 +81,15 @@ eval set -- ${args} while : do case $1 in - -h | --help) help ;; - -o | --outdir) outdir=$2 ; shift 2 ;; - -f | --outfile) outfile=$2 ; shift 2 ;; - --with-dirs) policy="./policy/list-path-dirplus" ; shift 1 ;; - -N | --nodes) nodes=$2 ; shift 2 ;; - -c | --cores) cores=$2 ; shift 2 ;; - -p | --partition) partition=$2 ; shift 2 ;; - -t | --time) time=$2 ; shift 2 ;; - -m | --mem-per-cpu) mem_per_cpu=$2 ; shift 2 ;; + -h | --help) help ;; + -o | --outdir) outdir=$2 ; shift 2 ;; + -f | --outfile) outfile=$2 ; shift 2 ;; + --with-dirs) policy="${policy_dirplus}" ; shift 1 ;; + -N | --nodes) nodes=$2 ; shift 2 ;; + -c | --cores) cores=$2 ; shift 2 ;; + -p | --partition) partition=$2 ; shift 2 ;; + -t | --time) time=$2 ; shift 2 ;; + -m | --mem-per-cpu) mem_per_cpu=$2 ; shift 2 ;; --) shift; break ;; *) >&2 echo Unsupported option: $1 usage ;; @@ -107,6 +108,8 @@ if [[ -z "$device" ]]; then usage fi +slurm_out="out/pol-%A-$(basename ${policy})-$(basename ${device}).out" + DIR=$outdir POLICYFILE=$policy FILESYSTEM=${device} OUTFILE=${outfile} && \ DIR=$DIR POLICYFILE=$POLICYFILE FILESYSTEM=${FILESYSTEM} OUTFILE=${OUTFILE} \ sbatch \ @@ -115,4 +118,5 @@ sbatch \ -t $time \ --mem-per-cpu=$mem_per_cpu \ -p $partition \ + -o ${slurm_out} \ ./run-mmpol.sh