Version 18 (modified by jonc@…, 11 years ago) (diff)

Fix broken links

Installing Deal.II successfully is something of a black art. The exact incantations used on the current developer machines were not full recorded, but I think I have it worked out now.

It would appear that the only version which currently works with Chaste is 5.2.0 without PETSc. This is described first.

See also EvaluatingDealii.

Basic Deal.II

It's a simple download, unpack, configure & build process:

tar xvfz deal.II-5.2.0.tar.gz
cd deal.II
./configure --with-boost --disable-shared
make all

This is what has just been used on chaste-bob (see also BuildServerSetup). It would appear that the other machines used

./configure --with-boost

but this gave relocation errors on chaste-bob.

The --with-boost is intended to solve Boost MPL errors (#442). However, I don't think it's actually implemented in 5.2.0, so it's probably the lack of PETSc & METIS that has solved the issue. Ho hum.

Install PETSc 2.2.1

To compile Chaste, PETSc 2.2.1 is also needed, even though Deal.II isn't using it. We could probably avoid this by changing, but for the moment, here's what was done on chaste-bob:

cd ~/mpich-1.2.7p1/
./configure --prefix=${HOME}/mpi --with-comm=shared --with-device=ch_shmem --enable-sharedlib --disable-f77 -c++flags=-fPIC
make install
cd ~/mpi
patch -p1 <../mpi.patch
# PETSc 2.2.1
cd ~/petsc-2.2.1/
export PETSC_DIR=`pwd`
./config/ --with-mpi-dir=$HOME/mpi --disable-shared --with-x=false --with-matlab=0
make all
make BOPT=O_c++ all
make BOPT=g_c++ all

Actually Using PETSc

If you want to use PETSc solvers in Deal.II, or solve problems using Deal.II in parallel, then PETSc and METIS are required.

Version 5.2.0 of Deal.II requires PETSc 2.2, whereas 6.0.0 requires 2.3. Neither option works out of the box with Chaste, but suggested steps are documented here for when someone wants to update.

Deal.II 6.0.0 with PETSc 2.3.2

Do InstallPetscAndMpi and InstallMetis. Then install Deal.II:

tar -zxf deal.II-6.0.0.tar.gz
cd deal.II
./configure --with-petsc=$HOME/petsc-2.3.2-p4/ --with-petsc-arch=linux-gnu --with-metis=$HOME/metis-4.0 --with-boost --disable-shared
make all

Tests will then need to be changed, due to Deal.II changing its internal numbering scheme.

Deal.II 5.2.0 with PETSc 2.2.1

The following are the original instructions.

We might need to use PETSc 2.2.1. If so:

(As root):
yum install blas
yum install lapack
yum install lapack-devel
yum install blas-devel
(As user):
tar -xzvf v2.2.1.petsc.tar.gz
cd petsc-2.2.1/
export PETSC_DIR=`pwd`
./config/ --with-mpi-dir=${HOME}/mpi --enable-shared --with-x=false --with-matlab=0
make all
make BOPT=O_c++ all
make BOPT=g_c++ all

To run with more than 1 process, you need to InstallMetis

download from


unzip and untar

 tar xvfz deal.II-5.2.0.tar.gz

For PETSc to work, do:

cd deal.II
./configure --with-petsc=$HOME/petsc-2.2.1/ --with-petsc-arch=linux-gnu --enable-shared --with-metis=$HOME/metis-4.0
make all

Note that you also need /home/chaste/petsc-2.2.1/lib/libg_c++/linux-gnu/ on the LD_LIBRARY_PATH.

Then we need to turn off selinux enforcing, or the shared libraries don't work:

su -
setenforce 0

The above works until a reboot. To change from next boot, edit /etc/selinux/config and set SELINUX=disabled.

It may be possible to set attributes on the PETSc libraries so we don't have to disable selinux, but I don't know how.

Attachments (1)

Download all attachments as: .zip