3939 'o' : None , # will set to default if not provided
4040 'e' : None ,
4141 'A' : "P43713000" ,
42- 'q' : "rda @casper-pbs" ,
42+ 'q' : "gdex @casper-pbs" ,
4343# 'm' : 'a',
4444 'm' : 'n' ,
4545}
5050def main ():
5151
5252 aname = 'bashqsub'
53- pname = 'rdaqsub '
53+ pname = 'gdexqsub '
5454 PgLOG .set_help_path (__file__ )
55- rdasub = PgLOG .BCHCMDS ['PBS' ]
55+ gdexsub = PgLOG .BCHCMDS ['PBS' ]
5656 coptions = {'cmd' : None , 'cwd' : None , 'env' : None , 'mod' : None , 'res' : 'default' } # customized options
5757 copts = '|' .join (coptions )
5858 option = None
@@ -61,7 +61,7 @@ def main():
6161 if not argv : PgLOG .show_usage (aname )
6262 PgLOG .PGLOG ['LOGFILE' ] = pname + ".log"
6363 PgLOG .cmdlog ("{} {}" .format (aname , ' ' .join (argv )))
64- if not PgLOG .valid_command (rdasub ): PgLOG .pglog ("{}: miss {} command to submit batch job" .format (rdasub , PgLOG .PGLOG ['PBSNAME' ]), PgLOG .LGWNEX )
64+ if not PgLOG .valid_command (gdexsub ): PgLOG .pglog ("{}: miss {} command to submit batch job" .format (gdexsub , PgLOG .PGLOG ['PBSNAME' ]), PgLOG .LGWNEX )
6565
6666 while argv :
6767 arg = argv .pop (0 )
@@ -80,7 +80,7 @@ def main():
8080 if option == "env" : option = 'v'
8181 continue
8282
83- if not option : PgLOG .pglog ("{}: Value passed in without leading option for {}" .format (arg , rdasub ), PgLOG .LGEREX )
83+ if not option : PgLOG .pglog ("{}: Value passed in without leading option for {}" .format (arg , gdexsub ), PgLOG .LGEREX )
8484 if arg .find (' ' ) > - 1 and not re .match (r'^[\'\"].*[\'\"]$' , arg ): # quote string with space but not quoted yet
8585 if arg .find ("'" ) > - 1 :
8686 arg = '"{}"' .format (arg )
@@ -111,18 +111,18 @@ def main():
111111 if not cmd : PgLOG .pglog (coptions ['cmd' ] + ": Cannot find given command to run" , PgLOG .LGWNEX )
112112 if args : cmd += " " + args
113113
114- sbuf = build_bash_script (cmd , coptions , rdasub )
114+ sbuf = build_bash_script (cmd , coptions , gdexsub )
115115 PgLOG .pglog (sbuf , PgLOG .MSGLOG )
116116 PgLOG .PGLOG ['ERR2STD' ] = ['bind mouting' ]
117- PgLOG .pgsystem (rdasub , PgLOG .LOGWRN , 6 , sbuf )
117+ PgLOG .pgsystem (gdexsub , PgLOG .LOGWRN , 6 , sbuf )
118118 PgLOG .PGLOG ['ERR2STD' ] = []
119119
120120 sys .exit (0 )
121121
122122#
123123# build bash script to submit a PBS batch job
124124#
125- def build_bash_script (cmd , coptions , rdasub ):
125+ def build_bash_script (cmd , coptions , gdexsub ):
126126
127127 buf = "#!/usr/bin/bash\n \n " # qsub starting bash script
128128
0 commit comments