This Mathematical Software Overview compares the chief mathematical subroutine libraries available and explains the lookup and support tools (including reference manuals) that help you use those libraries effectively. It also introduces a few important, commercial, interactive math tools available at LC.
The belief behind LC's approach to mathematical software support is that computational tasks required in a wide variety of applications share common, mathematically defined features to which general purpose techniques can be applied. This results in a long-term overall cost savings through software reuse and reduced duplication of effort. This approach was long embodied in LC's former Mathematical Software Support Service (MSS) and its predecessor groups. It is still reflected in the surviving products of those groups, including local libraries (such as PMATH) and local self-help sites for numerical mathematics software, such as the LINMath Web site. In addition, LC maintains math libraries in compiled (object) form, mostly from commercial vendors, on its machines. This document surveys those libraries and sites, compares their features, and offers links to current reference documentation.
For help, contact the LC Hotline at 925-422-4531 or via email (OCF: lc-hotline@llnl.gov, SCF: lc-hotline@pop.llnl.gov).
Users often ask which mathematics libraries and interactive mathematical tools are "available" on which LC systems. The answer depends on what you regard as availability and on how much customization you need (or are willing to perform). Some mathematics libraries, mostly from commercial vendors, are preinstalled as compiled (object) code. The libraries sometimes overlap. Some routines are optimized and some are not; some are threaded and some are not; some support MPI and some do not; some are portable and some are not; some are single or double precision. Only your own computational needs can determine which of these competing libraries are most appropriate for your work.
Mathematics or numerical libraries are designed to be incorporated into user applications. They contain high-quality implementations of common tasks such as linear algebra solvers or fast Fourier transforms.
In addition to the relatively small set of preinstalled math libraries, there is a much larger set of downloadable source-code math software routines and packages (around 1400 in all) on both OCF (CZ and RZ) and SCF, at the LINMath Web site. This semi-interactive site offers four different collections (SLATEC, PMATH, MSSL, and mssl3) of non-proprietary software, organized by problem type. The software addresses a wide range of mathematical and statistical problem types, from simple (e.g., vector operations) to complex (e.g., differential equation solvers), and represents the result of efforts in the numerical math research community since the 1970s. LINMath also provides links to many other popular math software packages that are available elsewhere. The LINMath routines and packages also overlap somewhat with the commercial libraries (BLAS is an example), so in those cases you must decide which alternative best meets your specific needs.
Interactive mathematical tools are stand-alone applications that can be used for numerical analysis, data analysis, and display. These tools have both a GUI and a command-line interface.
The table below shows at a glance which major libraries and interactive mathematical tools reside on which LC machines. Each library or tool name is a link to more information about that library or tool.
Math Library | Description | Availability |
Documentation |
---|---|---|---|
ATLAS | Automatically Tuned Linear Algebra Software | Linux | See the ATLAS Web site |
BLAS | Basic Linear Algebra Subroutines | Linux CORAL |
See ATLAS, MKL, or ACML (Linux); ESSL (CORAL) See the BLAS Web site |
ESSL | IBM Engineering and Scientific Subroutine Library | CORAL | /usr/tcetmp/packages/essl/essl-<version>/READMES/*.README See the IBM's ESSL Guide and Reference |
FFTW | Fast Fourier Library | Linux CORAL |
See the FFTW Web site |
GSL | GNU Scientific Library | Linux | See the GNU GSL Web site |
IPP | Intel Performance Primitives are optimized scientific routines for data processing, signal processing, and image and video processing | Linux | See the Intel IPP Web site |
LAPACK | Dense linear algebra | Linux CORAL |
See ATLAS, MKL, or ACML Linux; ESSL (CORAL) See the LAPACK Web site |
LIBM | Standard C math library | Linux | See the LIBM man page |
MKL | Intel Math Kernel Library | Linux | See the documentation directory in /usr/tce/packages/mkl/mkl-<version> See the Intel MKL Web site |
MSSL/mssl3 | Mathematics and Statistics Software Library is a collection of (mostly Fortran) routines in source code form | MSSL/mssl3 is available from the LINMath Web site as source code, which you can then move to any machine and compile. | |
ODEPACK | ODEPACK is a collection of Fortran solvers for the initial value problem for ordinary differential equation systems. | See the ODEPACK Web site | |
PETSc | Collection of routines for solving linear systems | Linux CORAL |
See the PETSc Web site |
PMATH | Machine-independent portable math subroutine library | PMATH is available from the LINMath Web site as source code, which you can then move to any machine and compile. | |
ScaLAPACK | Library of high-performance linear algebra routines for distributed-memory message-passing MIMD computers | Linux CORAL |
See the Scalable Linear Algebra PACKage Web site |
SLATEC | Comprehensive software library with over 1400 general purpose mathematical and statistical routines written in Fortran 77 | SLATEC is available from the LINMath Web site as source code, which you can then move to any machine and compile. | |
Interactive Math Tool | Description | Availability |
Documentation |
Mathematica | Symbolic mathematics tool | Linux | Within Mathematica; see also the Mathematica vendor Web site |
MATLAB | A high-level language and interactive environment for numerical computation, visualization, and programming | Linux | Within MATLAB; see also the MATLAB vendor Web site |
Octave | High-level language primarily intended for numerical computations | Linux | Within Octave; see also the GNU Octave Web site |
The AMD Core Math Library provides optimized single-threaded and multi-threaded mathematical routines. The main components of ACML are:
ACML libraries built with the GNU, Intel, and PGI compilers are in /usr/local/tools/acml-<compiler>-<ACML_version>, where <compiler> is either gfortran, ifort, or pgi. For each ACML version 4.X, there are two builds for each compiler, with the directory containing -mp being the multi-threaded implementation. For each ACML version 5.X, there are several subdirectories. The fma suffix is for builds using fused multiply-add instructions and the mp suffix is for builds using multiple threads. The corresponding header files can be found in the /include subdirectory.
For example, to use the single-threaded version 5.0 of ACML and the PGI compiler, include the following on your compile line:
-I/usr/local/tools/acml-pgi-5.0.0/pgi64/include
and include the following on your link line:
-L/usr/local/tools/acml-pgi-5.0.0/pgi64/lib -lacml
For other compilers or versions, use the appropriate compiler/version paths to the library and header files.
The current version of ATLAS (Automatically Tuned Linear Algebra Software) provides a complete BLAS API (for both C and Fortran77) and a very small subset of the LAPACK API. For all supported operations, the developers claim that ATLAS achieves performance on par with machine-specific tuned libraries.
ATLAS 3.8 provides C and Fortran77 interfaces to these LAPACK routines:
The ATLAS libraries are compiled with the GNU compiler and because there is not standard FORTRAN ABI, the ATLAS libraries may be incompatible with other compilers. When using the PGI or Intel compilers, it is recommended that you use the appropriate ACML or MKL libraries instead. To use the ATLAS BLAS library, link with:
gfortran -lf77blas -L/usr/lib64/atlas-sse3/ copy.f90
Add the appropriate -l options depending on which language and library routines you are using.
The BLAS (Basic Linear Algebra Subprograms) routines provide standard building blocks for performing basic vector and matrix operations. The Level 1 BLAS perform scalar, vector, and vector-vector operations; the Level 2 BLAS perform matrix-vector operations; and the Level 3 BLAS perform matrix-matrix operations. Because the BLAS are efficient, portable, and widely available, they are commonly used in the development of high quality linear algebra software, such as LAPACK.
Various versions of BLAS are installed on LC Linux clusters. Some versions are integrated into specific compiler systems.
/usr/local/tools/mkl-10.3.11/lib/intel64/libmkl_blas95_lp64.a
/usr/local/tools/pgi-12.8/lib/libblas.a
There is a specific way to link for each version of BLAS (PGI, Intel/MKL, and RHEL). In the example below, "copy.f95" is a Fortran source file that references a BLAS Level 2 routine. .
In the following example, the 12.8 version of the PGI compiler is chosen, along with the related PGI BLAS.
use pgi-12.8
pgf95 �copy.f95 -o copy.pgi.pgi.x -L/usr/local/tools/pgi-12.8/lib/ -lblas
The Intel MKL BLAS provide support for linking with PGI and GNU compilers, in addition to Intel. A very useful tool for building applications using Intel MKL is the Intel Math Kernel Library Link Line Advisor. In the example below, the Intel 13.0.146 compiler, MKL version 11.0.0 are being used with dynamic linking, 64-bit integer support, and the BLAS95 Interface.
use ic-13.0.146
setenv MKLROOT /usr/local/tools/mkl-11.0.0/ #csh
export MKLROOT=/usr/local/tools/mkl-11.0.0/ #bash
ifort copy.f90 -i8 -I$MKLROOT/include -I$MKLROOT/include/intel64/ilp64 -L$MKLROOT/lib/intel64 $MKLROOT/lib/intel64/libmkl_blas95_ilp64.a /
-lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lpthread -lm -o copy.ifort.x -Wl,--auto_rpath
use gcc-4.6.1
gfortran �lblas copy.f90
The Engineering Scientific Subroutine Library (ESSL) provides a variety of optimized complex mathematical functions for many different scientific and engineering applications such as BLAS, linear algebraic equation solvers and eigensystem analysis (a subset of LAPACK), FFTs, sorting, searching, quadrature, and random number generation. ESSL provides single- and double-precision versions for most routines. At LC, ESSL is available only on the IBM CORAL POWER systems - Sierra, Lassen, RZAnsel, Ray and Shark. More information can be found on https://hpc.llnl.gov/training/tutorials/using-lcs-sierra-system#MathLibs2.
ESSL includes all the BLAS that come with the LAPACK distribution, but it does not include the following original BLAS routines, most of which are in libblas.a: CSROT, DROTM, DROTMG, DSDOT, SDSDOT, SROTM, SROTMG, ZDROT.
Some ESSL eigenvalue routines have the same name as LAPACK routines but are different (since ESSL predates LAPACK). If you want to use the LAPACK routines whose names conflict with routines in ESSL, use the AR tool to split ESSL into two libraries: one with just the conflicting routines, say, libconflict.a, and the other with the rest of the routines, say, libesslnoconflict.a. Link the noconflict routines before the full LAPACK library:
... -lesslnoconflict -llapack
This gives you optimized versions of the LAPACK routines that are in ESSL, with liblapack.a resolving all the other routines.
FFTW ("Fastest Fourier Transform in the West") is a C subroutine library for computing the Discrete Fourier Transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrarily large input size. FFTW also efficiently handles multiple, strided transforms.
FFTW is installed on LC's CHAOS 5 Linux machines in /usr/local/tools/fftw-2.1.5 and /usr/local/tools/fftw3-<version>/lib, for various version 3 installations. Note that the APIs for FFTW versions 2 and 3 are incompatible. On LC's TOSS 3 Linux machines, FFTW is installed in /usr/tce/packages/fftw/*.
FFTW is released under the GNU general public license. It works on any platform with a C compiler, and it is also callable from Fortran. Of special interest to LC users is FFTW's support for parallelization. FFTW offers parallelized code for SMP machines with POSIX threads (pthreads), and an MPI version for distributed memory transforms is also available.
For general information on the FFTW math library, background papers on its technical features, and detailed documentation, consult the FFTW Web site.
The GNU Scientific Library (GSL) is a collection of routines for numerical computing. The routines have been written in C and present an Applications Programming Interface (API) for C programmers, allowing wrappers to be written for very high level languages. Where possible the routines have been based on reliable public-domain packages such as FFTPACK and QUADPACK, which the developers of GSL have re-implemented in C with modern coding conventions.
In order to use GSL routines in a C-based program, it is only necessary to add the appropriate compile and link option.
For compiling:
#include <gsl/...>
For linking:
gcc gsl.c -lgsl -L/usr/lib64/libgsl.so -lgslcblas� -L/usr/lib64/libgslcblas.so
Intel Integrated Performance Primitives (IPP) is an extensive library of performance profiler tools and software functions for multimedia processing, data processing, and communications applications. For additional information, consult the Intel Software Documentation Library.
Due to the large size of these libraries, not all Intel compiler installations contain the IPP libraries. To see which compiler installations include ipp, run the following command:
ls -ld /usr/local/tools/ic*/ipp
The Linear Algebra PACKage (LAPACK) is a library of numerical solvers for dense linear algebra problems. It provides routines for solving systems of linear equations and linear least squares, eigenvalue problems, and singular value decomposition. Similar to BLAS, LAPACK routines are implemented in various libraries, including MKL, ACML, and ATLAS for Linux systems and ESSL for BG/Q systems. For additional information, consult the LAPACK Web site.
LIBM is the standard C library of basic mathematical functions, such as sin(x), cos(x), exp(x), etc. To include the LIBM functions, just add -lm on your link command line.
The Intel compiler includes an optimized math library that contains optimized implementations of LIBM functions. Some users have reported up to a 10% performance improvement by using Intel's math library. If you use the Intel compiler, this library is included implicitly. If you use a non-Intel compiler, you need to explicitly link in the library. Note that libimf does not implement all libm functions, so you may need to link in libm as well.
Here is an example link line:
gcc test.o -L/usr/local/tools/ic-14.0.174/lib -Wl,-rpath=/usr/local/tools/ic-14.0.174/lib -limf -lm
Mathematical Acceleration Subsystem (MASS) consists of libraries of mathematical functions tuned specifically for optimum performance on a variety of IBM architectures. Scalar and vector libraries are provided. Single instruction multiple data (SIMD) libraries are provided for SIMD architectures. These libraries and functions are:
To use MASS, add -lmass or lmassv to the library load line for routines from the scalar or vector versions, respectively.
Intel's threaded Math Kernel Library (MKL) is a set of math libraries containing optimized BLAS, LAPACK, ScaLAPACK, FFT and other routines in the LC Linux environment. MKL is available only on LC machines with x86-based chips. Various versions of MKL are available in /usr/local/tools/mkl-<version> on CHAOS 5 systems and in /usr/tce/packages/mkl/mkl-<version> on TOSS 3 systems, where <version> is a specific version. MKL contains libraries built for specific configurations, which can make it difficult to determine the appropriate compile/link flags to use.
Intel has a web-based tool for determining your link line depending on compiler, architecture, etc. This tool is available at: http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor. Select "Linux" for the operating system and "Intel 64" for the architecture. We suggest setting -Wl,-rpath= to the same directory specified with the -L flag when using dynamic libraries to avoid requiring LD_LIBRARY_PATH to be set at runtime. As a concrete example, with the Intel or GNU C compiler with 32-bit integers and non-threaded, dynamic library MKL version 2018.0 on TOSS 3 the compile/link flags would be:
-I/usr/tce/packages/mkl/mkl-2018.0/include -L/usr/tce/packages/mkl/mkl-2018.0/lib -Wl,-rpath=/usr/tce/packages/mkl/mkl-2018.0/lib -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm
To use the Intel compiler with 32-bit integers and the threaded implementation of MKL, the compiler/link flags will be:
-I/usr/tce/packages/mkl/mkl-2018.0/include -L/usr/tce/packages/mkl/mkl-2018.0/lib -Wl,-rpath=/usr/tce/packages/mkl/mkl-2018.0/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl
Complete MKL documentation is in either the doc or Documentation directory of the installation, depending on the MKL version. When using the multi-threaded MKL libraries, the Linux environment variable OMP_NUM_THREADS controls the number of threads spawned by the MKL routines (by default, MKL sets the number of threads equal to the number of cores on the node).
MSSL (the Mathematics and Statistics Software Library) is a collection of (mostly Fortran) routines, in source code form, that is made available to LC users via the LINMath Web site. Source code downloaded from LINMath can then be moved to any other desired LC machine.
Historically, MSSL was divided into three classes according to the level of quality control and support. Class 1 and 2 routines required quality assurance, at least minimal support, full usage documentation, and some testing. The Class 3 routines were minimally screened but usage-documented. Following the demise of LC's MSS, these distinctions lost much of their meaning. However, the Class 3 routines are still kept separate, in a collection called mssl3 (about 300 routines), while the name MSSL now refers to the collection of all Class 1 and 2 routines (about 100 routines). Many routines in mssl3 may well be of high quality but simply never went through the screening and testing necessary to raise their class level.
There is one particular set of routines in mssl3 worth highlighting: a trio of routines in the Service Routines category—I0MACH, R0MACH, and D0MACH—that provides various machine constants. The results they return are often more accurate than the values in the corresponding MSSL or SLATEC routines. For details, see the section Largest and Smallest Numbers.
There is no separate MSSL or mssl3 reference manual. The usage documentation for each MSSL or mssl3 routine is provided in the comment line prologue of the source file that is delivered by LINMath.
The Portable, Extensible Toolkit for Scientific Computation is a suite of data structures and routines for the scalable (parallel) solution of scientific applications modeled by partial differential equations. It supports MPI, shared memory pthreads, and NVIDIA GPUs as well as hybrid MPI-shared memory pthreads or MPI-GPU parallelism.
See the Portable, Extensible Toolkit for Scientific Computation Web site for more information, documentation, and tutorials.
On CHAOS 5 Linux and BG/Q systems, PETSc installations can be found in /usr/local/tools/petsc-<version>. On TOSS 3 Linux systems PETSc installations can be found in /usr/tce/packages/petsc/*
The PMATH mathematical subroutine library (libpmath.a) is a collection of 66 routines that was constructed as a portable subset of the former (machine-dependent) MATHLIB library with a few other routines added. PMATH supplements but does not duplicate the SLATEC library.
LC's former MSS group (and its predecessor groups) developed MATHLIB, much of which was coded in the machine language, CAL. To meet the need for a machine-independent portable mathematics subroutine library, PMATH ("P" for portable) was developed.
The user-callable routine names in PMATH, with brief descriptions, are listed below. All are Fortran callable, except for those from the random number generator family, which includes some C routines. Where two or more names are shown together, these correspond to the double and single precision versions (and possibly an integer version) of the routines. For details, see the source files, available from LINMath. In particular, the usage documentation of each routine is given in the source file of each routine.
Routine Name | Description |
---|---|
AAAAAA | Version Information |
DMAXAF,SMAXAF,IMAXAF | Maximum element of array |
DMINAF,SMINAF,IMINAF | Minimum element of array |
DMINMX,SMINMX,IMINMX | Minimum and maximum elements of array |
LDFD,LDFS | Table look-down function |
LUFD,LUFS | Table look-up function |
LUGD,LUGS | Table look-up function with guess |
DMEANF,SMEANF | Mean of 1D real array |
DMEANV,SMEANV | Mean vector of 2D real array |
DMEDF,SMEDF | Median of 1D real array |
DRANKS,SRANKS | Ranks of 1D real array |
DCORRV,SCORRV | Correlation matrix of 2D real array |
DCOVAR,SCOVAR | Variance-covariance matrix of 2D real array |
DSTDEV,SSTDEV | Standard deviation of 1D real array |
DZERO,SZERO | Zero of a nonlinear function |
DFITPO,SFITPO | Polynomial fit to data |
DREFIT,SREFIT | Repeated fitting after DFITPO,SFITPO |
DLSODE,SLSODE | Ordinary differential equation IVP solver |
DINTDY,SINTDY | Auxiliary interpolator routine for DLSODE,SLSODE |
DSRCOM,SSRCOM | Save and restore Common for DLSODE,SLSODE |
DCONST,SCONST | Common mathematical constants |
DUMACH,RUMACH | Unit roundoff |
IUMACH | Standard output unit number |
XERRWD,XERRWV | Print error message with values |
XSETF | Set error message control flag |
XSETUN | Set error message unit number |
Random Number Generator Family | |
Fortran-callable | |
DRANF,SRANF | Uniform random number generator |
DRANFV,SRANFV | Uniform random number generator (vectorized) |
DRLGF,SRLGF | Exponential random number generator |
C-callable | |
ranf8 | Uniform random number generator |
ranfv8 | Uniform random number generator (vectorized) |
rnfcnt | Count calls to RANF |
rnsget | Get RANF seed |
rnsset | Set RANF seed |
rnmset | Set RANF multiplier |
rlgf8 | Exponential random number generator |
rlfcnt | Count calls to RLGF |
rlsget | Get RLGF seed |
rlsset | Set RLGF seed |
rlmset | Set RLGF multiplier |
SLATEC is an acronym for the Sandia, Los Alamos, Air Force Weapons Laboratory Technical Exchange Committee. Formed in 1974 to foster exchange among these three New Mexico laboratories, it has since been expanded to include LLNL (both LC and the former NERSC), ORNL, and NIST (the National Institute for Standards and Technology, formerly NBS). On occasion, ANL, NCAR, and other government laboratories have also been involved in SLATEC activities.
The Common Mathematical Library (CML) developed by SLATEC is a portable Fortran 77 library of high quality mathematical software. It includes the widely-known packages BSPLINE, EISPACK, FISHPACK, FNLIB, LINPACK, PCHIP, QUADPACK and much more. (It is very weak in statistical software.)
Routines from this library, being nonproprietary and portable, may be used on both the LC machines and the user's workstation. SLATEC is not installed on LC machines, but you can build the library yourself from source code that you get from LINMath. In fact, since the LINMath sources are more recent and more thoroughly debugged than the installed binaries, Linux users are also encouraged to prefer the LINMath version of all SLATEC routines.
For those who use the SLATEC library, online documentation (comment prologues) for individual user-callable SLATEC routines is available through the LINMath Web site. For complete documentation, see the Guide to Available Mathematical Software, a cross-index and virtual repository of mathematical and statistical software components of use in computational science and engineering provided by NIST.
ScaLAPACK is a library of high-performance linear algebra routines for distributed-memory message-passing MIMD computers. ScaLAPACK solves dense and banded linear systems, least squares problems, eigenvalue problems, and singular value problems, and is designed to be used in MPI-based parallel applications.
ScaLAPACK can be found in the MKL library on LC Linux systems or in /usr/local/tools/scalapack on LC BG/Q systems.
LINMath (Livermore Interactive Numerical Mathematics software access utility) is a customized Web site that delivers advice on, and descriptions of, mathematical library routines and (most importantly) delivers source files for the routines themselves. LINMath uses a topic-based menu tree to provide advice, sub-menu lists, and downloadable source files for a set of mathematical software collections. The largest such collection is the SLATEC library, which resulted from a collaboration with seven other laboratories. The MSSL and mssl3 collections are primarily the result of internal development efforts. The PMATH collection arose as a small portable subset of the MATHLIB object code library.
The LINMath Web site uses the standard GAMS (Guide to Available Mathematical Software) hierarchical system for organizing math routines in the structure of its menu tree. Underlying the GAMS structure, the software itself comes from four different collections: SLATEC, MSSL, mssl3, and PMATH. As a related service, LINMath (OCF version) provides links to a large number of external mathematical software packages of possible interest. LINMath also provides the most recent, debugged versions of SLATEC and PMATH routines, potentially more recent than the versions installed on some LC machines as compiled object code.
The vast majority of the software in LINMath is in Fortran (primarily for historical reasons) although there is some software written in C. In the case of the Fortran collections, a major task of LINMath is to deliver the proper set of subordinate routines along with the requested user-callable routine. Subordinate routines are generally shared by multiple top-level routines and thus stored separately. For each given requested routine, LINMath appends to it the correct set of subordinate routines to construct the file delivered to the user.
The LINMath Web site is accessible at http://www-lc.llnl.gov/linmath/. The LINMath server automatically restricts access to those clients running on machines within the LLNL domain(s). A nearly identical LINMath site is available within the LLNL secure network on the SCF at http://www.llnl.gov/linmath.
No separate documentation for using LINMath is available, nor is it necessary. At the home page, simply select a major topic category, then follow a menu tree until reaching the particular subtopic of interest. This leads to a list of those libraries that contain routines for that subtopic. After selecting any one of those, clicking on any entry initiates a download of the software routine named. An example of such a path might be:
I (Differential and Integral Equations)
I1 (Ordinary differential equations)
I1a (Initial value problems)
I1a1 (General, nonstiff or mildly stiff)
MSSL: 7 routines
DVODE
To aid in the menu navigation process, many of the pages display blocks of information and/or recommendations about the subtopic category and the software available in it.
In addition to supplying mathematical software sources directly, the OCF version of LINMath also provides links to a number (around 130) of math software packages that are available externally. These are listed, with brief descriptions, within the top-level GAMS categories and also in a single alphabetical list linked to from the LINMath home page. Links in the latter list lead back to the package lists for the relevant GAMS categories.
Some packages, such as LINPACK and BLAS, exist in object code libraries available on some LC machines. If your target machine has such a library, using its version of these routines is likely to be more efficient than using the source code form from LINMath. Some experimentation with the two versions may be warranted.
The alphabetical list of mathematical software packages listed by LINMath is provided below. All are externally located, but some (marked *) are also available from within LINMath.
Mathematica is used for symbolic computation and complex analysis as well as 2D and 3D graphics and programming. Mathematica creates fully customizable, publication-quality, cross-platform electronic and printed documents with professional mathematical typesetting quality, and it also generates Web-ready documents.
Mathematica is available only on OCF and SCF Intel x86 CPU production systems. It is not available on Power9/8 systems like Sierra, Lassen, or Ray.
To use Mathematica, you must first load the desired module package. To see all available versions, use the command:
module avail mathematica
To load the default version, which should be the most recent and recommended version, simply enter:
module load mathematica
Otherwise, use module load packagename to use a different version.
After doing this, mathematica commands should be in your path.
Mathematica offers a choice of two interfaces: a text interface and a GUI interface. To use the GUI interface, log on using an X terminal or Xterm simulator and enter:
mathematica
To start the text interface, enter:
math
There are a limited number of Mathematica licenses on LC systems. If no license is available, you will receive a message indicating that the license limit has been reached or that no license was returned. You can check the license status using the MyLC user portal: mylc.llnl.gov Look for the "License status" portlet. Clicking on the mathematica bar will provide additional license details.
To read more about Mathematica, consult Stephen Wolfram's Mathematica, A System for Doing Mathematics by Computer, which is considered the definitive source. The vendor Web site for Mathematica features introductory and tutorial background and offers support and help. The Mathematica Journal is free and publishes articles about Mathematica techniques and applications.
MATLAB is an interactive matrix "laboratory" developed and distributed by MathWorks. It is used for tasks involving matrices, graphics, and general numerical computation. There are numerous user-developed packages for MATLAB that can be downloaded from the Internet.
To run the latest available version of MATLAB using the GUI, log on to an LC Linux system using an X terminal or Xterm simulator, and type
/usr/gapps/estk/matlab-latest/bin/matlab
(or, to access a non-default version, use the path name /usr/local/tools/matlab/matlabnn where nn is the version number). You can reach MATLAB's help documentation by typing help_win at the MATLAB prompt. A separate window opens and provides a list of help topics. Click the help topic you want to get more information. You can also type helpdesk or visit the MathWorks Web site. There is also a command-line interface for MATLAB.
If all MATLAB licenses are being used, you will receive a warning telling you to "get a valid password."
For additional information, visit the vendor Web site for MATLAB.
Octave is a high-level interpreted language primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. Octave is normally used through its interactive command-line interface, but it can also be used to write non-interactive programs. The Octave language is quite similar to MATLAB so that most programs are easily portable.
To use Octave, log onto an LC Linux Cluster system and type
octave
The largest (and smallest) numbers that you can represent depend on the machine (chip set) that you are using, the compiler that you are using, and the data type (single precision, double precision, or integer). Follow these steps to discover the values most relevant to your needs:
When commented source code (Fortran, with a C version imbedded in the comments) for each routine displays, save it to a file by using your browser's File menu.
R = R0MACH(1) reports the smallest positive magnitude.
R = R0MACH(2) reports the largest positive magnitude.
R = R0MACH(3) reports the smallest relative spacing.
R = R0MACH(4) reports the largest relative spacing.
R = R0MACH(5) reports the log10 of the arithmetic base (usually 2).
D = D0MACH(1) through D0MACH(5)
reports same as R0MACH except double precision.
I = I0MACH(9) reports the largest integer magnitude.
I = I0MACH(12) reports the smallest exponent (single precision).
I = I0MACH(13) reports the largest exponent (single precision).
I = I0MACH(15) reports the smallest exponent (double precision).
I = I0MACH(16) reports the largest exponent (double precision).
(other integer values can also be reported)
Lawrence Livermore National Laboratory is operated by Lawrence Livermore National Security, LLC, for the U.S. Department of Energy, National Nuclear Security Administration under Contract DE-AC52-07NA27344.