carputils
Doxygen code documentation for the python framework controlling openCARP
Functions | Variables
carputils.debug Namespace Reference

Functions

def run_valgrind_interactive (command, executable, args, kwargs)
 Run an MPI command and attach GDB instances with valgrind. More...
 
def mpi_attach_debugger (launcher, command, nproc, attach_procs, attach_prefix, detach_prefix=[], xterm=True)
 Convenience method to launch MPI with a specific prefix added to the command on specific processes. More...
 

Variables

 xrange = range
 

Function Documentation

◆ mpi_attach_debugger()

def carputils.debug.mpi_attach_debugger (   launcher,
  command,
  nproc,
  attach_procs,
  attach_prefix,
  detach_prefix = [],
  xterm = True 
)

Convenience method to launch MPI with a specific prefix added to the command on specific processes.

Parameters

launcher str The MPI launcher to use command str The un-prefixed command nproc int The total number of processes to use attach_procs list The processes to attach the debugger to (empty list - select all) attach_prefix list List of commands to use as prefix on attached processes detach_prefix list, optional List of commands to use as prefix on non-attached processes xterm bool, optional Launch selected processes in xterm (default: True)

Returns

str The compiled command

◆ run_valgrind_interactive()

def carputils.debug.run_valgrind_interactive (   command,
  executable,
  args,
  kwargs 
)

Run an MPI command and attach GDB instances with valgrind.

Diverts the output of the MPI job to a stream which filters for valgrind's prompt to attach GDB instances to specific process indicies. When the regular expression searching for this is matched, a callback is run which automatically attaches the GDB instances.

Parameters

command str The MPI command to execute

Variable Documentation

◆ xrange

carputils.debug.xrange = range