12 mkl library, 13 acml library, 14 other libraries – HP XC System 4.x Software User Manual

Page 45: 2 building parallel applications, 1 compiling and linking non-mpi applications, 2 compiling and linking hp-mpi applications

Advertising
background image

4.7.1.12 MKL Library

MKL is a math library that references pthreads, and in enabled environments, can use multiple
threads. MKL can be linked in a single-threaded manner with your application by specifying
the following in the link command:

On the CP3000 and CP4000 platforms (as appropriate):

-L/opt/intel/mkl70/lib/32 -lmkl_ia32 -lguide -pthread

-L/opt/intel/mkl70/lib/em64t -lmkl_em64t -lguide -pthread

On the CP6000 platforms:

-L/opt/intel/mkl70/lib/64 -lmkl_ipf -lguide -pthread

4.7.1.13 ACML Library

You can use the AMD Core Math Library (ACML library) on the CP4000 platform.

4.7.1.14 Other Libraries

Other libraries can be used as they would on any other system. However they must contain
single core routines and have no dependencies on another message passing system.

4.7.2 Building Parallel Applications

This section describes how to build MPI and non-MPI parallel applications on an HP XC system.

4.7.2.1 Compiling and Linking Non-MPI Applications

If you are building non-MPI applications, such as an OpenMP application for example, you can
compile and link them on an HP XC as you normally would, with standard header files and
switches.

4.7.2.2 Compiling and Linking HP-MPI Applications

This section provides some general information about how to build an HP-MPI application in
the HP XC environment.

Compiling and linking an MPI application on an HP XC system is performed by invoking the
HP-MPI compiler utilities. HP-MPI compiler utilities are scripts supplied by HP-MPI to make it
easier to invoke a compiler with the appropriate libraries and search paths. The HP-MPI compiler
utilities add all the necessary path locations and library specifications to the compile and link
steps that are required to build a HP XC parallel application. It is highly recommended that you
use the HP-MPI compiler utilities to compile and link your MPI application on an HP XC cluster,
rather than invoke a compiler directly.

The mpicc, mpic++, mpif90, and mpif77 MPI compiler commands are used to invoke the
HP-MPI compiler utilities that compile and link an MPI application. The mpicc and mpic++
commands invoke the drivers of the C and C++ compilers. The mpif77 and mpif90 commands
invoke the drivers of the Fortran 77 and Fortran 90 compilers.

Before you can compile and link an MPI program using the MPI compiler commands, the MPI
compiler utilities module (mpi) must be loaded by using the module load mpi command, or
you must arrange for them to be in your $PATH search list. The use of modules is described in

“Overview of Modules”

.

4.7.2.3 Examples of Compiling and Linking HP-MPI Applications

The following examples show how to compile and link your application code by invoking a
compiler utility.

If you have not already loaded the mpi compiler utilities module , load it now as follows:

$ module load mpi

4.7 Developing Parallel Applications

45

Advertising