diff --git a/src/run-policy/run-submit-pol-job.py b/src/run-policy/run-submit-pol-job.py index 3e9fe9cf4b9820aa42108fb90c5395aff0d71adb..f888e9e4811ca56cd1a897e18828a4a1e141f141 100755 --- a/src/run-policy/run-submit-pol-job.py +++ b/src/run-policy/run-submit-pol-job.py @@ -8,7 +8,8 @@ from exceptions import InvalidDeviceError, ValueError description = """ Interface for non-privileged users to execute the run-mmpol.sh script with elevated permissions. Calls the -submit-pol-job wrapper +submit-pol-job wrapper. The default applied policy is ./policy-def/list-path-external but can be changed to +./policy-def/list-path-dirplus using the --with-dirs flag. No other policy is available via this script. """ def parse_args(): @@ -128,9 +129,12 @@ def main(): if args['outfile'] is None: args['outfile'] = create_default_outfile(args['device']) - cmd = "./submit-pol-job -o {outdir} -f {outfile} -N {nodes} -c {cores} -p {partition} -t {time} -m {mem_per_cpu} {device}".format(**args) - if args['with_dirs']: - cmd = f'{cmd} --with-dirs' + if args['with_dir']: + args['policy'] = './policy-def/list-path-dirplus' + else: + args['policy'] = './policy-def/list-path-external' + + cmd = "./submit-pol-job -o {outdir} -f {outfile} -P {policy} -N {nodes} -c {cores} -p {partition} -t {time} -m {mem_per_cpu} {device}".format(**args) print(f"Command: {cmd}") subprocess.run(cmd,shell=True)