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

Understanding HP-MPI
C++ bindings (for HP-UX and Linux)
Chapter 3 51
2. Compile and create the libmpiCC.a library.
% make CXX=pgCC MPI_ROOT=$MPI_ROOT
pgCC -c intercepts.cc -I/opt/hpmpi/include
-DHPMP_BUILD_CXXBINDING PGCC-W-0155-Nova_start()
seen (intercepts.cc:33)
PGCC/x86 Linux/x86-64 6.2-3: compilation completed with
warnings pgCC -c mpicxx.cc - I/opt/hpmpi/include
-DHPMP_BUILD_CXXBINDING ar rcs libmpiCC.a intercepts.o
mpicxx.o
3. Using a testcase, test that the library works as expected.
% mkdir test ; cd test
% cp $MPI_ROOT/help/sort.C .
% $MPI_ROOT/bin/mpiCC HPMPI_CC=pgCC sortC -mpiCClib \
../libmpiCC.a
sort.C:
% $MPI_ROOT/bin/mpirun -np 2 ./a.out
Rank 0
-980
-980
.
.
.
965
965