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
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.
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
At the end of the file add the following lines:
Save, quit and then re-load .bashrc (or log out and back in again):
If it doesn’t already exist, create the directory:
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.
Log out and back in again to activate the environment modules in the shell;
alternatively, run
To check that environment modules have been activated, run
If all has gone well, you should see output similar to the following:
Define the directory where you want to install the libraries that
Chaste depends on, and create a modulefiles directory in it e.g.
Register the modulefiles directory with the environment modules system.
It is recommended that you add the above line to your .bashrc (or similar) so
the modulefiles directory is registered every time you log in e.g.
The following instructions assume that:
git is installed.
wget is installed.
You are connected to the internet.
If any of these is not true, then download the links in your browser
and copy them onto the machine you wish to install on.
PETSc can install a lot of Chaste’s dependencies for us.
(There is a --download-boost option, but this doesn’t include the particular
libraries we need, so we can’t use that.)
These steps can take some time (potentially an hour or more).
Define package versions for MPICH and HDF5
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.
Optional – install optimised PETSc build too.
From the dependency-modules/scripts directory, run
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
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
At the end of the file add the lines (leaving out packages you installed via a package manager):
Save, quit and then re-load .bashrc (or log out and back in again):
Clean up residual build artifacts and source tarballs
To view installed modules, run
The output should be similar to:
The installed modules need to be loaded into the environment before configuring
Chaste. To do this, run
See the manual post-installation instructions.
You are ready to go. The dependencies will be located automatically.
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.