Sun MPI 4.0 User's Guide: With CRE

Specifying Default Execution Options

You can use the environment variable MPRUN_FLAGS to specify one or more default options to the program execution command, mprun. Then, you need not specify any option contained in MPRUN_FLAGS. mprun will be interpreted as if the options contained in MPRUN_FLAGS were included on the command line (preceding any options that are on the command line).

You can override any default option by including a new value for the option on the mprun command line.


Note -

For the -R option, the interaction between MPRUN_FLAGS and mprun is somewhat more complicated. This special relationship is "Expressing More Complex Resource Requirements" and "Running on the Same Node(s) as a Another Specified Job".


The setting of the environment variable can be any number of valid mprun options. If you use more than one word, enclose the list in quotation marks. These options are described in more detail in the remainder of the chapter and are listed in "mprun Options ".

For example, the following makes part2 the default partition to be used for mprun.

C shell

% setenv MPRUN_FLAGS "-p part2"

Bourne shell

# MPRUN_FLAGS = "-p part2"; export MPRUN_FLAGS

You can check the current setting of MPRUN_FLAGS by issuing the command printenv.

C shell

% printenv MPRUN_FLAGS

Bourne shell

# printenv MPRUN_FLAGS

All MPRUN_FLAGS settings can be overridden by specifying the corresponding option on the mprun command line.

In addition, the default partition setting can be determined in two other ways. If -p is not specified on the mprun command line and MPRUN_FLAGS is not set to a default partition, the default partition is