Parallel Programming Guide for HP-UX Systems

MPI
Running
Chapter 2 43
-e
var
=
val
Sets the environment variable
var
for the program and gives it the value
val
. The
default is not to set environment variables. When you use -e with the -h option, the
environment variable is set to
val
on the remote host.
-l
user
Specifies the user name on the target host. The default is the current user name.
-sp
paths
Sets the target shell PATH environment variable to
paths
. Search paths are
separated by a colon. Both -sp path and -e PATH=path do the same thing. If both are
specified, the -e PATH=path setting is used.
-np
#
Specifies the number of processes to run. The default value for # is 1.
program
Specifies the name of the executable to run. mpirun searches for the executable in
the paths defined in the PATH environment variable.
args
Specifies command line arguments to the program. Options following a program
name in your appfile are treated as program arguments and are not processed by
mpirun.
Adding program arguments to your appfile When you invoke mpirun using an appfile, arguments
for your program are supplied on each line of your appfile—Refer to “Creating an appfile” on page 42. HP
MPI also provides an option on your mpirun command line to provide additional program arguments to
those in your appfile. This is useful if you wish to specify extra arguments for each program listed in
your appfile, but do not wish to edit your appfile.
To use an appfile when you invoke mpirun, use one of the following as described in “mpirun (mpirun.all)”
on page 36:
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: