HP-MPI User's Guide (11th Edition)
Understanding HP-MPI
Running applications on HP-UX and Linux
Chapter 3 79
•
mpirun [mpirun_options] -f appfile \
[-- extra_args_for_appfile]
• bsub [lsf_options] pam -mpi mpirun [mpirun_options] -f appfile \
[-- extra_args_for_appfile]
The -- extra_args_for_appfile option is placed at the end of your command
line, after appfile, to add options to each line of your appfile.
CAUTION Arguments placed after - - are treated as program arguments, and are not
processed by mpirun. Use this option when you want to specify program
arguments for each line of the appfile, but want to avoid editing the appfile.
For example, suppose your appfile contains
-h voyager -np 10 send_receive arg1 arg2
-h enterprise -np 8 compute_pi
If you invoke mpirun using the following command line:
mpirun -f appfile -- arg3 -arg4 arg5
• The send_receive command line for machine voyager becomes:
send_receive arg1 arg2 arg3 -arg4 arg5
• The compute_pi command line for machine enterprise becomes:
compute_pi arg3 -arg4 arg5
When you use the -- extra_args_for_appfile option, it must be specified at
the end of the mpirun command line.
Setting remote environment variables To set environment variables on
remote hosts use the -e option in the appfile. For example, to set the variable
MPI_FLAGS:
-h remote_host -e MPI_FLAGS=val [-np #] program [args]
For instructions on how to set environment variables on HP-UX and Linux, refer
to “Setting environment variables on the command line for HP-UX and Linux” on
page 131.
For instructions on how to set environment variables on Windows CCP, refer to
“Runtime environment variables for Windows CCP” on page 97.
Assigning ranks and improving communication The ranks of the
processes in MPI_COMM_WORLD are assigned and sequentially ordered according to
the order the programs appear in the appfile.