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

Getting started
Getting started using HP-UX or Linux
Chapter 224
Step 5. Analyze hello_world output.
HP-MPI prints the output from running the hello_world executable in
non-deterministic order. The following is an example of the output:
Hello world! I'm 1 of 4 n01
Hello world! I'm 3 of 4 n02
Hello world! I'm 0 of 4 n01
Hello world! I'm 2 of 4 n02
Refer to “LSF on non-XC systems” on page 77 for examples using LSF.
Building and running on an XC cluster using srun
The following is an example of basic compilation and run steps to execute
hello_world.c on a XC cluster with 4-way parallelism. To build and run
hello_world.c on a XC cluster (assuming LSF is not installed):
Step 1. Change to a writable directory.
Step 2. Compile the hello_world executable file:
% $MPI_ROOT/bin/mpicc -o hello_world \
$MPI_ROOT/help/hello_world.c
Step 3. Run the hello_world executable file:
% $MPI_ROOT/bin/mpirun -srun -n4 hello_world
where -n4 specifies 4 as the number of processes to run from SLURM.
Step 4. Analyze hello_world output.
HP-MPI prints the output from running the hello_world executable in
non-deterministic order. The following is an example of the output:
I'm 1 of 4 n01 Hello world!
I'm 3 of 4 n02 Hello world!
I'm 0 of 4 n01 Hello world!
I'm 2 of 4 n02 Hello world!
Refer to “LSF on XC systems” on page 77 for examples using LSF.
Directory structure for HP-UX and Linux
All HP-MPI files are stored in the /opt/mpi directory for HP-UX and the
/opt/hpmpi directory for Linux. The directory structure is organized as
described in Table 2-1.