Skip to content

Commit

Permalink
new option to serially attach ddt
Browse files Browse the repository at this point in the history
  • Loading branch information
lee218llnl committed Jul 19, 2022
1 parent 333b3a5 commit f3827a3
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions scripts/STATGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ def on_identify_num_eq_classes(self, action):
eq_dialog.vbox.pack_start(self.separator, False, True, 5)
box2 = gtk.HButtonBox()

debuggers = ['TotalView', 'DDT']
debuggers = ['TotalView', 'DDT', 'DDT serial']
for debugger in debuggers:
button = gtk.Button(" Attach %s \n to Subset " % debugger)
button.connect("clicked", self.launch_debugger_cb, (debugger, eq_dialog))
Expand Down Expand Up @@ -2366,23 +2366,31 @@ def cancel_entry(dialog):
else:
exe = exe.split()[0]
arg_list.append(exe)
elif debugger == 'DDT':
elif debugger == 'DDT' or debugger == 'DDT serial':
filepath = self.options['DDT Path']
if not filepath or not os.access(filepath, os.X_OK):
show_error_dialog('Failed to locate executable ddt\ndefault: %s\n' % filepath, self)
return

arg_list.append(filepath)
arg_list.append("--attach-mpi")
arg_list.append(str(self.proctab.launcher_pid))
arg_list.append("--subset")
rank_list_arg = ''
for rank in subset_list:
if rank == subset_list[0]:
rank_list_arg += '%d' % rank
else:
rank_list_arg += ',%d' % rank
arg_list.append(rank_list_arg)
if debugger == 'DDT':
arg_list.append("--attach-mpi")
arg_list.append(str(self.proctab.launcher_pid))
arg_list.append("--subset")
rank_list_arg = ''
for rank in subset_list:
if rank == subset_list[0]:
rank_list_arg += '%d' % rank
else:
rank_list_arg += ',%d' % rank
arg_list.append(rank_list_arg)
else:
arg_list.append("--attach")
hplist = self.proctab.process_list
attach_list_arg = ''
for rank in subset_list:
attach_list_arg += hplist[rank][1]+':'+'%d' % hplist[rank][2]+','
arg_list.append(attach_list_arg[:-1])
arg_list.append(self.executable_path)

for arg in self.options['Additional Debugger Args'].split():
Expand Down

0 comments on commit f3827a3

Please sign in to comment.