⇤ ← Revision 1 as of 2020-07-06 09:24:45
Size: 45
Comment:
|
Size: 9556
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 <pre>libmumps-dev</pre> 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 <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 === 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 <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> * 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 <verbatim> MPILIB = -L$(MPILIBdir) -lmpi -lmpi_f77 -lmpi_f90 -lmpi_cxx</verbatim> 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> * 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> |
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
<pre>libmumps-dev</pre>
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
<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
- ===
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 <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>
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
<verbatim>
MPILIB = -L$(MPILIBdir) -lmpi -lmpi_f77 -lmpi_f90 -lmpi_cxx</verbatim>
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>
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>