Parallel Programming Guide for HP-UX Systems

MPI
Running
Chapter 2 23
Running
Running applications
This section introduces the methods to run your HP MPI application. Using one of the mpirun
methods is required. The examples below demonstrate two basic methods. Refer to “mpirun
(mpirun.all)” on page 36 for all the mpirun command line options.
There are three methods you can use to start your application:
Use mpirun with the -np # option and the name of your program. For example,
% $MPI_ROOT/bin/mpirun -np 4 hello_world
starts an executable file named hello_world with four processes. This is the recommended
method to run applications on a single host with a single executable file.
Use mpirun with an appfile. For example,
% $MPI_ROOT/bin/mpirun -f appfile
where -f appfile specifies a text file (appfile) that is parsed by mpirun and contains
process counts and a list of programs.
You can use an appfile when you run a single executable file on a single host and you must
use this appfile method when you run on multiple hosts or run multiple executables. For
details about building your appfile, refer to “Creating an appfile” on page 42.
Use mpirun with -prun using the Quadrics Elan3 communication processor on Linux or
Tru64UNIX. For example,
% $MPI_ROOT/bin/mpirun [
mpirun options
] -prun [
prun options
]
This method is only supported when linking with shared libraries.
This method allows full MPI-2 functionality. Some features like mpirun -stdio
processing are still unavailable.
The -np option is not allowed with -prun. The following mpirun options are allowed with
-prun:
mpirun [-help] [-version] [-jv] [-i <spec>] [-universe_size=#] [-sp <
paths
>]
[-T] [-prot] [-spawn] [-1sided] [-e var[=val]] -prun <
prun options
><
program
>
[<
args
>]