30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Debugging Shared Memory (SHMEM) Code<br />

3 If the task to which you attached has related tasks that can be debugged,<br />

<strong>TotalView</strong> asks if you want to attach to these related tasks. If you answer<br />

Yes, <strong>TotalView</strong> attaches to them. If you answer No, it only attaches to the<br />

task you dove on.<br />

After attaching to a task, <strong>TotalView</strong> looks for attached tasks that are related<br />

to this task; if there are related tasks, <strong>TotalView</strong> places them in the same<br />

control group. If <strong>TotalView</strong> is already attached to a task you dove on, it simply<br />

opens and raises the Process Window for the task.<br />

About Reserved Message Tags<br />

<strong>TotalView</strong> uses PVM message tags in the range 0xDEB0 through 0xDEBF to<br />

communicate with PVM daemons and the <strong>TotalView</strong> Server. Avoid sending<br />

messages that use these reserved tags.<br />

Cleaning Up Processes<br />

The pvmgs process registers its task ID in the PVM database. If the pvmgs<br />

process terminates, the pvm_joingroup() routine hangs because PVM won’t<br />

clean up the database. If this happens, you must manually terminate the<br />

program and then restart the PVM daemon.<br />

<strong>TotalView</strong> attempts to clean up the tvdsvr processes that also act as<br />

taskers. If some of these processes do not terminate, you must manually<br />

terminate them.<br />

Debugging Shared Memory<br />

(SHMEM) Code<br />

<strong>TotalView</strong> supports programs using the distributed memory access Shared<br />

Memory (SHMEM) library on Quadrics RMS systems and SGI Altix and IRIX<br />

systems. The SHMEM library allows processes to read and write data<br />

stored in the memory of other processes. This library also provided collective<br />

operations.<br />

Debugging a SHMEM RMS or SGI Altix program is no different than debugging<br />

any other program that uses a starter program. For example:<br />

totalview srun -a my_program<br />

Debugging a SHMEM program running on SGI IRIX requires the following:<br />

1 Link the SHMEM program with the dbfork library. See “Linking with the<br />

dbfork Library” in the “Compilers and Platforms” chapter of the <strong>TotalView</strong> Reference<br />

<strong>Guide</strong>.<br />

2 Start <strong>TotalView</strong> on your program. (See Chapter 4, “Setting Up a<br />

Debugging Session,” on page 51.)<br />

156 Chapter 7: Setting Up Parallel Debugging Sessions

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

Saved successfully!

Ooh no, something went wrong!