Cray Scientific and Math Libraries


The Cray Scientific and Math Libraries (CSML) are a collection of numerical routines optimized for best performance on Cray systems. These libraries satisfy dependencies for many commonly used applications on Cray systems for a wide variety of domains. When the module for a CSML package (such as cray-libsci or cray-fftw) is loaded, all relevant headers and libraries for these packages are added to the compile and link lines of the compiler drivers cc, ftn, and CC.

Cray LibSci

Cray LibSci is a collection of numerical routines tuned for performance on CPUs on Cray systems. Most users, on most codes, will find they obtain better performance by using calls to Cray LibSci routines in their applications instead of calls to public domain or user‐written versions.

Most Cray LibSci components contain both single‐processor and parallel routines optimized specifically to make the best use of supported processor and interconnect architectures. The general components of Cray LibSci are:

  • BLAS (Basic Linear Algebra Subroutines)

  • CBLAS (C interface to the legacy BLAS)

  • BLACS (Basic Linear Algebra Communication Subprograms)

  • LAPACK (Linear Algebra routines)

  • ScaLAPACK (parallel Linear Algebra routines)

Two libraries unique to Cray are:

  • IRT (Iterative Refinement Toolkit): a library of solvers and tools that provides solutions to linear systems using single‐precision factorizations while preserving accuracy through mixed‐precision iterative refinement.

  • CrayBLAS: a library of BLAS routines autotuned for Cray series HPC systems through extensive optimization and runtime adaptation.

See Cray LibSci for more details.

Cray LibSci_ACC

Cray LibSci_ACC is HPE Cray’s scientific and mathematics library for accelerators. It provides accelerated BLAS (Basic Linear Algebra Subroutines), LAPACK (Linear Algebra PACKage), PBLAS (Parallel Basic Linear Algebra Subprograms), ScaLAPACK (Scalable Linear Algebra PACKage), batched BLAS and LAPACK routines that enhance user application performance by generating and executing auto-tuned GPU kernels on Cray compute nodes.

See Cray LibSci_ACC for more details.


Cray FFTW is a C subroutine library with Fortran interfaces for computing complex-to-complex, real-to-complex, complex-to-real, and real-to- real single and multidimensional discrete Fourier transforms (DFTs). The library also includes routines to compute discrete cosine and sine transforms (DCTs/DSTs) on even and odd data, respectively.

Cray FFTW library will quickly generate highly optimized plans on Haswell, Broadwell, Intel Xeon processor Scalable family, or Xeon Phi CPUs, and AMD Rome or Milan CPUs, for the following problem types: single-threaded, double precision 1D, 2D, 3D FFTs of data type Complex-to-Complex (forward and backward), Real-to-Complex, and Complex-to-Real (particularly for, but not limited to, problem sizes that are 5-smooth).

See Cray FFTW for more details.

Cray DL Plugin

The Cray DL Plugin provides a highly tuned communication layer that can be easily added to any deep learning framework. Starting from a single process version of a deep learning application, users can include the Cray DL Plugin through the C or Python APIs. The provided routines include a high performance gradient averaging operation. Other routines facilitate process identification, job size determination, and broadcasting of initial weights and biases.

See Cray DL Plugin for more details.

Cray HDF5

HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.

The latest cray-hdf5 release note.

Cray NetCDF

NetCDF (network Common Data Form) is a set of interfaces for array-oriented data access and a freely-distributed collection of data access libraries for C, Fortran, C++, Java, and other languages. The netCDF libraries support a machine-independent format for representing scientific data. Together, the interfaces, libraries, and format support the creation, access, and sharing of scientific data.

The latest cray-netcdf release note.

Cray Parallel NetCDF

Parallel NetCDF is a library providing high-performance I/O while maintaining file-format compatibility with Unidata’s NetCDF.

The latest cray-parallel-netcdf release note.