Sun Performance Library User's Guide |
Introduction
Sun Performance Library is a set of optimized, high-speed mathematical subroutines for solving linear algebra and other numerically intensive problems. Sun Performance Library is based on a collection of public domain applications available from Netlib at
http://www.netlib.org
. Sun has enhanced these public domain applications and bundled them as the Sun Performance Library.The Sun Performance Library User's Guide explains the Sun-specific enhancements to the base applications available from Netlib. Reference material describing the base routines is available from Netlib and the Society for Industrial and Applied Mathematics (SIAM).
Libraries Included With Sun Performance Library
Sun Performance Library contains enhanced versions of the following standard libraries:
- LAPACK version 3.0 - For solving linear algebra problems.
- BLAS1 (Basic Linear Algebra Subprograms) - For performing vector-vector operations.
- BLAS2 - For performing matrix-vector operations.
- BLAS3 - For performing matrix-matrix operations.
- FFTPACK version 4 - For performing the fast Fourier transform.
- VFFTPACK version 2.1 - A vectorized version of FFTPACK for performing the fast Fourier transform.
- LINPACK - For solving linear algebra problems in legacy applications containing routines that have not been upgraded to LAPACK 3.0.
Note LAPACK version 3.0 supersedes LINPACK, EISPACK, and all previous versions of LAPACK. Use LAPACK for new development and LINPACK to support legacy applications.
Sun Performance Library is available in both static and dynamic library versions optimized for the V8, V8+, and V9 architectures. Sun Performance Library supports static and shared libraries on Solaris 2.6, Solaris 7, and Solaris 8 and adds support for multiple processors.
Sun Performance Library LAPACK routines have been compiled with a Fortran 95 compiler and remain compatible with the Netlib LAPACK version 3.0 library. The Sun Performance Library versions of these routines perform the same operations as the Fortran callable routines and have the same interface as the standard Netlib versions.
Netlib
Netlib is an online repository of mathematical software, papers, and databases maintained by AT&T Bell Laboratories, the University of Tennessee, Oak Ridge National Laboratory, and professionals from around the world.
Netlib provides many libraries, in addition to the seven libraries used in Sun Performance Library. While some of these libraries can appear similar to libraries used with Sun Performance Library, they can be different from, and incompatible with Sun Performance Library.
Using routines from other libraries can produce compatibility problems, not only with Sun Performance Library routines, but also with the base Netlib LAPACK routines. When using non-Sun Performance Library routines, refer to the documentation provided with that library.
For example, Netlib provides a CLAPACK library, but the CLAPACK interfaces differ from the C interfaces included with Sun Performance Library. A LAPACK 90 library package is also available on Netlib. The LAPACK 90 library contains interfaces that differ from the Sun Performance Library Fortran 95 interfaces and the Netlib LAPACK version 3.0 interfaces. If using LAPACK 90, refer to the documentation provided with that library.
For the base libraries supported by Sun Performance Library, Netlib provides detailed information that can supplement this user's guide. The LAPACK 3.0 Users' Guide describes LAPACK algorithms and how to use the routines. However, these documents do not describe the Sun-specific extensions made to the base routines.
Sun Performance Library Features
Sun Performance Library provides the following optimizations and extensions to the base Netlib libraries:
- Extensions that support Fortran 95 and C language interfaces
- Fortran 95 language features, including type independence, compile time checking, and optional arguments.
- Consistent API across the different libraries in Sun Performance Library.
- Compatibility with LAPACK 1.x, LAPACK 2.0, and LAPACK 3.0 libraries
- Increased performance, and in some cases, greater accuracy
- Optimizations for specific SPARC instruction set architectures
- Support for 64-bit code on UltraSPARCTM
- Support for parallel processing compiler options
- Support for multiple processor hardware options
Mathematical Routines
The Sun Performance Library routines are used to solve the following types of linear algebra and numerical problems:
- Elementary vector and matrix operations - Vector and matrix products; plane rotations; 1, 2-, and infinity-norms; rank-1, 2, k, and 2k updates
- Linear systems - Solve full-rank systems, compute error bounds, solve Sylvester equations, refine a computed solution, equilibrate a coefficient matrix
- Least squares - Full-rank, generalized linear regression, rank-deficient, linear equality constrained
- Eigenproblems - Eigenvalues, generalized eigenvalues, eigenvectors, generalized eigenvectors, Schur vectors, generalized Schur vectors
- Matrix factorizations or decompositions - SVD, generalized SVD, QL and LQ, QR and RQ, Cholesky, LU, Schur, LDLT and UDUT
- Support operations - Condition number, in-place or out-of-place transpose, inverse, determinant, inertia
- Sparse matrices - Solve symmetric, structurally symmetric, and unsymmetric coefficient matrices using direct methods and a choice of fill-reducing ordering algorithms, including user specified orderings
- Convolution and correlation in one and two dimensions
- Fast Fourier transforms, Fourier synthesis, cosine and quarter-wave cosine transforms, cosine and quarter-wave sine transforms
- Complex vector FFTs and FFTs in two and three dimensions
Compatibility With Previous LAPACK Versions
The Sun Performance Library routines that are based on LAPACK support the expanded capabilities and improved algorithms in LAPACK 3.0, but are completely compatible with both LAPACK l.x and LAPACK 2.0. Maintaining compatibility with previous LAPACK versions:
- Reduces linking errors due to changes in subroutine names or argument lists.
- Ensures results are consistent with results generated with previous LAPACK versions.
- Minimizes programs terminating due to differences between argument lists.
With Sun Performance Library, users can safely use programs intended for the original LAPACK 1.x or 2.0. At the same time, developers can gradually upgrade the portions of their applications that use LAPACK 3.0.
Getting Started With Sun Performance Library
This section shows the most basic compiler options used to compile an application using the Sun Performance Library.
To use the Sun Performance Library, type one of the following commands:
my_system%
f95 -dalign my_file.f -xlic_lib=sunperf
or
my_system%
cc -dalign my_file.c -xlic_lib=sunperf
The routines in the Sun Performance Library are compiled with
-dalign
. For best performance, compiling applications with-dalign
is suggested. If there are cases when-dalign
cannot be used, enable trap 6, which allows misaligned data, as described in the following section.Additional compiler options exist that optimize application performance for:
- Specific SPARC instruction set architectures, as described in Compiling for SPARC Platforms.
- Shared or dedicated parallel processing models, as described in Optimizing for Parallel Processing.
Enabling Trap 6
If an application cannot be compiled using -
dalign
, enable trap 6 to provide a handler for misaligned data. To enable trap 6 on SPARC, do the following:1. Place this assembly code in a file calledtrap6_handler.s
:
.global trap6_handler_.text.align 4trap6_handler_:retlta 62. Assembletrap6_handler.s
:my_system%fbe trap6_handler.s
- The first parallelizable subroutine invoked from Sun Performance Library will call a routine named
trap6_handler_
. If atrap6_handler_
is not specified, Sun Performance Library will call a default handler that does nothing. Not supplying a handler for any misaligned data will cause a trap that will be fatal. (fbe
(1) is the Sun WorkShop assembler for SPARC platforms.)3. Includetrap6_handler.o
on the command line:
my_system%f95 any.f trap6_handler.o -xlic_lib=sunperf
Sun Microsystems, Inc. Copyright information. All rights reserved. Feedback |
Library | Contents | Previous | Next | Index |