HP-MPI User's Guide (11th Edition)
Understanding HP-MPI
Running applications on HP-UX and Linux
Chapter 3 73
The appfile for the example application contains the two lines shown
below (refer to “Creating an appfile” on page 78 for details).
-np 1 poisson_master
-np 4 poisson_child
To build and run the example application, use the following command
sequence:
% $MPI_ROOT/bin/mpicc -o poisson_master poisson_master.c
% $MPI_ROOT/bin/mpicc -o poisson_child poisson_child.c
% $MPI_ROOT/bin/mpirun -f appfile
See “Creating an appfile” on page 78 for more information about using
appfiles.
MPMD with prun
prun also supports running applications with MPMD using procfiles.
Please refer to the prun documentation at http://www.quadrics.com.
MPMD with srun
MPMD is not directly supported with srun. However, users can write
custom wrapper scripts to their application to emulate this functionality.
This can be accomplished by using the environment variables
SLURM_PROCID and SLURM_NPROCS as keys to selecting the appropriate
executable.
Modules on Linux
Modules are a convenient tool for managing environment settings for
various packages. HP-MPI for Linux provides an hp-mpi module at
/opt/hpmpi/modulefiles/hp-mpi which sets MPI_ROOT and adds to PATH
and MANPATH. To use it, either copy this file to a system-wide module
directory, or append /opt/hpmpi/modulefiles to the MODULEPATH
environment variable.
Some useful module-related commands are:
% module avail what modules can be loaded
% module load hp-mpi load the hp-mpi module
% module list list currently loaded modules