Starting TotalView on an MPICH Job

Before you can an MPICH job under TotalView's control, you must have both TotalView and the TotalView server in you path. You can set this up in your login or shell start-up scripts.

To start a job under TotalView's control, add the -tv option to the mpirun command:

    mpirun [ MPICH-arguments ] -tv program [ program-arguments ]

For example:

mpirun -np 4 -tv sendrecv 

The MPICH mpirun command extracts the value of the TOTALVIEW environment variable and then uses its value when starting the first process in the parallel job.

Note:   In other contexts, setting this environment variable means that you can use a different TotalView or pass command-line options to TotalView.

For example, here is the C shell command that sets the TOTALVIEW environment variable so that mpirun will start TotalView using the -no_stop_all option:

setenv TOTALVIEW "totalview -no_stop_all" 

TotalView begins by starting the first process of your job, the master process, under its control. You can then set breakpoints, and begin debugging your code.

On the IBM SP machine, the mpirun command uses the poe command to start an MPI job. While you still must use the MPICH mpirun (and its -tv option) command to start an MPICH job, the way you start MPICH differs since you are using poe. For details of using TotalView with poe, see Starting TotalView on a PE Job.

TotalView will automatically acquire the other processes that make up your parallel job. A dialog box will appear that asks if you want to stop the spawned processes. If your answer is Yes, you can stop processes as they are initialized. This lets you check their states before they run too farthe following figure.

TotalView automatically copies breakpoints from the master process to the slave processes as it acquires them. Consequently, you do not have to stop them just to set these breakpoints. Next, TotalView updates the Root Window Attached Page to show these newly acquired processes.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0