A detailed guide to installing DOLFIN
From The FEniCS project
This aims to be a more complete, fully from source, guide to installing DOLFIN and its dependencies.
It is designed for slightly older GNU/Linux systems, where even the presence of a recent Python, for instance, is not guaranteed. It has been tested on Red Hat Enterprise Linux 4. You can also fetch this information in a more ready-to-use manner in the form of a bash script, from [1].
[edit]
Requirements
libtool, libxml2, pkg-config, LAPACK and BLAS.
[edit]
Basic notes
The build instructions on this page incorporate the use of the following environment variables:
# Where do you want the downloaded source files to go? DOWNLOAD_PATH=$HOME/downloads/src # Where do you want the compiled software installed? INSTALL_PATH=$HOME/builds # Where are your LAPACK and BLAS libraries? LAPACKANDBLAS=/usr/lib64 # Where are your X11 libraries? X11LIB=/usr/X11R6/lib64 # What sort of Petsc build do you need? PETSC_ARCH=linux-gnu-cxx-debug # Other interesting environment variables PATH=$INSTALL_PATH/bin:$PATH PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig LD_LIBRARY_PATH=$INSTALL_PATH/lib
You also need to create the following directories
mkdir -p $DOWNLOAD_PATH/fenics mkdir -p $INSTALL_PATH
[edit]
Building the dependencies
[edit]
Building Python 2.4
cd $DOWNLOAD_PATH wget http://www.python.org/ftp/python/2.4.4/Python-2.4.4.tar.bz2 tar -xjf Python-2.4.4.tar.bz2 cd Python-2.4.4 ./configure --prefix=$INSTALL_PATH make make install
PYTHON_VERSION=2.4 PYTHON_ROOT=$INSTALL_PATH PYTHON_LIB_PATH=$INSTALL_PATH/lib/python2.4/config PYTHON_INCLUDES=$INSTALL_PATH/include/python2.4
[edit]
Building Mercurial 0.9.3
cd $DOWNLOAD_PATH wget http://www.selenic.com/mercurial/release/mercurial-0.9.3.tar.gz tar -xzf mercurial-0.9.3.tar.gz cd mercurial-0.9.3 python setup.py install
[edit]
Building NumPy 1.0.1
cd $DOWNLOAD_PATH wget http://umn.dl.sourceforge.net/sourceforge/numpy/numpy-1.0.1.tar.gz tar -xzf numpy-1.0.1.tar.gz cd numpy-1.0.1 echo "[atlas]" > site.cfg echo "library_dirs = $LAPACKANDBLAS" >> site.cfg echo "atlas_libs = lapack, blas" >> site.cfg python setup.py install
[edit]
Building Boost 1.33.1 (with Boost Jam 3.1.13)
cd $DOWNLOAD_PATH wget http://superb-east.dl.sourceforge.net/sourceforge/boost/boost-jam-3.1.13.tgz tar -xzf boost-jam-3.1.13.tgz cd boost-jam-3.1.13 ./build.sh gcc cp bin.linux/bjam $INSTALL_PATH/bin/ cd $DOWNLOAD_PATH wget http://umn.dl.sourceforge.net/sourceforge/boost/boost_1_33_1.tar.bz2 tar -xjf boost_1_33_1.tar.bz2 cd boost_1_33_1 bjam --prefix=$INSTALL_PATH install
[edit]
Building Swig 1.3.31
cd $DOWNLOAD_PATH wget http://superb-west.dl.sourceforge.net/sourceforge/swig/swig-1.3.31.tar.gz tar -xzf swig-1.3.31.tar.gz cd swig-1.3.31 ./configure --prefix=$INSTALL_PATH make make install
make check-python-examples make check-python-test-suite
[edit]
Building MPICH2 1.0.5p2
cd $DOWNLOAD_PATH wget http://www-unix.mcs.anl.gov/mpi/mpich2/downloads/mpich2-1.0.5p2.tar.gz tar -xzf mpich2-1.0.5p2.tar.gz cd mpich2-1.0.5p2 ./configure --prefix=$INSTALL_PATH make make install
[edit]
Building PETSc 2.3.2-p8
cd $DOWNLOAD_PATH wget ftp://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-2.3.2-p8.tar.gz tar -xzf petsc-2.3.2-p8.tar.gz cd petsc-2.3.2-p8 export PETSC_DIR=$PWD ./config/configure.py --with-mpi-dir=$INSTALL_PATH --with-clanguage=cxx --download-hypre=yes --enable-hypre=1 --download-umfpack=yes --enable-umfpack=1 make all make test
[edit]
Building SLEPc 2.3.2
cd $DOWNLOAD_PATH wget http://www.grycap.upv.es/slepc/download/distrib/slepc-2.3.2.tgz tar -xzf slepc-2.3.2.tgz cd slepc-2.3.2 export SLEPC_DIR=$PWD export PETSC_DIR=$DOWNLOAD_PATH/petsc-2.3.2-p8 ./config/configure.py make all make test
[edit]
Building gts 0.7.6
cd $DOWNLOAD_PATH wget http://easynews.dl.sourceforge.net/sourceforge/gts/gts-0.7.6.tar.gz tar -xzf gts-0.7.6.tar.gz cd gts-0.7.6 ./configure --prefix=$INSTALL_PATH make make install
[edit]
Building CLN 1.1.13
cd $DOWNLOAD_PATH wget http://www.ginac.de/CLN/cln-1.1.13.tar.bz2 tar -xjf cln-1.1.13.tar.bz2 cd cln-1.1.13 ./configure --prefix=$INSTALL_PATH make make install
[edit]
Building GiNaC 1.3.7
cd $DOWNLOAD_PATH wget ftp://ftpthep.physik.uni-mainz.de/pub/GiNaC/ginac-1.3.7.tar.bz2 tar -xjf ginac-1.3.7.tar.bz2 cd ginac-1.3.7 ./configure --prefix=$INSTALL_PATH make make install
[edit]
Building portions of the FEniCS project
[edit]
Building FIAT
cd $DOWNLOAD_PATH/fenics hg clone http://www.fenics.org/hg/fiat cd fiat python setup.py install
[edit]
Building FErari
cd $DOWNLOAD_PATH/fenics hg clone http://www.fenics.org/hg/ferari cd ferari python setup.py install
[edit]
Building UFC
cd $DOWNLOAD_PATH/fenics hg clone http://www.fenics.org/hg/ufc cd ufc python setup.py install --prefix=$INSTALL_PATH
[edit]
Building FFC
cd $DOWNLOAD_PATH/fenics hg clone http://www.fenics.org/hg/ffc cd ffc python setup.py install
[edit]
Building syfi
cd $DOWNLOAD_PATH/fenics hg clone http://www.fenics.org/hg/syfi cd syfi/ ./configure --prefix=$INSTALL_PATH
[edit]
Building DOLFIN
cd $DOWNLOAD_PATH/fenics hg clone http://www.fenics.org/hg/dolfin cd dolfin CPPFLAGS="-I$PETSC_DIR/externalpackages/UMFPACKv4.3/AMD/Include" ./configure --prefix=$INSTALL_PATH --enable-static --enable-optimization --enable-petsc --enable-mpi \ --with-petsc-dir=$PETSC_DIR --with-boost=$INSTALL_PATH --with-umfpack-lib=$PETSC_DIR/externalpackages/UMFPACKv4.3/$PETSC_ARCH/UMFPACK/Lib \ --with-amd-lib=$PETSC_DIR/externalpackages/UMFPACKv4.3/$PETSC_ARCH/AMD/Lib --with-umfpack-include=$PETSC_DIR/externalpackages/UMFPACKv4.3/$PETSC_ARCH/UMFPACK/Include \ --disable-pydolfin make make install #Add the following to $INSTALL_PATH/lib/pkgconfig/dolfin.pc: echo "Libs: -L${libdir} -ldolfin -L$PETSC_DIR/externalpackages/UMFPACKv4.3/$PETSC_ARCH/AMD/Lib -lamd -L$PETSC_DIR/externalpackages/hypre-1.11.1b/$PETSC_ARCH/lib -lHYPRE \ -L$X11LIB -lX11 -lmpich -lmpichcxx -L$LAPACKANDBLAS -llapack -lblas" make demo

