Differences between revisions 4 and 8 (spanning 4 versions)
Revision 4 as of 2020-07-06 10:00:45
Size: 9331
Editor: semin
Comment:
Revision 8 as of 2020-07-06 10:23:11
Size: 9349
Editor: semin
Comment:
Deletions are marked like this. Additions are marked like this.
Line 54: Line 54:
   * 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>    * 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
   }}}
Line 56: Line 62:
   * 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.    * 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.
Line 60: Line 66:
   * Modify the flag in =$(CONCEPTS_DEV)/boost-build-modules.jam=, to put <pre>SCALAPACK_PATH = $(CONCEPTS_DEV)/../scalapack-2.0.2/lib</pre>    * Modify the flag in {{{$(CONCEPTS_DEV)/boost-build-modules.jam}}}, to put {{{SCALAPACK_PATH = $(CONCEPTS_DEV)/../scalapack-2.0.2/lib}}}.
Line 62: Line 68:
==== !! MUMPS
====
==== MUMPS ====
Line 65: Line 70:
http://graal.ens-lyon.fr/MUMPS (MUltifrontal Massively Parallel sparse direct Solver) is a massively parallel solver mainly developed at ENS Lyon. MUMPS (MUltifrontal Massively Parallel sparse direct Solver) is a massively parallel solver mainly developed at [[http://graal.ens-lyon.fr/MUMPS|ENS Lyon]].
Line 67: Line 72:
   * 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)/..=).
   * 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)/..}}}).
Line 71: Line 76:
<verbatim>    {{{
Line 103: Line 108:
> OPTL = -fPIC -O</verbatim> > OPTL = -fPIC -O
   }}}
Line 105: Line 111:
   * 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>    * 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}}}.
Line 107: Line 113:
== Umfpack - direct solver for real valued unsymmetric matrices
==
== Umfpack - direct solver for real valued unsymmetric matrices ==
Line 112: Line 117:
<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>
   {{{
gcc.compile.c++ builds/operator/gcc-4/debug/umfpack.o
operator/umfpack.cc:9:23: error: umfpack.h: No such file or directory
  }}}
Line 116: Line 122:
'''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. '''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.
Line 118: Line 124:
== !SuperLU - direct solver for real and complex valued unsymmetric matrices
==
== SuperLU - direct solver for real and complex valued unsymmetric matrices ==
Line 121: Line 126:
=== Installing packages in Debian, Ubuntu or Redhat
===
=== Installing packages in Debian, Ubuntu or Redhat ===
Line 124: Line 128:
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=). 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}}}).
Line 126: Line 130:
The !SuperLU packages (RPM) for Redhat includes the library and includes files as well. The SuperLU packages (RPM) for Redhat includes the library and includes files as well.
Line 128: Line 132:
=== Direct installation
===
=== Direct installation ===
Line 132: Line 135:
   * 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>    * 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>

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