This section provides a brief introduction to the Prism development environment. For complete information about Prism, see the Prism 6.0 User's Guide.
Prism can debug only one Sun MPI job at a time. Therefore, if an MPI job spawns or connects to another job (using MPI_Comm_accept and MPI_Comm_connect to implement client/server communication, for example, or MPI_Comm_spawn to spawn jobs), the Prism session nonetheless has control of only the original MPI job to which it is attached. For example, a Prism session debugging a server job cannot also debug the clients of that job.
To use Prism to debug a Sun MPI program, the program must be written in the SPMD (single process, multiple data) style -- that is, all processes that make up a Sun MPI program must be running the same executable.
MPI_Comm_spawn_multiple can create multiple executables with only one job id. You cannot use Prism to debug jobs with different executables that have been spawned with this command.
To debug a Sun MPI program with Prism, you need to have compiled your program using one of the compilers included in either the Sun Performance WorkShop Fortran or Sun Performance WorkShop C++/C suite of tools.
To start Prism on a Sun MPI program, use the -n option to bsub to specify how many processors you want to run on. For example,
% prism -n 4 foo
launches Prism on executable foo with four processes.
This starts up a graphical version of Prism with your program loaded. You can then debug and visualize data in your Sun MPI program.
You can also attach Prism to running processes. First determine the job id (not the individual process id), or jid, using either bsub (in LSF) or mpps (in the CRE). (See the LSF Batch User's Guide for further information about bjobs. See the Sun MPI 4.0 User`s Guide: With CRE for further information about mpps.) Then specify the jid at the command line with the -n (or -np, -c, -p) option:
% prism -n 4 foo 12345
This will launch Prism and attach it to the processes running in job 12345.
To run graphical Prism, you must be running Solaris 2.6 or Solaris 7 with either OpenWindows(TM) or the Common Desktop Environment (CDE), and with your DISPLAY environment variable set correctly. See the Prism 6.0 User's Guide for information.
One important feature of Prism is that it lets you debug the Sun MPI program at any level of detail. You can look at the program as a whole or at subsets of processes within the program (for example, those that have an error condition), or at individual processes, all within the same debugging session. For complete information, see the Prism 6.0 User's Guide.