Differences between revisions 2 and 3
Revision 2 as of 2020-07-06 09:25:27
Size: 9556
Editor: semin
Comment:
Revision 3 as of 2020-07-06 09:52:34
Size: 9338
Editor: semin
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
<TableOfContents()> <<TableOfContents()>>
Line 5: Line 5:
== MUMPS - direct solver for real and complex valued unsymmetric matrices
==
== MUMPS - direct solver for real and complex valued unsymmetric matrices ==
Line 8: Line 7:
=== Installing packages in Debian, Ubuntu or Redhat (MPI version)
===
=== Installing packages in Debian, Ubuntu or Redhat (MPI version) ===
Line 11: Line 9:
For the Linux distributions Debian or Ubuntu install the package 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}}}).
Line 13: Line 12:
<pre>libmumps-dev</pre> === Installing packages in Debian, Ubuntu or Redhat (sequential version) ===
Line 15: Line 14:
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=). 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}}}).
Line 17: Line 17:
=== Installing packages in Debian, Ubuntu or Redhat (sequential version)
 ===
'''Remark''': use this version only if you don't compile with MPI.
Line 20: Line 19:
For the Linux distributions Debian or Ubuntu install the package

<pre>libmumps-seq-dev</pre>

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 <pre>libmumps-dev</pre> instead.

=== Direct installation
 ===
=== Direct installation ===
Line 34: Line 23:
==== !! BLACS
====
==== BLACS ====
Line 39: Line 27:
   * 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 <pre>cd $(CONCEPTS_DEV)/.. <br />wget http://www.netlib.org/blacs/mpiblacs.tgz <br />tar -xzf mpiblacs.tgz <br />wget http://www.netlib.org/blacs/mpiblacs-patch03.tgz <br />tar -zxf mpiblacs-patch03.tgz <br />cd BLACS</pre>    * 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
   }}}
Line 41: Line 37:
<verbatim>
MPILIB = -L$(MPILIBdir) -lmpi -lmpi_f77 -lmpi_f90 -lmpi_cxx</verbatim>
   {{{
MPILIB = -L$(MPILIBdir) -lmpi -lmpi_f77 -lmpi_f90 -lmpi_cxx
   }}} if you'r
e using OpenMPI.
Line 44: Line 41:
if you're using OpenMPI.

You also need to replaces lines 198, 199 and 204 by

<verbatim>
F77 = gfortran
   F77NO_OPTFLAGS = -fPIC -I$(MPIINCdir)
   CCFLAGS = -fPIC -O4 -I$(MPIINCdir)</verbatim>
   You also need to replaces lines 198, 199 and 204 by
   {{{
F77 = gfortran
F77NO_OPTFLAGS = -fPIC -I$(MPIINCdir)
CCFLAGS = -fPIC -O4 -I$(MPIINCdir)
   }}}

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

  • 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 <pre>SCALAPACK_PATH = $(CONCEPTS_DEV)/../scalapack-2.0.2/lib</pre>

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

<verbatim> 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</verbatim>

  • Compile using make alllib.

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

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

<verbatim>

  • gcc.compile.c++ builds/operator/gcc-4/debug/umfpack.o

    operator/umfpack.cc:9:23: error: umfpack.h: No such file or directory </verbatim>

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 [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 <pre>cd /scratch/kersten <br />wget http://crd.lbl.gov/~xiaoye/SuperLU/superlu_3.1.tar.gz <br />tar -xzf superlu_3.1.tar.gz <br />mv SuperLU_3.1 SuperLU <br />cd SuperLU</pre>

  • Copy the file [https://wiki.math.ethz.ch/pub/Concepts/InstallationGuide/make.inc make.inc] into =/scratch/kersten/SuperLU=

  • If your gcc is 4.xx or newer you have to edit make.inc and use something like <pre>SuperLUroot = /scratch/kersten/SuperLU_3.1 <br />SUPERLULIB = $(SuperLUroot)/libsuperlu.a <br />BLASLIB = /usr/lib/libblas.a <br />TMGLIB = libtmglib.a <br />LIBS = $(SUPERLULIB) $(BLASLIB) <br />CC = gcc-3.4.2 <br />CFLAGS = -O3 -fPIC -fomit-frame-pointer -g <br />FORTRAN = gfortran <br />FFLAGS = -O -fPIC <br />LOADER = gcc-3.4.2 <br />LOADOPTS = -O3 -fPIC </pre>

  • Change in the file =/scratch/kersten/SuperLU/SRC/Makefile= <pre>superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) $<</pre> into <pre>superlu_timer.o: superlu_timer.c ; $(CC) -c $(NOOPTS) -fPIC $< </pre>

  • execute in =/scratch/kersten/SuperLU= <pre>make</pre>

  • When building Concepts (call of bjam) it indicates, that it finds !SuperLU with the line <pre>* Activating support for direct solver SuperLU.</pre>

Known problems

  • Pre-installed BLAS in =/usr/lib/libblas.a= <pre>/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)</pre> Solution: deactive xerbla.o in SRC/Makefile by changing <pre>LAAUX = lsame.o</pre> into <pre>LAAUX = lsame.o #xerbla.o</pre>

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