Installing Chaste on OSX yosemite
Warning: we're currently writing this guide and currently it only allows the use of 'cell based' code
This install guide is based upon a fresh install of OSX Yosemite in October 2014.
Xcode
Install Xcode from app store. (Version 6.1)
In Xcode select preferences->downloads and install "Command Line Tools"Not needed in 6.1 as commend line tools are included in Xcode 6.1.- Xcode comes with Subversion version 1.7.1. Alternatively, Homebrew has version 1.8 of Subversion.
- Xcode provides the "g++" compiler
Home Brew
see http://mxcl.github.com/homebrew/
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Later libraries (PETSc, METIS, VTK and parMETIS) need a "science" repository
brew tap homebrew/science
and we need specific versions of some libraries (VTK) need a "versions" repository
brew tap homebrew/versions
Note: I needed to chown some directories to get homebrew 100% happy
sudo chown USER /usr/local/share/man/de/ sudo chown USER /usr/local/share/man/de/man1/
where USER is your username.
Of youre using the cell based code only you can roll the next few installs together. However, some of these (PETSc and Sundials) need some configuration to build in the correct way to work for all of the code base (see Mountain Lion instructons). It will take a while.
brew install wget scons xerces-c petsc parmetis metis vtk5
from 10/01/15 you need to install sundials with mpi.
brew install sundials --with-mpi
You need to install a specific boost version: boost 1.55
brew tap homebrew/versions brew install boost155
and also hdf5 1.8.11 (AS OF 08/12/14 the file this points to no longer exists so will need to use the latest HDF5)
brew install hdf5 --with-mpi
cd Taps/homebrew/homebrew-science/
git checkout 6e496de hdf5.rb
brew unlink hdf5
brew install hdf5 --enable-parallel
Codesynthesis XSD
Codesynthesis XSD is not available in Macports and must be installed directly:
wget http://www.codesynthesis.com/download/xsd/3.3/macosx/i686/xsd-3.3.0-i686-macosx.tar.bz2 tar xvfz xsd-3.3.0-i686-macosx.tar.bz2 #These instructions assume that homebrew has created /usr/local/ and that the current user has permission to write to it. cp xsd-3.3.0-i686-macosx/bin/xsd /usr/local/bin/ cp -r xsd-3.3.0-i686-macosx/libxsd /usr/local/opt/
You also need to change the call setg (b, b, e) on line 35 of xsd/cxx/zc-istream.txx like this:
bash-3.2$ diff -u /usr/local/opt/libxsd/xsd/cxx/zc-istream.txx.orig /usr/local/opt/libxsd/xsd/cxx/zc-istream.txx --- /usr/local/lib/libxsd/xsd/cxx/zc-istream.txx.orig 2013-07-10 11:00:23.000000000 +0100 +++ /usr/local/lib/libxsd/xsd/cxx/zc-istream.txx 2013-07-10 11:00:59.000000000 +0100 @@ -32,7 +32,7 @@ C* b (const_cast<C*> (str_.data ())); C* e (b + str_.size ()); - setg (b, b, e); + std::streambuf::setg (b, b, e); }
Get the source code
See
https://chaste.cs.ox.ac.uk/trac/wiki/ChasteGuides/AccessCodeRepository
Host Config
Use attachment:local.py (experimental) for your host config. Save it as python/hostconfig/local.py.
GOT TO HERE and cell_based works.
gfortran Don't need this as included in xcode
TODO: openmpi valgrind
Python XML tool support
Libraries needed by PyCml, the heart component and the Functional Curation bolt-on project.
# Note that Amara at version 2 is not suitable, so version 1.2 is forced. sudo easy_install https://pypi.python.org/packages/2.5/A/Amara/Amara-1.2.0.2-py2.5.egg sudo easy_install rdflib sudo easy_install lxml
More for the developer
Eclipse
- Download the Eclipse IDE for C++ developers (or a more appropriate file) from http://www.eclipse.org/downloads/
- Open the resulting tar file to produce a folder named "eclipse"
- Drag and drop the "eclipse" folder to "Applications" in FileFinder
- Open from Applications -> eclipse -> Eclipse
- (You might be prompted to install a Java runtime when you first run Eclipse)
- If you want to alias or add the path, the location is /Applications/eclipse/eclipse
Valgrind
Valgrind version 3.8.1 (not necessary, but useful to the serious developer)
brew install valgrind
Handy things
To be able to see the tmp folder in finder use
sudo chflags nohidden /tmp
Useful aliases to add to ~/.bash_profile
nano ~/.bash_profile
alias eclipse=/Applications/eclipse/eclipse alias cdchaste='cd /Users/chaste/eclipse/workspace/Chaste' #Or similar