Installing Chaste using the Ubuntu package
For Ubuntu users, there is a package available to greatly ease installation of the Chaste source code. It requires an Ubuntu version of Intrepid or newer, as several dependencies are not available as Ubuntu packages in older versions. We have also had success installing Chaste on a virtual machine running Ubuntu in other versions of Linux, Mac OS X and Windows.
The package has been tested with all versions of Ubuntu from Intrepid to Trusty inclusive, and will be adapted to new versions as soon as possible after they are released. (Note that the release 3.1 source does not work with Raring or newer, but the latest trunk does.)
1. Accessing the Chaste Package
The package can be downloaded using your normal package manager (e.g. aptitude) by adding our repository to your configuration. This can be done by, for example, opening a terminal and running
sudo gedit /etc/apt/sources.list.d/chaste.list
and adding the following line to the chaste.list text file:
deb http://www.cs.ox.ac.uk/chaste/ubuntu trusty/
The last component of the line depends on your version of Ubuntu. For releases prior to 14.04 (Trusty), use legacy/. For newer versions, use the release codename, e.g. for 14.04 use trusty/ (as above), or for 14.10 (when released) use utopic/. Note that the trailing / is necessary!
To avoid warnings, and to work with the graphical package installer, you should then install the Chaste public licence key. Back in the terminal, type:
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 422C4D99
2. Getting the correct dependencies
You should now decide whether you want to be a Code User or a Code Developer.
- Code Users - are people who want to work with a stable released version of the Chaste code (a new release is made roughly every six months).
- Code Developers - (both internal and external to the core team) are people who want to work with the latest development version of the Chaste code, between the main stable releases.
See GettingStarted for more detail if you still aren't sure.
2a. For Code USERS (working with a release, rather than developers)
After following point 1 above, you should be able to install the latest stable release of the Chaste source code, plus all dependencies, by running:
sudo apt-get update sudo apt-get install chaste-source
This will create a source code tarball in /usr/src, and some documentation should appear in /usr/share/doc/chaste-source. The source code can then be unpacked and built wherever is convenient, for example:
cd $HOME tar -jxf /usr/src/chaste-source.tar.bz2 cd chaste-source scons
Beta release versions of Chaste may sometimes be made available. If you want to use these, add the following additional line to /etc/apt/sources.list.d/chaste.list :
deb http://www.cs.ox.ac.uk/chaste/ubuntu/ beta/
These are unsupported, and may or may not work on particular Ubuntu releases.
Installing previous releases
You can use the command "apt-cache showpkg chaste-source" to see what versions of the package are available for installation, then do "apt-get install chaste-source=<version>" to install the desired version. I suggest the latest packaging of the desired release, so e.g. do "apt-get install chaste-source=2.1.10906" for release 2.1.
2b. For Code DEVELOPERS (or users working with the latest trunk code and projects)
The repository above also includes a chaste-dependencies package for the benefit of Chaste developers. Installing chaste-dependencies (including the packages it Suggests) should enable you to get started immediately with Chaste: doing a standard checkout and scons ought to Just Work.
To install the suggested packages:
# first, make aptitude aware of the latest changes sudo apt-get update # then install sudo apt-get install --install-recommends chaste-dependencies sudo apt-get install `dpkg -s chaste-dependencies | egrep "^Suggests" | cut -d "," -f 1-111 --output-delimiter " " | cut -d ":" -f 2`
Note that on Lucid one of the suggested packages, eclipse-cdt, is not available. In this case you might be better advised to list the packages and install the rest separately. To list them do
dpkg -s chaste-dependencies | egrep "^Suggests" | cut -d "," -f 1-111 --output-delimiter " " | cut -d ":" -f 2
To test pre-release packaging of Chaste, also add the beta repository as described above.
If you want to use eclipse to work with Chaste (as we do - recommended), after the above you will then need to:
- Install eclipse plugins - 'CDT' not required, 'subclipse' is the important one.
- Connect to Chaste repository with subclipse - to get a copy of the current source code.
If you don't want to use eclipse you can checkout at the command line. You can get information on the latest stable build on the external developer guide page.
If you have the necessary permissions, see also Check out a user project - to make a new user project, or get a copy of an existing one.
Manual adjustments
You can choose different blas/lapack implementations. Look particularly at the atlas packages, (apt-cache search libatlas to see the options). Use libatlas-sse2-dev on Intel, libatlas-3dnow-dev on AMD, libatlas-base-dev otherwise.
3. Possible issues
Errors after tests
Some of the latest versions of Ubuntu (oneiric/precise) come with Boost 1.46.1, which unfortunately contains a bug (fixed in quantal / boost 1.48).
This bug leads to output like this, at the end of a test:
Running 4 tests ***** TestCell.hpp ***** Entering TestUpdateCellProliferativeTypes Passed Entering TestWithWntCellCycleModel Passed Entering TestWithStochasticWntCellCycleModel Passed Entering TestWntMutantVariantsAndLabelling Passed OK! pure virtual method called terminate called without an active exception [csu7921:16267] *** Process received signal *** [csu7921:16267] Signal: Aborted (6) [csu7921:16267] Signal code: (-6) [csu7921:16267] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7f4f75a2ecb0] [csu7921:16267] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f4f75698445] [csu7921:16267] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f4f7569bbab] [csu7921:16267] [ 3] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x11d) [0x7f4f7620369d] [csu7921:16267] [ 4] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7f4f76201846] [csu7921:16267] [ 5] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7f4f76201873] [csu7921:16267] [ 6] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb628f) [0x7f4f7620228f] [csu7921:16267] [ 7] /usr/lib/libboost_serialization.so.1.46.1(_ZNK5boost13serialization16void_cast_detail11void_casterltERKS2_+0x26) [0x7f4f79df7466] [csu7921:16267] [ 8] /usr/lib/libboost_serialization.so.1.46.1(_ZNK5boost13serialization16void_cast_detail11void_caster20recursive_unregisterEv+0x9a) [0x7f4f79df755a] [csu7921:16267] [ 9] /home/wolf1768/workspace/Chaste/lib/libpde.so(_ZN5boost13serialization16void_cast_detail21void_caster_primitiveI22ConstBoundaryConditionILj1EE25AbstractBoundaryConditionILj1EEED1Ev+0x2b) [0x7f4f7db419dd] [csu7921:16267] [10] /home/wolf1768/workspace/Chaste/lib/libpde.so(_ZN5boost13serialization6detail17singleton_wrapperINS0_16void_cast_detail21void_caster_primitiveI22ConstBoundaryConditionILj1EE25AbstractBoundaryConditionILj1EEEEED1Ev+0x34) [0x7f4f7db41a80] [csu7921:16267] [11] /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9d) [0x7f4f7569dd3d] [csu7921:16267] [12] /home/wolf1768/workspace/Chaste/lib/libpde.so(+0x1992d6) [0x7f4f7daac2d6] [csu7921:16267] *** End of error message *** Aborted (core dumped)
Fortunately this doesn't affect the running of the tests, which execute normally, but just display errors on shutdown. As long as you see "OK!", everything is OK!
If you do see this in tests, then when running a compiled executable you may see this at the end:
terminate called after throwing an instance of 'Exception' Aborted
this is not a problem either, and executable should have run correctly.
If this really does offend you (it can be very annoying if you are doing development and/or memory testing), then precise (12.04 LTS) also makes boost 1.48 available which doesn't have this bug. Unfortunately this isn't the default and you have to install it manually. (NB: These instructions are for the release 3.1 package; with the latest beta you should be able to do just "sudo apt-get install libboost-serialization1.48-dev libboost-filesystem1.48-dev".)
- Remove the existing chaste-dependencies which the system thinks relies on boost 1.46.
sudo apt-get remove chaste-dependencies
- List all the chaste dependencies with a command like this:
apt-cache show chaste-dependencies | head -30
- Copy the names of the ones you want
- Replace libboost-serialization-dev and libboost-filesystem-dev with libboost-serialization1.48-dev and libboost-filesystem1.48-dev,
- Install them all (this can be done in multiple calls) with:
sudo apt-get install <list of packages>
Old versions of Chaste
For release 2.0 of Chaste and earlier, note that 4 tests (TestQuadraticMesh, TestVoronoiTessellation, TestVertexMesh, and TestInventorVoronoiWriter) may be reported as failing. This is due to a different version of tetgen being used in Ubuntu. Release 2.1 packages tetgen in the Chaste distribution and so avoids the problem.
If working with older versions, installing tetgen 1.4.2 manually as described at InstallTetgenAndTetview (and ensuring that this version appears on your PATH before the system version) resolves the problems.