InstallGuides/Comlab

Installing Chaste on Oxford University Computing Laboratory machines

Last updated September 2013 for Fedora 18.

Where to install

We will install everything to /home/scratch/ as this is a local drive with plenty of space. Make a chaste-libs folder and set its path as an environment variable:

mkdir /home/scratch/chaste-libs
export base='/home/scratch/chaste-libs'

ccache directory

By default, ccache is installed and the directory is set to ~/.ccache. As a network location this is very slow! Enter the following lines into a terminal to make a new folder in /home/scratch, delete ~/.ccache if it exists, and redirect it to the new one using a symbolic link.

mkdir /home/scratch/.ccache
rm -rf ~/.ccache
ln -s /home/scratch/.ccache ~/.ccache

Also, you can add the following to the bottom of your ~/.bashrc to set the ccache directory explicitly:

export CCACHE_DIR=/home/scratch/.ccache

Note that this will cause havoc if you log in to a machine which doesn't have a /home/scratch directory.

Fedora packages

A large number of dependencies are available as packages. Some on this list will already be installed.

sudo yum install scons gcc-gfortran gcc-c++ boost-devel boost-serialization openmpi openmpi-devel valgrind valgrind-openmpi valgrind-devel xerces-c-devel xsd subversion eclipse-subclipse eclipse-cdt eclipse-pydev subversion-javahl vtk-devel python-lxml python-amara python-rdflib python-dateutil

PETSc

The following are slightly modified from the PETSc install instructions in the main install guide, as we might as well use the openmpi we installed earlier. These instructions are for 64-bit machines. This also takes a while! Feel free to use a  different version of PETSc, but check on InstallGuides/DependencyVersions first.

export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
cd $base
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.4.2.tar.gz
tar xzvf petsc-lite-3.4.2.tar.gz
rm -f petsc-lite-3.4.2.tar.gz
cd petsc-3.4.2/

export PETSC_DIR=`pwd`
export PETSC_ARCH=linux-gnu
./configure --with-mpi-dir=/usr/lib64/openmpi/ --with-clanguage=cxx --with-x=0 --download-f-blas-lapack --download-metis --download-parmetis --download-sundials --download-hypre --download-hdf5

Then, do as it says and run the suggested make command (something like make PETSC_DIR=/home/scratch/chaste-libs/petsc-3.4.2 PETSC_ARCH=linux-gnu all).

We recommend you also make an optimised build.

export PETSC_ARCH=linux-gnu-opt
./configure --with-mpi-dir=/usr/lib64/openmpi/ --with-clanguage=cxx --with-x=0 --download-f-blas-lapack --download-metis --download-parmetis --download-sundials --download-hypre --download-hdf5 --CXXOPTFLAGS="-O3" --COPTFLAGS="-O3" --with-debugging=0

Again, run the suggested make command, and you're done!

Eclipse

When you first run eclipse it will ask you to set the workspace location. Set it to /home/scratch/workspace and let this be the default every time. On the splash screen go straight to the "workbench" by clicking the button at the top-right.

Set preferences:

Set up Chaste