Skip to content

Commit db8d770

Browse files
committed
allow job ID to be appended via GUI
1 parent 933fc59 commit db8d770

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

scripts/STATGUI.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def __init__(self, args):
225225
'Filter Full Command Line': False,
226226
'Filter Full Command Line ': False, # this option is for serial attach and adds a space at the end to avoid conflict
227227
'Log Dir': os.environ['HOME'],
228+
'Output Job ID': '',
228229
'Log Frontend': False,
229230
'Log Backend': False,
230231
'Log CP': False,
@@ -352,6 +353,8 @@ def __init__(self, args):
352353
self.options['Log Backend'] = True
353354
if args.mrnetprintf is True:
354355
self.options['Use MRNet Printf'] = True
356+
if args.jobid is not None:
357+
self.options['Output Job ID'] = args.jobid
355358
if args.sleep is not None:
356359
sys.stdout.write('sleeping for %d seconds\n' % (args.sleep))
357360
time.sleep(args.sleep)
@@ -1422,6 +1425,8 @@ def attach_cb(self, attach_dialog, launch, serial, application_option=STAT_ATTAC
14221425
os.environ['STAT_GROUP_OPS'] = "1"
14231426
self.STAT.setProcsPerNode(self.options['Communication Processes per Node'])
14241427
self.STAT.setNDaemonsPerNode(self.options['Daemons per Node'])
1428+
if self.options['Output Job ID'] != '':
1429+
self.STAT.setJobId(self.options['Output Job ID'])
14251430
stat_wait_dialog.update_progress_bar(0.05)
14261431

14271432
self.STAT.setApplicationOption(application_option)

scripts/STATmain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def STATmain_main(in_arg_list, command=None):
9999
gui_parser.add_argument("-y", "--pythontrace", help="gather Python script level stack traces", action="store_true")
100100
gui_parser.add_argument("-U", "--countrep", help="only gather count and a single representative", action="store_true")
101101
gui_parser.add_argument("-d", "--debugdaemons", help="launch the daemons under the debugger", action="store_true")
102+
gui_parser.add_argument("-j", "--jobid", help="append specified job ID to output directory name")
102103
gui_parser.add_argument("-L", "--logdir", help="logging output directory")
103104
gui_parser.add_argument("-l", "--log", help="enable debug logging", choices=['FE', 'BE', 'CP'], action="append")
104105
if HAVE_GDB_SUPPORT:

0 commit comments

Comments
 (0)