Sun MPI 4.0 User's Guide: With CRE

Chapter 5 Debugging Programs

Prism is a component in the Sun HPC ClusterTools suite of software. You can use it to debug and visualize data in serial or message-passing programs on a Sun HPC cluster. For complete information on Prism, see the Prism 6.0 User's Guide and Prism 6.0 Reference Manual. This chapter gives a brief overview of how to start up Prism.

To use Prism, you must first log in to the Sun HPC cluster, as described in Chapter 2, Starting Sun MPI Programs. If you are using the graphical version of Prism, you must be running Solaris 2.6 or Solaris 7 with either OpenWindows or CDE.

You can start Prism by entering

% prism

and then loading your executable program from within Prism.

Alternatively, you can specify the program's name on Prism's command line. In this case, Prism will start up with the program already loaded. For example,

% prism a.out

Once the program is loaded in Prism, you can execute it, debug it, and visualize data in it. The program executes on the same node as Prism.


Note -

Prism does not debug programs at the thread level.


Debugging Sun MPI Programs

If you are going to use Prism to debug a Sun MPI program, use the -np option with mprun to specify how many processes are to be started. For example,

% prism -np 4 a.out

When you use the -np option, you can also use other Prism options, such as -p, to determine where the job's processes are to run and how they are mapped onto nodes. For example,

% prism -p part0 -np 4 a.out

starts Prism as well as the message-passing program a.out on the partition part0. Client Prism processes are also started with each of the a.out processes. They receive instructions from and return information to the master Prism daemon that is started by mprun.

You can attach to a running Sun MPI program by specifying its job ID after the name of the executable program. For example,

% prism -np 1 a.out 462

You can find out the job ID of a program by issuing the mpps command or by using the -J option to mprun.

The setting of the MPRUN_FLAGS environment variable applies to both mprun starting Prism and to Prism starting the parallel processes. This means that the default options are likely to be incorrect for one or the other, since you would typically want to start Prism on one node in a shared partition, and the Sun MPI processes on multiple nodes, possibly in a dedicated partition.