Differences between revisions 1 and 12 (spanning 11 versions)
Revision 1 as of 2020-07-06 09:24:45
Size: 45
Editor: semin
Comment:
Revision 12 as of 2020-07-06 14:13:28
Size: 9233
Editor: semin
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe Concepts/installationSolvers here. = Installation guide : direct solver =

<<TableOfContents()>>

== 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}}}).

'''Remark''': use this version only if you don't compile with MPI.

=== 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.

   * Download both [[http://www.netlib.org/blacs/mpiblacs.tgz|Blacs]] and [[http://www.netlib.org/blacs/mpiblacs-patch03.tgz|Blacs patch]] and unpack them to {{{$(CONCEPTS_DEV)/../BLACS}}}. This can be done also by
   {{{
cd $(CONCEPTS_DEV)/..
wget http://www.netlib.org/blacs/mpiblacs.tgz
tar -xzf mpiblacs.tgz
wget http://www.netlib.org/blacs/mpiblacs-patch03.tgz
tar -zxf mpiblacs-patch03.tgz
cd BLACS
   }}}
   * Copy the file {{{BMAKES/Bmake.MPI-LINUX}}} into {{{Bmake.inc}}} and edit it. You need to change lines 50 ( {{{MPIdir}}}) to precise where your MPI installation is, and you need to replace line 53 ( {{{MPILIB}}}) by
   {{{
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.

   * Download [[http://www.netlib.org/scalapack/scalapack-2.0.2.tgz|Scalapack]] and unpack it to {{{$(CONCEPTS_DEV)/../scalapack-2.0.2}}}. This can be done also by
   {{{
cd $(CONCEPTS_DEV)/..
wget http://www.netlib.org/scalapack/scalapack-2.0.2.tgz
tar -xzf scalapack-2.0.2.tgz
cd scalapack-2.0.2
   }}}

   * 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}}}.

   * Modify the flag in {{{$(CONCEPTS_DEV)/boost-build-modules.jam}}}, to put {{{SCALAPACK_PATH = $(CONCEPTS_DEV)/../scalapack-2.0.2/lib}}}.

==== MUMPS ====

MUMPS (MUltifrontal Massively Parallel sparse direct Solver) is a massively parallel solver mainly developed at [[http://graal.ens-lyon.fr/MUMPS|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
   }}}
   * Compile using {{{make alllib}}}.
   * Modify the flag in {{{$(CONCEPTS_DEV)/boost-build-modules.jam}}}, to put {{{MUMPS_PATH = $(CONCEPTS_DEV)/../MUMPS-5.0.2/lib}}} and {{{MUMPS_INCLPATH = $(CONCEPTS_DEV)/../MUMPS-5.0.2/include}}}.

== 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 &ge; 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/umfpack}}}, 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 [[http://crd.lbl.gov/~xiaoye/SuperLU/superlu_3.1.tar.gz|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 <br />mv SuperLU_3.1 SuperLU
cd SuperLU
   }}}
   * Copy the file [[attachment:make.inc]] into {{{/scratch/kersten/SuperLU/make.inc}}}
   * 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 <br />LOADER = gcc-3.4.2
LOADOPTS = -O3 -fPIC
   }}}
   * Change in the file {{{/scratch/kersten/SuperLU/SRC/Makefile}}} the line {{{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}}} the command {{{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</pre> into <pre>LAAUX = lsame.o #xerbla.o}}}

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).

Remark: use this version only if you don't compile with MPI.

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.

  • Download both Blacs and Blacs patch and unpack them to $(CONCEPTS_DEV)/../BLACS. This can be done also by

    cd $(CONCEPTS_DEV)/..
    wget http://www.netlib.org/blacs/mpiblacs.tgz
    tar -xzf mpiblacs.tgz
    wget http://www.netlib.org/blacs/mpiblacs-patch03.tgz
    tar -zxf mpiblacs-patch03.tgz
    cd BLACS
  • Copy the file BMAKES/Bmake.MPI-LINUX into Bmake.inc and edit it. You need to change lines 50 ( MPIdir) to precise where your MPI installation is, and you need to replace line 53 ( MPILIB) by

    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.

  • Download Scalapack and unpack it to $(CONCEPTS_DEV)/../scalapack-2.0.2. This can be done also by

    cd $(CONCEPTS_DEV)/..
    wget http://www.netlib.org/scalapack/scalapack-2.0.2.tgz
    tar -xzf scalapack-2.0.2.tgz
    cd scalapack-2.0.2
  • 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.

  • Modify the flag in $(CONCEPTS_DEV)/boost-build-modules.jam, to put SCALAPACK_PATH = $(CONCEPTS_DEV)/../scalapack-2.0.2/lib.

MUMPS

MUMPS (MUltifrontal Massively Parallel sparse direct Solver) is a massively parallel solver mainly developed at ENS Lyon.

  • Request 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
  • Compile using make alllib.

  • Modify the flag in $(CONCEPTS_DEV)/boost-build-modules.jam, to put MUMPS_PATH = $(CONCEPTS_DEV)/../MUMPS-5.0.2/lib and MUMPS_INCLPATH = $(CONCEPTS_DEV)/../MUMPS-5.0.2/include.

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/umfpack, 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 <br />mv SuperLU_3.1 SuperLU
    cd SuperLU
  • Copy the file make.inc into /scratch/kersten/SuperLU/make.inc

  • 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 <br />LOADER = gcc-3.4.2
    LOADOPTS = -O3 -fPIC
  • Change in the file /scratch/kersten/SuperLU/SRC/Makefile the line 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 the command 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</pre> into <pre>LAAUX = lsame.o #xerbla.o

numa: Concepts/installationSolvers (last edited 2020-07-06 14:13:28 by semin)