2 hp-mpi directory structure, 3 compiling and running applications, 1 setting environment variables – HP XC System 2.x Software User Manual
Page 112: 2 building and running an example application, Section 8.2), Section 8.3)
![background image](/manuals/398425/112/background.png)
HP-MPI on the HP XC system, last minute changes to HP-MPI functionality, and known
problems and work-arounds, refer to the HP-MPI Release Notes, which are included with
the HP XC documentation.
8.2 HP-MPI Directory Structure
All HP-MPI files are stored in the
/opt/hpmpi
directory. The directory structure is organized
as described Table 8-1.
If you move the HP-MPI installation directory from its default location in
/opt/hpmpi
, set
the
MPI_ROOT
environment variable to point to the new location. Refer to Section 8.3.1 for
information about moving the HP-MPI installation directory.
Table 8-1: Organization of the
/opt/hpmpi
Directory
Subdirectory
Contents
bin
Command files for the HP-MPI utilities
help
Source files for the example programs
include
Header files
lib/linux_ia32
MPI Linux 32-bit libraries for XC4000
lib/linux_amd64
MPI Linux 64-bit libraries for XC4000
lib/linux_ia64
MPI Linux 64-bit libraries for Itanium
newconfig/
Configuration files and release notes
share/man/man1*
Manpages for the HP-MPI utilities
share/man/man3*
Manpages for HP-MPI library
doc
Release notes
8.3 Compiling and Running Applications
This section shows you how to compile and run an application in the HP XC environment.
8.3.1 Setting Environment Variables
Before beginning to compile and run an HP-MPI application in the HP XC environment, do
the following:
•
If the HP-MPI installation directory has been moved from its default location in
/opt/hpmpi
, you must assure that the
MPI_ROOT
environment variable points to the
location where MPI is installed. Note that HP-MPI must be installed in the same directory
on every execution host.
•
Add
$MPI_ROOT/bin
to
PATH
.
•
Add
$MPI_ROOT/share/man
to
MANPATH
.
Note that HP-MPI modulefiles are provided with the HP XC system to set up the required
environment variables for HP-MPI. It is recommended that you employ the use of these
modulefiles to properly set up environment variables. Refer to Section 2.2 for information
about using modulefiles.
8.3.2 Building and Running an Example Application
This section teaches you the basic compilation and run steps to execute an MPI application on
the HP XC system. Section 8.3.2.1 provides an example application called
hello_world.c
.
Section 8.3.2.2 shows how to build and run
hello_world.c
on your system with four-way
8-2
Using HP-MPI