Contents

SPRAL

Installation

SPRAL
Installation Instructions

The Sparse Parallel Robust Algorithm Library (SPRAL) is an open-source library for sparse linear algebra and related algorithms. It is primarily developed and maintained by the Numerical Analysis Group at STFC’s Rutherford Appleton Laboratory.
Jonathan Hogg (STFC Rutherford Appleton Laboratory)

Major Version History

2014-03-19 Version 1.0.0
Initial release

1.1 Quick Start

Under Linux, or Mac OS X:

# Build and install library  
BUILDDIR=build; mkdir $BUILDDIR; cd $BUILDDIR  
../configure --with-metis="-L/path/to/metis -lmetis"  
make  
sudo make install # Optional  
 
# Link against library  
cd /path/to/your/code  
gfortran -o myprog myobj.o -lspral -lmetis -lblas

Notes

1.2 Licence

At present, all code is covered by the 3-clause BSD licence given in the file LICENCE.

1.3 Third-party libraries

1.3.1 METIS

Many of our packages use the METIS graph partitioning library to find good orderings. You can obtain a copy of METIS from the following url:
http://www.cs.umn.edu/~metis
We support both version 4 and version 5 (the latter is available under the open source Apache Licence). At present, we recommend version 4 as it is faster than version 5, though this may change in the future.
If the METIS library is not available on the default link path, the --with-metis option to configure should be used to specify how to link against METIS. For example, if libmetis.a is in the directory /usr/local/metis-4.0, use:
../configure --with-metis="-L/usr/local/metis-4.0 -lmetis"

1.3.2 BLAS

Many of our packages require a high performance BLAS library to efficiently perform dense linear algebra operations. For best performance, please use the library recommended by your computer manufacturer (normally the Intel MKL). If this is not available, use an optimized alternative, such as OpenBLAS. The reference BLAS from netlib are at least an order of magnitude slower than modern optimized BLAS, and should be avoided. If bit-compatible results are desired, a bit-compatible BLAS library must be used.

If the BLAS library is not available on the default link path, or if configure detects the wrong BLAS library, the --with-blas option to configure should be used to specify how to link against the BLAS library. For example, to link against the Intel MKL using the GNU compiler suite, use:

../configure --with-blas="-L/opt/intel/mkl/lib/intel64 -lmkl_gf_lp64 -lmkl_gnu_thread \  
   -lmkl\_core"

1.4 Compilers and compiler options

If no compiler is specified, configure will pick a default compiler to use. If configure cannot find an appropriate compiler, or you wish to specify a different compiler you can do so by setting the following variables:

CC
specifies the C compiler to use.
FC
specifies the Fortran 90/95/2003/2008 compiler to use.
NVCC
specifies the CUDA compiler to use.

Additionally, compiler flags can be specified using the following variables:

CFLAGS
specifies options passed to the C compiler.
FCFLAGS
specifies options passed to the Fortran compiler
NVCCFLAGS
specifies options passed to the CUDA compiler.

For example, to compile with ifort -g -O3 -ip we could use:

../configure FC=ifort FCFLAGS="-g -O3 -ip"

1.5 Other options to configure

The configure script is generated by autoconf, and hence offers many standard options that can be listed using the command configure --help.

In particular, the following options may be of interest:

--prefix=PREFIX
specifies the installation path prefix (by default /usr/local/ under Linux).

1.6 Support

Feeback may be sent to hsl@stfc.ac.uk.
Bugs can be reported online via our bug tracking system:
http://ccpforge.cse.rl.ac.uk/gf/project/spral/tracker/?action=TrackerItemBrowse&tracker_id=498.
We will endeavour to fix all reported bugs.