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

SubdirectoryContents

bin

help include lib/linux_ia32 lib/linux_amd64 lib/linux_ia64 newconfig/ share/man/man1* share/man/man3* doc

Command files for the HP-MPI utilities

Source files for the example programs Header files

MPI Linux 32-bit libraries for XC4000 MPI Linux 64-bit libraries for XC4000 MPI Linux 64-bit libraries for Itanium Configuration files and release notes Manpages for the HP-MPI utilities Manpages for HP-MPI library 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-2Using HP-MPI