A P P E N D I X  A

Prism man Page


prism

Enter the Prism environment.

Syntax

To start in multi-process program mode:

mprun [mprun-options] prism
[ -C | -CX ] 
[ Xoption ...]
[ < infile ] [ > outfile ]
[ -install ] [ -threads ] [ -nothreads ]
[ program-name ] 

To attach to a running multi-process job:

prism [ program-name | - jid | - jid-list ] 
[ -C | -CX ] 
[ Xoption ...]
[ < infile ] [ > outfile ]
[ -install ] [ -threads ] [ -nothreads ]

To start in serial program mode:

prism program-name
[ -C | -CX ] 
[ Xoption ...]
[ < infile ] [ > outfile ]
[ -install ] [ -threads ] [ -nothreads ]

To attach to a running serial program:

prism [ program-name | - pid ] 
[ -C | -CX ] 
[ Xoption ...] [ core-file ]
[ < infile ] [ > outfile ]
[ -install ] [ -threads ] [ -nothreads ]

Ways To Start Prism

The Prism environment is an X-based graphical environment that enables you to develop, execute, debug, and visualize data for both serial and parallel programs. Youcan start the Prism environment independently and then run a set of programs through it, or you can attach it to a running pro gram. As a result, you can start the Prism environment in four different ways:

Starting In Multi-Process Program Mode

When you start the Prism environment in parallel program mode, you are essentially starting it along with a parallel processing environment. That parallel processing environment uses the number of processes, resource manager, and any other characteristics specified by the mprun(1) command. The syntax is:

mprun mprun-options prism prism-options

For example:

% mprun -np 4 -x lsf prism

The syntax shown above starts a multi-processing environment with four processes under the control of the LSF resource manager, a host prism process, and four node prism processes, one for each of the four processes reserved by mprun(1).

Attaching To A Running Multi-Process Program

You can attach the Prism environment to a parallel program that is already running. One instance of the prism environment is created for each process in the program, plus one for the host. All you need to provide is the job name or job names to which you want the Prism environment attached. The syntax for attaching prism to a running parallel program is:

prism [ program-name | -jid | -jid-list ] prism-options

The Prism environment loads the jobs you specify into the Prism environment. The processes are interrupted, and you can then work with the program in the Prism environment as you normally would.

Starting in Serial Program Mode

You can start the Prism environment for use with serial (scalar) programs, by using this syntax:

prism program-name prism-options

Attaching To A Running Serial Program

You can attach the Prism environment to a running serial program by using this syntax:

prism [ program-name | - pid ] prism-options

When attaching to a running serial program in this manner, the Prism environment must be started on the same node on which the process is running.

 

Integrating the Prism Environment With Resource Managers

As described in mprun(1), you can start a parallel job from within several different resource managers, either interactively or through a script. Using either method, you must first enter the resource manager environment before you can start the Prism environment.

Once you have entered the resource manager environment, start the Prism environment either within mprun or after, using this syntax:

mprun mprun-options prism prism-options 

The mprun command launches a node Prism process for each rank, and a host prism process on the same node as rank 0. The Prism processes running on the ranks are under the control of the resource manager, but the host Prism process is not.
Following are examples of the Prism environment being used by the resource managers to debug the program a.out in interactive mode. For more information, see the appropriate resource manager manpage:

An interactive LSF session - see the lsf_cre(1) manpage:
An interactive PBS session - see the pbs_cre(1) manpage:
An interactive SGE session - see the sge_cre(1) manpage:
You cannot attach the Prism environment to an individual job through the batch system because no resources would be available for it. Instead, attach it using this syntax:

% bsub -Is -n 16 qshort cshLSF csh> mprun -x lsf prism -C a.outprism> runprism> quit
LSF csh>

% qsub -l nodes=16:ppn=1 -IPBS csh> mprun -x pbs prism -C a.outprism> runprism> quitPBS csh>

% qsh -pe cre 16SGE csh> mprun -x sge prism a.outprism> runprism> quitSGE csh>

% prism a.out sge.100

The example above attaches the Prism environment to the program a.out with jobid sge.100. To find a program's jobid, use mpps(1).

Notes

You must execute the prism command from a terminal or workstation running the X Window System (unless you specify the -C option).

If started in GUI mode and issued without the name of an executable program, prism displays the main window of the Prism environment, with no program loaded.

If you specify core-file, the Prism environment associates that core file with the program you load. Within the Prism environment, you can then examine the stack and display the values of variables at the point at which core was dumped.

If you specify infile, prism reads and executes commands from the specified file upon startup. Note that specifying an infile redirects standard input (stdin), blocking subsequent user input to the Prism environment. If you specify outfile, the Prism environment logs all its input and output to this file. This includes commands from infile and commands typed on the command line within the Prism environment.

If you specify -install, prism uses a private colormap at startup. If the -install option is not used, prism uses the default colormap and might run out of color resources.

If you specify -threads, prism operates on programs that have not been linked to the libmpi_mt library as threaded programs. For example, you might want to use this option if your program uses threads in its I/O or graphic user interface.

If you specify -nothreads, prism treats multithreaded programs as though they are unthreaded. This allows you to debug multithreaded programs using only the main thread. For example, you might want to use this option if your program generates threads automatically (by making library calls that have threaded implementations).

If there is a .prisminit file in your current working directory, prism executes the commands in it upon startup. If .prisminit isn't in your current working directory, the Prism environment looks for it in your home directory. If it isn't in either place, the Prism environment starts up without executing a .prisminit file.

To use the Prism environment's debugging features, compile and link each program module with the -g compiler option to produce the necessary debugging information.

Options

-C
Start the Prism environment for commands-only execution. The Prism environment displays a prompt from which you can issue any Prism commands. If you use this option, you do not need an X terminal or workstation.

-CX
Start the mode of the Prism environment that uses commands-only execution (like -C), but in which the output of certain Prism commands can be sent to X windows.

-install
Use a private colormap at startup.

-threads
View programs that have not been linked with libmpi_mt as threaded programs.

-nothreads
View multithreaded programs as though they were unthreaded.

Xoption
Apply the X toolkit option. The prism command accepts all standard X toolkit options. However, the -font, -title, and -rv options have no effect, and the -bg option is overridden in part by the setting of the Prism.textBgColor resource. X toolkit options are meaningless, of course, if you use -C to run Prism in commands-only mode.

Passing Command Line Options to Secondary Sessions

 

When debugging programs that make calls to MPI_Comm_spawn() or MPI_Comm_spawn_multiple(), the Prism environment creates special node Prism processes to debug the processes created by the spawn calls. These special node Prism processes are sometimes called secondary Prism sessions.

Secondary Prism sessions acquire some, but not all, options that you have set when you launch the primary Prism session. The acquisition status of Prism command line options is described below:

 

 

Command Option Set In Primary Prism Session

Acquired by Secondary Prism Session

-C | -CX

Yes

Xoption

Yes

-pid | -jid | -jid-list

Yes

core-file | pid | jid-list

No

< infile

No

> outfile

No

-install

Yes

-threads | -nothreads

Yes

-

No


Files

.prisminit

Prism initialization file

.prism_defaults

Prism defaults file


Identification

Prism Version 7.0.

See Also

mprun(1), mpps(1), sge_cre(1), lsf_cre(1), pbs_cre(1)
Prism User's Guide, Prism Reference Manual