Parallel Programming Guide for HP-UX Systems

MPI
Compiling and Linking
Chapter 222
NOTE In HP Fortran 3.2 and higher versions, the +Oparallel option is not supported
on Integrity systems. You must use +Oautopar instead of +Oparallel for
Fortran applications on Integrity systems.
Building Applications
This example shows how to build hello_world.c prior to running.
Step 1. Change to a writable directory.
Step 2. Compile the hello_world executable.
For shared libraries:
% $MPI_ROOT/bin/mpicc -o hello_world $MPI_ROOT/help/
hello_world.c
For archive libraries:
On HP-UX:
% $MPI_ROOT/bin/mpicc -o hello_world $MPI_ROOT/help/
hello_world.c -Wl,-aarchive_shared
On Linux:
% $MPI_ROOT/bin/mpicc -o hello_world $MPI_ROOT/help/
hello_world.c -static
On Tru64UNIX:
% $MPI_ROOT/bin/mpicc -o hello_world $MPI_ROOT/help/
hello_world.c -non_shared