This section provides general information about executing programs via mprun.
Execution via mprun is similar to standard Solaris program execution. For example,
Your environment is used as if you executed the program from a traditional shell.
Signals are treated as they are in standard Solaris; for multiprocess programs, if one process is killed via a signal, all processes are killed.
You can run a program in the background:
% mprun a.out &
CRE commands do differ slightly from standard Solaris execution. These differences are discussed in "Moving mprun Processes to the Background" through "SMP Characteristics of Sun HPC clusters".
When you move either a process started with mprun or a script that issues mprun commands to the background, you must do one of the following:
Redirect stdin away from the terminal.
Specify the -n option to mprun so that standard in will be read from /dev/null. See "Specifying the Behavior of I/O Streams" for a detailed discussion of standard I/O issues.
If you do not take one of these steps, the mprun process will contend with your shell for characters typed at the shell, leading to unexpected results.
If you want to perform actions that are shell specific, such as executing compound commands, you must first invoke the appropriate shell as part of the mprun command. For example,
% mprun csh -c `echo $USER`
or
% mprun csh -c `cd /foo ; bar`
Core files are produced as they normally are in Solaris. However, if more than one process dumps core in a multiprocess program, the resulting core file may be invalid.
By default, mprun handles standard output and standard error the way rsh does: The output and error streams are merged and are displayed on your terminal screen. Note that this is slightly different from the standard Solaris behavior when you are not executing remotely; in that case, the stdout and stderr streams are separate. You can obtain this behavior with mprun via the -D option. You can also specify other methods for handling I/O streams, including the three standard ones. See "Specifying the Behavior of I/O Streams" for additional information.
If your job consists of a large number of processes, you may need to consider the number of file descriptors the job is using and, if necessary, increase the default number available to you.
For merged standard I/O, each process in a job requires two descriptors. For separate stderr and stdout streams, each process requires three descriptors. You also need three file descriptors for interacting with your terminal.
You can find out the default number of file descriptors available in your shell by issuing the command
C shell
% limit descriptors
Bourne shell
# ulimit -n
The default for most shells is 64. This limits you to about 30 processes for merged standard I/O and about 20 processes for separate standard I/O. If this isn't sufficient, you can increase your limit by issuing the command
C shell
% limit descriptors 128
Bourne shell
# ulimit -n 128
Or you can set it to the maximum value
C shell
% unlimit descriptors
Bourne shell
# ulimit -n `ulimit -Hn`
The file descriptor maximum in Solaris 2.6 and Solaris 7 is 1024.
Since your Sun HPC cluster consists of symmetric multiprocessors (SMPs), the CRE takes into consideration the number of CPUs per node by default. In general, mprun will assign more processes to larger SMPs. For information about how the CRE allocates processes to CPUs, see "When Number of Processes Exceeds Number of CPUs" and "Default Process Spawning".