Installation guide : eigenvalue solver
Contents
ARPACK - eigenvalue solver (implicitly restarted Arnoldi method)
=== Installing packages in Debian,
- ===
For the Linux distributions Debian or Ubuntu install the package
<pre>libarpack2-dev</pre>
using the packet manager.
Important: Make sure that the library libarpack.so or libarpack.a is installed into =/usr/lib= or =/usr/lib64=. Otherwise specify the path ARPACK_PATH in =$(CONCEPTS_DEV)/boost-build-modules.jam=. Note that the library needs to have exactly the name as given above. If it should have a suffix with the version number for example, you have to create a symbolic link.
=== Direct installation
- ===
Download ARPACK from http://www.caam.rice.edu/software/ARPACK, e.g. <pre>cd /scratch/kersten <br />wget http://www.caam.rice.edu/software/ARPACK/SRC/arpack96.tar.gz <br />tar -xzf arpack96.tar.gz <br />wget http://www.caam.rice.edu/software/ARPACK/SRC/patch.tar.gz <br />tar -xzf patch.tar.gz </pre>
Edit ARmake.inc and change <pre>home = /scratch/kersten/ARPACK <br />BLASdir = /usr/lib <br />LAPACKdir = /usr/lib <br />LAPACKLIB = /usr/lib <br />BLASLIB = /usr/lib <br />FC = gfortran <br />FFLAGS = -O3 -funroll-all-loops -ffast-math -fPIC <br />MAKE = make </pre> replace g77-3.4.5 with your version of the Fortran compiler. The last two changes may not be necessary on some machines.
Call <pre>make all</pre>
Recompile Concepts <pre>bjam</pre> Now you should read something like <pre>Activating support for eigenvalue solver Arpack.</pre>
== Trilinos - large-scale, complex multi-physics engineering and scientific problems
- ==
Concepts uses Trilinos for Anasazi, a versatile eigenvalue solver.
Go to http://trilinos.sandia.gov/download/trilinos-9.0.html and download the latest version of trilinos, e.g.
<pre>trilinos-9.0.2.tar.gz</pre>
- Extract the archive
<pre>tar xzf trilinos-9.0.2.tar.gz</pre>
- Enter the newly created directory
<pre>cd trilinos-9.0.2</pre>
- It is recommended to create an empty subdirectory for each build
<pre>mkdir build && cd build </pre>
You can compile Trilinos (i) with gcc-4 and gfortan or (ii) with gcc-3 and g77.
(i). Your default compiler is gcc-4 or you choose for it (recommended).
- You should define the following environment variables, here the example of bash shell:
<verbatim>export CC="gcc-4.1.2" export CXX="g++-4.1.2" export CXXFLAGS="-fPIC -O3 -fomit-frame-pointer -g" export CFLAGS="-fPIC -O3 -fomit-frame-pointer -g" export LDFLAGS="-fPIC"</verbatim>
- Trilinos has to use gfortran (binary) which is often part of the gcc package.
- If both gfortran and g77 are installed, Trilinos need a bit of help to use it and not the possibly also existing g77. For bash shells, this can be done with
<verbatim>export F77="gfortran-4.1.2"</verbatim>
- Call the configure script (located in the parent directory)
<verbatim> ../configure --prefix=<i>installdir</i> --with-gnumake --enable-anasazi --enable-epetra --enable-teuchos --enable-triutils --enable-didasko --enable-shared --cache-file=config.cache</verbatim>
- Without gnumake flag the makefile are really awkward.
- The other flags are needed to install by Anasazi required packages.
The output of configure should then include: (and not g77 or any compiler you do not want to use, see page 19 in the [http://trilinos.sandia.gov/TrilinosUserGuide.pdf Trilinos user guide] for more flags)
<verbatim> checking whether g++-4.1.2 accepts -g... yes checking whether gfortran-4.1.2 accepts -g... yes</verbatim>
(ii). Your default compiler is gcc-3 or you choose for it.
- Trilinos has to use g77 (binary).
- If you use it please supplement to this Wiki documentation.
- Start building Trilinos via
<pre>make sudo make install </pre>
Go to =$(CONCEPTS_DEV)/eigensolver/anasazi=, execute bjam, the build should now succeed.
Complete the environment variable [http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html LD_LIBRARY_PATH] such that the shared libraries will be found, e.g. for bash shells
<verbatim> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH':<i>installdir</i>/lib</verbatim>