Other Linux systems – try following the instructions provided below.
If you encounter any problems, or have an unusual setup, the following material
may be useful. Note that some familiarity with installing software on Linux-like
systems may be required.
The following tools are required or useful.
Most systems will already have these installed, or provide an easy way to set them up:
gcc and g++
gfortran — if you want to build PETSc with HYPRE support (--download-hypre option below).
wget
python3, python3-venv and python3-pip
git — for users of development branches.
valgrind — for memory testing (optional).
Since version 3.1, Chaste requires a 64-bit system. Almost all modern systems
will be 64-bit. In the terminal, type
uname -m
If this returns i686, you have a 32-bit system, and you will not be able to
use modern versions of Chaste.
Many systems will also include some of the below Chaste dependencies already.
You can usually have a look for them with locate, e.g.
locate petsc
If you find pre-existing versions, then check
Dependency Versions to see if they
are compatible with Chaste. If so, you may be able to skip their installation
below, but make sure that you have the ‘includes’ and ’libraries’ where required
(if you don’t know what this means then just follow all the below
instructions!).
Note
The newest versions of libraries may not have been tested yet, so don’t
simply install latest version! Ideally follow these instructions, but if this
isn’t possible (or you have pre-installed versions) then check
Dependency Versions first.
First define the directory where you want to manually install the libraries that
Chaste depends on. It is generally best if this is on a local hard disk for
speed. We will also add the binary directory to the path right away, so we can
run cmake (which we are about to install) without having to type the full path
to this directory. How to do this depends on your shell, but if you are running
bash the easiest way is to add it to your .bashrc file, e.g. using
Save, quit and then re-load .bashrc (or log out and back in again):
source ~/.bashrc
If it doesn’t already exist, create the directory:
mkdir -p $CHASTE_LIBS
The following instructions assume that:
wget is installed.
You are connected to the internet.
If either of these is not true, then download the https links in your browser
and copy them onto the machine you wish to install on.
This uses scripts from the
dependency-modules repository to
install Chaste dependencies as environment modules, which makes it possible to
install multiple versions of the dependencies side-by-side and enables switching
between them. If you do not already have an environment modules system
installed, you can install one e.g.
CMake is the recommended build system for Chaste, and is needed to build several
of the dependencies listed below.
wget https://www.cmake.org/files/v3.22/cmake-3.22.6.tar.gz
tar -zxf cmake-3.22.6.tar.gz
cd cmake-3.22.6
./bootstrap --prefix=$CHASTE_LIBS --parallel=4&& make -j4 && make install
cd ..
rm -rf cmake-3.22.6.tar.gz cmake-3.22.6
From the dependency-modules/scripts directory, run
If you want to build PETSc with hypre, optionally remove --with-fc=0 and add
--download-hypre=1 in the following code blocks. If you are not sure whether
you want to build PETSc with hypre, leave the following as is.
exportPETSC_ARCH=linux-gnu
./configure \
--with-make-np=4\
--with-cc=gcc \
--with-cxx=g++ \
--with-fc=0\
--with-x=false\
--with-ssl=false\
--download-f2cblaslapack=1\
--download-mpich=$mpich\
--download-hdf5=$hdf5\
--download-parmetis=1\
--download-metis=1\
--with-shared-libraries
make all
make test# optional
wget https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.2.3.tar.gz
tar -zxf xerces-c-3.2.3.tar.gz
cd xerces-c-3.2.3/
exportXERCESCROOT=`pwd`./configure --prefix=$CHASTE_LIBSmake -j4 all
make install
cd ..
rm -rf xerces-c-3.2.3 xerces-c-3.2.3.tar.gz
From the dependency-modules/scripts directory, run
wget https://www.vtk.org/files/release/9.1/VTK-9.1.0.tar.gz
tar -zxf VTK-9.1.0.tar.gz
mkdir build_VTK-9.1.0 &&cd build_VTK-9.1.0
cmake -DCMAKE_INSTALL_PREFIX=$CHASTE_LIBS ../VTK-9.1.0 && make -j4 && make install
cd ..
rm -rf build_VTK-9.1.0 VTK-9.1.0 VTK-9.1.0.tar.gz
Troubleshooting
Install OpenGL e.g. sudo dnf install mesa-libGL-devel on Fedora (or
similar) to get OpenGL headers installed before this point, if you get a
configure error stating that these headers have not been found
Install RPM Config e.g. sudo dnf install redhat-rpm-config (or similar) if you
get
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
Install X11 e.g. sudo dnf install libxt-devel (or similar) if you get an
error about X11
Load the CMake module
module load cmake/3.22.6
From the dependency-modules/scripts directory, run
For manually installed dependencies, you probably then want to add various
environment variables specifying the installed dependency locations to your
.bashrc file, e.g. using
gedit ~/.bashrc
At the end of the file add the lines (leaving out packages you installed via a package manager):
Once you’ve installed the dependencies as above, you need to get hold of the
Chaste code. See Getting Started for the options to pick here. Once
you’ve done this, you are ready to build and run the test suite – see the
CMake First Run Guide.