HP-MPI User's Guide (11th Edition)

Understanding HP-MPI
Running applications on HP-UX and Linux
Chapter 3 65
Running applications on HP-UX and Linux
This section introduces the methods to run your HP-MPI application on
HP-UX and Linux. Using one of the mpirun methods is required. The
examples below demonstrate six basic methods. Refer to “mpirun” on
page 74 for all the mpirun command line options.
HP-MPI includes -mpi32 and -mpi64 options for the launch utility
mpirun on Opteron and Intel64. These options should be used to
indicate the bitness of the application to be invoked so that the
availability of interconnect libraries can be properly determined by the
HP-MPI utilities mpirun and mpid. The default is -mpi64.
There are six methods you can use to start your application, depending
on what kind of system you are using:
•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.
Although you can use an appfile when you run a single executable
file on a single host, it is best used when a job is to be run across a
cluster of machines which does not have its own dedicated launching
method such as srun or prun (which are described below), or when
using multiple executables. For details about building your appfile,
refer to “Creating an appfile” on page 78.
•Use mpirun with -prun using the Quadrics Elan communication
processor on Linux. For example,
% $MPI_ROOT/bin/mpirun [mpirun options] -prun \
<prun options> <program> <args>
This method is only supported when linking with shared libraries.