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

set the policy file to either list-path-external or list-path-dirplus, then...

set the policy file to either list-path-external or list-path-dirplus, then pass as a path to submit-pol-job
parent 7a62f02e
No related branches found
No related tags found
1 merge request!11Add submit pol wrapper
......@@ -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)
......
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