30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Debugging PVM (Parallel Virtual Machine) and DPVM Applications<br />

You cannot use CLI variables to start both PVM and DPVM.<br />

Automatically Acquiring PVM/DPVM Processes<br />

When you start <strong>TotalView</strong> as part of a PVM or DPVM debugging session, it<br />

takes the following actions:<br />

� <strong>TotalView</strong> makes sure that no other PVM or DPVM taskers are running. If<br />

<strong>TotalView</strong> finds a tasker on a host that it is debugging, it displays the following<br />

message and then exits:<br />

Fatal error: A PVM tasker is already running<br />

on host 'host'<br />

� <strong>TotalView</strong> finds all the hosts in the PVM or DPVM configuration. Using the<br />

pvm_spawn() call, <strong>TotalView</strong> starts a <strong>TotalView</strong> Server (tvdsvr) on each remote<br />

host that has the same architecture type as the host <strong>TotalView</strong> is<br />

running on. It tells you it has started a debugger server by displaying the<br />

following message:<br />

Spawning <strong>TotalView</strong> Debugger Server onto PVM<br />

host 'host'<br />

If you add a host with a compatible computer architecture to your PVM or<br />

DPVM debugging session after you start <strong>TotalView</strong>, it automatically starts a<br />

debugger server on that host.<br />

After all debugger servers are running, <strong>TotalView</strong> intercepts every PVM or<br />

DPVM task created with the pvm_spawn() call on hosts that are part of the<br />

debugging session. If a PVM or DPVM task is created on a host with a different<br />

computer architecture, <strong>TotalView</strong> ignores that task.<br />

When <strong>TotalView</strong> receives a PVM or DPVM tasker event, the following actions<br />

occur:<br />

1 <strong>TotalView</strong> reads the symbol table of the spawned executable.<br />

2 If a saved breakpoint file for the executable exists and you have enabled<br />

automatic loading of breakpoints, <strong>TotalView</strong> loads breakpoints for the<br />

process.<br />

3 <strong>TotalView</strong> asks if you want to stop the process before it enters the main()<br />

routine.<br />

If you answer Yes, <strong>TotalView</strong> stops the process before it enters main() (that<br />

is, before it executes any user code). This allows you to set breakpoints in<br />

the spawned process before any user code executes. On most computers,<br />

<strong>TotalView</strong> stops a process in the start() routine of the crt0.o module<br />

if it is statically linked. If the process is dynamically linked, <strong>TotalView</strong> stops<br />

it just after it finishes running the dynamic linker. Because the Process<br />

Window displays assembler instructions, you need to use the View ><br />

Lookup Function command to display the source code for main().<br />

CLI: dlist function-name<br />

For more information on this command, see “Finding the Source Code for<br />

Functions” on page 225.<br />

154 Chapter 7: Setting Up Parallel Debugging Sessions

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!