Installation guide : direct solver
MUMPS - direct solver for real and complex valued unsymmetric matrices
Installing packages in Debian, Ubuntu or Redhat (MPI version)
For the Linux distributions Debian or Ubuntu install the package
libmumps-dev
using the packet manager. This package includes the library (installed to where the MPI libraries are installed, type
locate libdmumps
to find them) and the include files (copied to
/usr/include
).
Installing packages in Debian, Ubuntu or Redhat (sequential version)
For the Linux distributions Debian or Ubuntu install the package
libmumps-seq-dev
using the packet manager. This package includes the library (copied to
/usr/lib
or
/usr/lib64
) and the include files (copied to
/usr/include/mumps_seq
).
Known problems
- MPI does not compile anymore. This is due to the fact that some partial MPI implementations are in
/usr/include/mumps_seq
. If you want to use the MPI version of MUMPS, install libmumps-dev
instead.
Direct installation
If your Linux distribution is not able to install Debian or RPM packages follow this guide to install the library yourself.
BLACS
The BLACS (Basic Linear Algebra Communication Subprograms) project is an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface that may be implemented efficiently and uniformly across a large range of distributed memory platforms. It's used by Scalapack.
MPILIB = -L$(MPILIBdir) -lmpi -lmpi_f77 -lmpi_f90 -lmpi_cxx
if you're using
OpenMPI.
You also need to replaces lines 198, 199 and 204 by
F77 = gfortran
F77NO_OPTFLAGS = -fPIC -I$(MPIINCdir)
CCFLAGS = -fPIC -O4 -I$(MPIINCdir)
- Compile the library typing
make mpi
ScaLAPACK
The ScaLAPACK (Scalable Linear Algebra PACKage) is a library of high-performance linear algebra routines for parallel distributed memory machines.
ScaLAPACK solves dense and banded linear systems, least squares problems, eigenvalue problems, and singular value problems.
- Run the configuration tool, typing
ccmake .
. Activate advanced editing (with key 't'), and edit both CMAKE_C_FLAGS
and CMAKE_FORTRAN_FLAGS
to add -fPIC
., then press 'c' to run configuration script, and 'g' to generate and exit.
- Compile it, typing
make scalapack
.
MUMPS
http://graal.ens-lyon.fr/MUMPS (MUltifrontal Massively Parallel sparse direct Solver) is a massively parallel solver mainly developed at ENS Lyon.
- Request http://graal.ens-lyon.fr/MUMPS/index.php?page=dwnld|here for downloading the library.
- Get the file
MUMPS_x.xx.x.tar.gz
using the download link provided in your mail (in our example, MUMPS-5.1.1.tar.gz
) and copy it to the same root folder as BLACS and ScaLAPACK, i.e. $(CONCEPTS_DEV)/..
).
- Unpack it using
tar -zxf MUMPS-5.1.1.tar.gz
, and go inside folder MUMPS-5.1.1
- Copy the file
Make.inc/Makefile.inc.generic = into =Makefile.inc
and edit it. For example, here is the difference between the Make.inc/Makefile.inc.generic
and the modified version Makefile.inc
94c94
< CC = cc
---
> CC = gcc
96c96
< FC = f90
---
> FC = gfortran
98c98
< FL = f90
---
> FL = gfortran
108c108
< SCALAP = -lscalapack -lblacs
---
> SCALAP = -L$(CONCEPTS_DEV)/../scalapack-2.0.2/lib -lscalapack $(CONCEPTS_DEV)/../BLACS/LIB/blacs_MPI-LINUX-0.a $(CONCEPTS_DEV)/../BLACS/LIB/blacsF77init_MPI-LINUX-0.a $(CONCEPTS_DEV)/../BLACS/LIB/blacsCinit_MPI-LINUX-0.a
111c111
< INCPAR = -I/usr/include
---
> INCPAR = -I/usr/mpi/gcc/openmpi-1.4.2/include
114c114
< LIBPAR = $(SCALAP) -L/usr/lib -lmpi
---
> LIBPAR = $(SCALAP) -L/usr/mpi/gcc/openmpi-1.4.2/lib64 -lmpi
143,145c143,145
< OPTF = -O
< OPTC = -O -I.
< OPTL = -O
---
> OPTF = -fPIC -O
> OPTC = -fPIC -O -I.
> OPTL = -fPIC -O
Umfpack - direct solver for real valued unsymmetric matrices
Umfpack is a direct solver for real and complex matrices, however only the interface to routines for real matrices is implemented (version ≥ 4.1). Ubuntu or Debian:
- Install the package
libsuitesparse-dev
. If only the package libsuitesparse
is installed, the package will not be found creating an error like
gcc.compile.c++ builds/operator/gcc-4/debug/umfpack.o
operator/umfpack.cc:9:23: error: umfpack.h: No such file or directory
Important: Make sure that the libraries
libamd.so
,
libcamd.so
,
libcolamd.so
,
libccolamd.so
,
libcolord.so
,
libcholmod.so
and
libsuitesparseconfig.so
are installed into
/usr/lib
or
/usr/lib64
. Otherwise specify the path
UMFPACK_PATH
in
$(CONCEPTS_DEV)/boost-build-modules.jam
. Furthermore, make sure that the include file
umfpack.h
is located in
/usr/include
,
/usr/include/ufpack
, or
/usr/include/suitespare
. Otherwise specify the include path
UMFPACK_INCLPATH
in
$(CONCEPTS_DEV)/boost-build-modules.jam
. Note that the libraries need to have exactly the name as given above. If they should have a suffix with the version number for example, you have to create symbolic links.
SuperLU - direct solver for real and complex valued unsymmetric matrices
Installing packages in Debian, Ubuntu or Redhat
For the Linux distributions Debian or Ubuntu install the package
libsuperlu3-dev
, or any higher version, using your packet manager. This package includes the library (installed to
/usr/lib
or
/usr/lib64
) and the include files (copied to
/usr/include
or
/usr/include/superlu
).
The SuperLU packages (RPM) for Redhat includes the library and includes files as well.
Direct installation
If your Linux distribution is not able to install Debian or RPM packages follow this guide to install the library yourself. The guide refers to installing SuperLU of version 3.1 but it can easily be adjusted for any other version.
- Download SuperLU 3.1 and unpack it to
/scratch/kersten/SuperLU
(when Concepts is for example in /scratch/kersten/concepts-2
). This can be done also by cd /scratch/kersten
wget http://crd.lbl.gov/~xiaoye/SuperLU/superlu_3.1.tar.gz
tar -xzf superlu_3.1.tar.gz
mv SuperLU_3.1 SuperLU
cd SuperLU
- Copy the file make.inc into
/scratch/kersten/SuperLU
- If your gcc is 4.xx or newer you have to edit make.inc and use something like
SuperLUroot = /scratch/kersten/SuperLU_3.1
SUPERLULIB = $(SuperLUroot)/libsuperlu.a
BLASLIB = /usr/lib/libblas.a
TMGLIB = libtmglib.a
LIBS = $(SUPERLULIB) $(BLASLIB)
CC = gcc-3.4.2
CFLAGS = -O3 -fPIC -fomit-frame-pointer -g
FORTRAN = gfortran
FFLAGS = -O -fPIC
LOADER = gcc-3.4.2
LOADOPTS = -O3 -fPIC
- Change in the file
/scratch/kersten/SuperLU/SRC/Makefile
superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $<
into superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) -fPIC $<
- execute in
/scratch/kersten/SuperLU
make
- When building Concepts (call of
bjam
) it indicates, that it finds SuperLU with the line * Activating support for direct solver SuperLU.
Known problems
- Pre-installed BLAS in
/usr/lib/libblas.a
/scratch/kersten/SuperLU/lib/libsuperlu_3.1.a(xerbla.o):/scratch/kersten/SuperLU/SRC/xerbla.c:5: first defined here /usr/bin/ld: Warning: size of symbol `xerbla_' changed from 30 in /scratch/kersten/SuperLU/lib/libsuperlu_3.1.a(xerbla.o) to 38 in /usr/lib/libblas.a(xerbla.o)
Solution: deactive xerbla.o
in SRC/Makefile by changing LAAUX = lsame.o
into LAAUX = lsame.o #xerbla.o