Installing Chaste on Mac OS X 10.6 (experimental)

Note: these instructions are somewhat outdated: Chaste now includes tetgen and triangle, so you do not need to install these. It is also recommended to install parmetis using the PETSc installer if possible, and PETSc can also install CVODE for Chaste to use. We have a local user trying this, and will update the instructions if successful...

These instructions are a work in progress on how to install Chaste on OS X 10.6 (Snow Leopard). It is possible to successfully install Chaste using this guide, however a significant number of Chaste unit tests are known to fail on OS X. In particular, due to a lack of parallel support for HDF5 on OS X, it is recommended that Chaste is only used on a single processor. These instructions are based on source:tags/release_1/README_INSTALLATION.txt

A prerequisite for this installation is to have an up to date, Snow Leopard, version of Xcode with the Unix Developer Tools installed. Xcode provides gcc and fundamental header files. You can find it in your Mac OS X installation DVD or download it directly from Apple. In some instances, machines updated from Leopard may not have xcode automatically updated, it must be done manually. Some users report that the version of Xcode downloaded from apple does not contain the Unix Developer Tools and that the Mac OS X install version should be used, see https://trac.macports.org/ticket/21062.

Mac Ports

These instructions use the Mac Ports system to install a number of command line utilities.

Download Mac Ports from http://www.macports.org/install.php and follow the onscreen installation instructions.

wget

To simplify later downloads install wget:

sudo port install wget

Environment Variables

Several environment variables are required to simplify the installation. The value of $CHASTE_LIBS should be altered by the user to reflect the desired location for chaste libraries on their machine. Edit .profile in your home directory and add lines:

export CHASTE_LIBS=/Users/bordas/work/chaste-libs  
export PATH=$CHASTE_LIBS/bin:$PATH                                              
export PETSC_DIR=/opt/local/lib/petsc                                           
export PETSC_ARCH=darwin

SCons

Macports has version 1.3.0 of Scons:

sudo port install scons

Boost

Macports has version 1.42.0 of boost:

sudo port install boost

OpenMPI

Macports has version 1.3.3 of OpenMPI:

sudo port install openmpi

Hdf5

Macports has version 1.8.4 of HDF5. HDF5 parallel (required by Chaste) is unsupported on OS X and isn't available in macports.

To enable HDF5-parallel download the attached patch and apply it to the portfile:

cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/science/hdf5-18
sudo patch -p0 < ~/Desktop/Portfile-rrdtool.diff
sudo port install hdf5-18 +parallel

Petsc

Macports has version 3.0.0.p8 of Petsc:

sudo port install petsc +hdf5

Xerces-c

Xerces-c 2.8 is available under macports but doesn't build under Snow Leopard. Fortunately 3.0.1 is also available:

sudo port install xercesc3

Codesynthesis XSD

Codesynthesis XSD is not available in Macports and must be installed directly:

cd $CHASTE_LIBS
wget http://www.codesynthesis.com/download/xsd/3.2/macosx/i686/xsd-3.2.0-i686-macosx.tar.bz2
bunzip2 xsd-3.2.0-i686-macosx.tar.bz2
tar xf xsd-3.2.0-i686-macosx.tar.bz2
mkdir $CHASTE_LIBS/bin
ln -s $CHASTE_LIBS/xsd-3.2.0-i686-macosx/bin/xsd $CHASTE_LIBS/bin/xsd

tetgen

Tetgen is not available in Macports and must be installed directly:

cd $CHASTE_LIBS
wget http://tetgen.berlios.de/files/tetgen1.4.3.tar.gz
tar -zxvf tetgen1.4.3.tar.gz
cd tetgen1.4.3
make
mv tetgen $CHASTE_LIBS/bin/
cd ..

Parmetis

Parmetis is not available in Macports and must be installed directly:

cd $CHASTE_LIBS
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/ParMetis-3.1.tar.gz
tar -zxvf ParMetis-3.1.tar.gz
cd Parmetis-3.1

Parmetis needs some tweaking to compile it on OS X. Edit 'Makefile.in' in the Parmetis directory to set:

CC=/opt/local/bin/openmpicc
COPTIONS=-m64
LD=/opt/local/bin/openmpicc

Edit $Parmetis/ParMETISLib/stdheaders.h and comment out '#include <malloc.h>'. Run make:

make

triangle

sudo port install triangle

Configuration

Chaste may now be checked out and installed using eclipse and the standard developer instructions. It is necessary to use a hostconfig file to tell chaste where the libraries are located. The attached file local.py should be placed in 'workspace/python/hostconfig/machines' and altered to reflect the location of $CHASTE_LIBS.