Skip to content

Commit

Permalink
output and error file locations are configurable via cluster.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Metin Balaban committed Aug 29, 2019
1 parent 4b5a7db commit 26cbb30
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions {{cookiecutter.profile_name}}/pbs-submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@
if walltime: resourceparams = resourceparams + walltime
if nodes or mem or walltime: resourceparams = resourceparams + "\""

if "cluster" in job_properties:
cluster = job_properties["cluster"]
if "error" in cluster:
os.makedirs(os.path.dirname(cluster["error"]), exist_ok=True)
se = " -e " + cluster["error"]
if "output" in cluster:
os.makedirs(os.path.dirname(cluster["output"]), exist_ok=True)
so = " -o " + cluster["output"]

cmd = "qsub {a}{A}{b}{c}{C}{d}{D}{e}{f}{h}{j}{l}{m}{M}{N}{o}{p}{P}{q}{t}{u}{v}{V}{w}{W}{rp}{dep}{ex}".format(\
a=atime,A=acc_string,b=pbs_time,c=chkpt,C=pref,d=dd,D=rd,e=se,f=ft,h=hold,j=j,l=resource,m=mail,M=mailuser,\
N=jname,o=so,p=priority,P=proxy,q=q,t=ar,u=user,v=ev,V=eall,w=wd,W=add,rp=resourceparams,dep=depend,ex=extras)
Expand Down

0 comments on commit 26cbb30

Please sign in to comment.