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 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:
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 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 -lessl -lpessl -lblacs
After setting the LIBPATH command, the /home/me/lib directory is the directory that gets searched first for the necessary libraries. This same search criterion is used at both compile and link time and run time.
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.
You do not need to modify your existing Fortran compilation procedures when using Parallel ESSL |unless you are accessing the Fortran 90 sparse linear algebraic |equation subroutines from a 64-bit-environment program. In that |case, you must add:
|-I/usr/lpp/pessl.rte.common/include/64
|to your compilation command (as shown in the table |below).
|When linking and running your program, you must 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 commands in the table below.
|
ESSL Library Name | Command | |
---|---|---|
SMP | 32-bit |
mpxlf_r -O xyz.f -lesslsmp -lpesslsmp -lblacssmp |
64-bit |
mpxlf_r -O -q64 xyz.f -lesslsmp -lpesslsmp -lblacssmp mpxlf_r -O -q64 xyz.f -lesslsmp -lpesslsmp -lblacssmp -I/usr/lpp/pessl.rte.common/include/64 | |
Serial | 32-bit |
mpxlf -O xyz.f -lessl -lpessl -lblacs |
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.
|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 do want to specify your own definitions for short- and |long-precision complex data, add -D_CMPLX and -D_DCMPLX, |respectively, to your compile and link command. Otherwise, you |automatically use the definitions of short- and long-precision complex data |provided in the Parallel ESSL header file (as shown in the table |below).
|When linking and running your program, you must modify your existing |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 commands shown in the table below.
|
ESSL Library Name | Command | |
---|---|---|
SMP | 32-bit |
mpcc_r -O xyz.c -lesslsmp -lpesslsmp -lblacssmp mpcc_r -O -D_CMPLX -D_DCMPLX xyz.c -lesslsmp -lpesslsmp -lblacssmp |
64-bit |
mpcc_r -O -q64 xyz.c -lesslsmp -lpesslsmp -lblacssmp mpcc_r -O -D_CMPLX -D_DCMPLX -q64 xyz.c -lesslsmp -lpesslsmp -lblacssmp | |
Serial | 32-bit |
mpcc -O xyz.c -lessl -lpessl -lblacs mpcc -O -D_CMPLX -D_DCMPLX xyz.c -lessl -lpessl -lblacs |
|The Parallel ESSL header file pessl.h, used for C |and C++ programs, is installed in the |/usr/include directory. When using |Parallel ESSL, the compiler option -qnocinc=/usr/include/pessl must |be specified.
|If you are using the IBM Open Class Complex Mathematics Library, 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 (as shown in the table below). Otherwise, Parallel ESSL will |use the IBM Open Class Complex Mathematics Library or the Standard Numerics |Library, as described in ESSL Guide and |Reference.
|If you prefer to explicitly specify that you want to use the |Standard Numerics Library facilities for complex arithmetic, add |-D_ESV_COMPLEX_ to your command |as shown in the table below.
|The Parallel ESSL header file supports two alternatives for |declaring scalar output arguments. By default, the arguments are |declared to be type reference. If you prefer for them to be declared as |pointers, add -D_ESVCPTR to your commands as shown in the |table below.
|When linking and running your program, you must modify your existing |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 commands shown in the table below.
ESSL Library Name | Command | |
---|---|---|
SMP | 32-bit |
mpCC_r -O xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl mpCC_r -O -D_CMPLX xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl mpCC_r -O -D_ESV_COMPLEX_ xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl mpCC_r -O -D_ESVCPTR xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl |
64-bit |
mpCC_r -O -q64 xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl mpCC_r -O -D_CMPLX -q64 xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl mpCC_r -O -D_ESV_COMPLEX_ -q64 xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl mpCC_r -O -D_ESVCPTR -q64 xyz.C -lesslsmp -lpesslsmp -lblacssmp -qnocinc=/usr/include/pessl | |
Serial | 32-bit |
mpCC -O xyz.C -lessl -lpessl -lblacs -qnocinc=/usr/include/pessl mpCC -O -D_CMPLX xyz.C -lessl -lpessl -lblacs -qnocinc=/usr/include/pessl mpCC -O -D_ESV_COMPLEX_ xyz.C -lessl -lpessl -lblacs -qnocinc=/usr/include/pessl mpCC -O -D_ESVCPTR xyz.C -lessl -lpessl -lblacs -qnocinc=/usr/include/pessl |