Guide and Reference


Running Your Message Passing Program

This section describes both the Parallel ESSL-specific and ESSL-specific changes you need to make to your PE job procedures for compiling, linking, and running your message passing program. For details on general PE job procedures, see the appropriate Parallel Environment: Operation and Use manual.

You can use any procedures you are currently using to compile, link, and run your Fortran, C, and C++ programs, as long as you make the necessary modifications required by Parallel ESSL.

Notes:

  1. The default search path for the Parallel ESSL and ESSL libraries is: /usr/lib. (Note that /lib is a symbolic link to /usr/lib.)

    If the libraries are installed somewhere else, add the path name of that directory to the beginning of the LIBPATH environment variable, being careful to keep /usr/lib in the path. The correct LIBPATH setting is needed both for linking and executing the program.

    For example, if you are using POWER2 nodes only, and you installed the Parallel ESSL libraries in /home/me/lib you would issue ksh commands similar to the following in order to compile and link a program:

        LIBPATH=/home/me/lib:/usr/lib
        export LIBPATH
        mpxlf -o myprog myprog.f -lesslp2 -lpesslp2 -lblacsp2
    

    After setting the LIBPATH command, the /home/me/lib directory is the directory that gets searched first for the necessary libraries. This same search criteria is used at both compile and link time and run time.

  2. The ESSL and Parallel ESSL libraries are shared libraries and must be used in conjunction with each other. Equivalent subroutines with the same names in other libraries (such as, libblas.a) will not be used even if they are specified on the command line in place of the ESSL library.

  3. In your job procedures, you must use only the allowable compilers and libraries listed in Table 1 for AIX.

Dynamic Linking Versus Static Linking

Only dynamic linking is supported for programs using Parallel ESSL. For details about how to do this, see the appropriate Parallel Environment: Operation and Use manual.

Fortran Program Procedures

You do not need to modify your existing Fortran compilation procedures when using Parallel ESSL. For example, you can use:
ESSL Library Name Command
SMP or Thread-Tolerant
   mpxlf_r  -c  xyz.f

POWER2 or POWER
   mpxlf  -c  xyz.f

where xyz.f is the name of your Fortran program.

When linking and running your program, you need to modify your existing PE job procedures for Parallel ESSL, to set up the necessary libraries. If you are accessing Parallel ESSL from a Fortran program, you can compile and link using the following command:
ESSL Library Name Command
SMP
   mpxlf_r  -O  xyz.f  -lesslsmp -lpesslsmp -lblacssmp

Thread-Tolerant
   mpxlf_r  -O xyz.f  -lesslp2_r -lpesslp2_t -lblacsp2_t

POWER2
   mpxlf  -O  xyz.f  -lesslp2 -lpesslp2 -lblacsp2

POWER
   mpxlf  -O  xyz.f  -lessl -lpessl -lblacs

where xyz.f is the name of your Fortran program.

If you want to compile and link your Fortran program in separate steps, you can use the following commands:
ESSL Library Name Command
SMP
   mpxlf_r  -O  -c xyz.f
   mpxlf_r  xyz.o  -lesslsmp  -lpesslsmp  -lblacssmp

Thread-Tolerant
   mpxlf_r  -O  -c  xyz.f
   mpxlf_r  xyz.o  -lesslp2_r -lpesslp2_t -lblacsp2_t

POWER2
   mpxlf  -O  -c xyz.f
   mpxlf  xyz.o  -lesslp2 -lpesslp2 -lblacsp2

POWER
   mpxlf  -O  -c xyz.f
   mpxlf  xyz.o  -lessl -lpessl -lblacs

where xyz.f is the name of your Fortran program, and xyz.o is the name of your object file.

Parallel ESSL supports the XL Fortran compile-time option -qextname. For details, see the Fortran manuals.

An example of a makefile is shown in "Makefile (Message Passing)".

C Program Procedures

The Parallel ESSL header file pessl.h, used for C and C++ programs, is installed in the /usr/include directory. You do not need to modify your existing C compilation procedures when using Parallel ESSL, unless you want to specify your own definitions for complex data.

If you want to specify your own definitions for short- and long-precision complex data, add -D_CMPLX and -D_DCMPLX, respectively, to your compile command, as shown here:
ESSL Library Name Command
SMP or Thread-Tolerant
   mpcc_r  -c  -D_CMPLX  -D_DCMPLX  xyz.c

POWER2 or POWER
   mpcc  -c  -D_CMPLX  -D_DCMPLX  xyz.c

where xyz.c is the name of your C program. Otherwise, you automatically use the definitions of short- and long-precision complex data provided in the Parallel ESSL header file.

When linking and running your program, you need to modify your existing PE job procedures for Parallel ESSL, to set up the necessary libraries. If you are accessing Parallel ESSL from a C program, you can compile and link using the following command:
ESSL Library Name Command
SMP
   mpcc_r  -O  xyz.c  -lesslsmp -lpesslsmp  -lblacssmp

Thread-Tolerant
   mpcc_r  -O xyz.c  -lesslp2_r -lpesslp2_t -lblacsp2_t

POWER2
   mpcc -O  xyz.c  -lesslp2 -lpesslp2 -lblacsp2

POWER
   mpcc  -O  xyz.c  -lessl -lpessl -lblacs

where xyz.c is the name of your C program.

If you want to compile and link your C program in separate steps, use the following commands:
ESSL Library Name Command
SMP
   mpcc_r  -O  -c xyz.c
   mpcc_r  xyz.o  -lesslsmp  -lpesslsmp  -lblacssmp

Thread-Tolerant
   mpcc_r  -O  -c  xyz.c
   mpcc_r  xyz.o  -lesslp2_r -lpesslp2_t -lblacsp2_t

POWER2
   mpcc  -O  -c xyz.c
   mpcc  xyz.o  -lesslp2 -lpesslp2 -lblacsp2

POWER
   mpcc  -O  -c xyz.c
   mpcc  xyz.o  -lessl -lpessl -lblacs

where xyz.c is the name of your C program and xyz.o is the name of your object file.

In the above cases, you automatically use the definitions of short- and long-precision complex data provided in the Parallel ESSL header file. If you prefer to specify your own definitions for short- and long-precision complex data, add -D_CMPLX and -D_DCMPLX, respectively, to your commands.
ESSL Library Name Command
SMP
mpcc_r  -O  -D_CMPLX  -D_DCMPLX xyz.c -lesslsmp -lpesslsmp -lblacssmp

Thread-Tolerant
mpcc_r  -O  -D_CMPLX  -D_DCMPLX xyz.c -lesslp2_r -lpesslp2_t -lblacsp2_

POWER2
mpcc  -c  -D_CMPLX  -D_DCMPLX  xyz.c -lesslp2 -lpesslp2 -lblacsp2

POWER
mpcc  -c  -D_CMPLX  -D_DCMPLX  xyz.c -lessl -lpessl -lblacs

where xyz.c is the name of your C program.

C++ Program Procedures

The Parallel ESSL header file pessl.h, used for C and C++ programs, is installed in the /usr/include directory. You do not need to modify your existing C++ compilation procedures when using Parallel ESSL, unless you want to specify your own definitions for complex data.

If you want to specify your own definition for short-precision complex data, add -D_CMPLX to your command, as shown here:
ESSL Library Name Command
SMP or Thread-Tolerant
   mpCC_r  -c  -D_CMPLX  -D_DCMPLX  xyz.C

POWER2 or POWER
   mpCC  -c  -D_CMPLX  -D_DCMPLX  xyz.C

where xyz.C is the name of your C++ program. Otherwise, you automatically use the definition of short-precision complex data provided in the Parallel ESSL header file.

When linking and running your program, you need to modify your existing PE job procedures for Parallel ESSL, to set up the necessary libraries. If you are accessing Parallel ESSL from a C++ program, you can compile and link using the following command:
ESSL Library Name Command
SMP
    mpCC_r  -O  xyz.C  -lesslsmp -lpesslsmp  -lblacssmp

Thread-Tolerant
    mpCC_r  -O xyz.C  -lesslp2_r -lpesslp2_t -lblacsp2_t

POWER2
    mpCC -O  xyz.C  -lesslp2 -lpesslp2 -lblacsp2

POWER
    mpCC  -O  xyz.C  -lessl -lpessl -lblacs

where xyz.C is the name of your C++ program.

If you want to compile and link your C++ program in separate steps, you can use the following commands:
ESSL Library Name Command
SMP
   mpCC_r  -O  -c xyz.C
   mpCC_r  xyz.o  -lesslsmp  -lpesslsmp  -lblacssmp

Thread-Tolerant
   mpCC_r  -O  -c  xyz.C
   mpCC_r  xyz.o  -lesslp2_r -lpesslp2_t -lblacsp2_t

POWER2
   mpCC  -O  -c xyz.C
   mpCC  xyz.o  -lesslp2 -lpesslp2 -lblacsp2

POWER
   mpCC  -O  -c xyz.C
   mpCC  xyz.o  -lessl -lpessl -lblacs

where xyz.C is the name of your C++ program, and xyz.o is the name of your object file.

In the above cases, you automatically use the definition of short-precision complex data provided in the Parallel ESSL header file. If you prefer to specify your own definition for short-precision complex data, add -D_CMPLX to your commands.
ESSL Library Name Command
SMP
mpCC_r  -O  -D_CMPLX xyz.C  -lesslsmp -lpesslsmp -lblacssmp

Thread-Tolerant
mpCC_r  -O  -D_CMPLX xyz.C -lesslp2_r -lpesslp2_t -lblacsp2_t

POWER2
mpCC  -c  -D_CMPLX  xyz.C -lesslp2 -lpesslp2 -lblacsp2

POWER
mpCC  -c  -D_CMPLX  xyz.C  -lessl -lpessl -lblacs

where xyz.C is the name of your C++ program.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]