Numerical Libraries
IBM has developed several numerical libraries which contain numerical routines optimized for the Power4 SMP cluster architecture. Users are encouraged to use these routines where applicable instead of their own because generally they produce faster programs. There are examples of the use of some compiler options on dslogin.sdsc.edu at /usr/local/apps/examples. The following IBM libraries are available:
| IBM Library | Description |
|
MASS
(Mathematical Acceleration Subsystem) |
A set of functions that replace several of the mathematical functions in libm.a (sqrt, rsqrt, exp, log, sin, cos, tan, atan, atan2, sinh, cosh, tanh, dnint, x**y). To link in MASS scalar functions, include -L/usr/local/apps/mass -lmass in the link line. Note that since MASS replaces some functions in -lm, it must be linked on the compile line prior to -lm. Be sure to compile programs using MASS library with thread-safe (_r) compilers. MASS also has vector intrinsics. When it's necessary to perform an identical math operation on an array of input data, vector functions provide a better performance than scalar ones (see link above for some performance measurements as well as usage caveats). To link in vector intrinsics, include -L/usr/local/apps/mass -lmassvp4 in the link line. When calling the library functions from C, only call by reference is supported, even for scalar arguments. Note that some MASS functions are less accurate than the default -lm functions. The results may not be bit-wise identical. The accuracy of vector functions is comparable to that of the scalar ones, but the results still may not be bit-wise identical. |
|
ESSL
(Engineering and Scientific Subroutine Library) |
A collection of mathematical subroutines that provides a wide range of over 400 high-performance mathematical functions for many different scientific and engineering applications. ESSL includes the following:
To link in this library, include -lessl in the link line. This library works with both 32 and 64 bit environments and is thread-safe. |
| PESSL | A parallel version of ESSL. To link in this library, include -lpessl in the link line. Note that PESSL is not thread-safe. |
Other commonly used libraries on Datastar are shown below. See the link at the bottom of this section for more available libraries.
| Library | Description |
| LAPACK | Standard linear algebra libraries. They are available on Datastar in /usr/local/apps (64-bit versions) and in /usr/local/apps32 (32-bit versions). To link in the 64-bit version, use -q64 -L/usr/local/apps/LAPACK -llapack. To call LAPACK functions from C, you do not need to use trailing underscores. In addition, be sure to use the -lxlf90_r flag when linking with C compilers. |
| SCALAPACK | Parallel versions of LAPACK. They are available on Datastar in /usr/local/apps (64-bit versions) and in /usr/local/apps32 (32-bit versions). To link in the 64-bit version, use -q64 -L/usr/local/apps/scalapack -lscalapack. |
| NAG | The NAG (mark 20) numerical library is also available on DataStar. NAG offers a numerical and statistical library in Fortran that includes:
To link in the NAG library, include -q64 -L/usr/local/apps/nag -lnag in your link line. Note that NAG is available only in the 64 bit version, so the -q64 compile flag (or OBJECT_MODE set to 64) is necessary to use it. To call NAG functions from C, you do not need to use trailing underscores. In addition, be sure to use the -lxlf90_r flag when linking with C compilers. |
For information about DataStar's other numerical libraries, please visit the SDSC Resources section.




