Skip to content

SetupTasksOsxMavericks

Sebastian Schmieschek edited this page Aug 12, 2015 · 5 revisions

= HemeLB setup on OS X Mavericks=

It's probably easiest to first install Homebrew and then Canopy.

General

Homebrew

Go to http://brew.sh and follow the instructions.

Canopy

You want the Academic, 64 bit version. Go to https://enthought.com/products/canopy/academic/ and register with an academic email address. Then download the installer.

Note that you may prefer to do a system-wide install rather than in your home directory only. See: http://docs.enthought.com/canopy/configure/canopy-cli.html

Mercurial

Not included in OS X by default.

brew install mercurial

CMake

See [CMake] for details.

brew install cmake

Tools

If using Canopy, ensure that you use the Canopy package manager to install quantities.

Setup Tool

CGAL

Install via homebrew

brew install cgal

Install VMTK

You may be able to build it yourself as in the generic notes and the Mountain Lion notes.

For VMTK 1.2, you can use the binary egg as follows:

  1. Set up a new virtual environment and activate it

    SETUPTOOL_ROOT=~/sw/setuptool /Applications/Canopy.app/Contents/MacOS/Canopy_cli venv -s $SETUPTOOL_ROOT source $SETUPTOOL_ROOT/bin/activate

  2. Install necessary packages

    enpkg wxPython readline swig Cython

  3. Download the binary egg from http://www.vmtk.org/download/ and install it with

    easy_install ~/Downloads/vmtk-1.2-py2.7-macosx-10.9-intel.egg

  4. Find the package directory with

    python -c 'import pkg_resources; print pkg_resources.get_distribution("vmtk").location'

  5. Edit the venv activate script to set VMTK environment variables. Add at the end

    VMTK

    export VMTKHOME= export PATH=$VMTKHOME/vmtk/bin:$PATH export DYLD_LIBRARY_PATH=$VMTKHOME/vmtk/lib:$DYLD_LIBRARY_PATH export PYTHONPATH=$VMTKHOME/vmtk/lib:$VMTKHOME/vmtk:$PYTHONPATH

  6. Deactivate and reactivate the venv.

  7. We now need to fix the linking, because it's wrong. a. Figure out old, wrong python library path:

    cd $VMTKHOME/vmtk/lib otool -L vtkCommonPython.so Now look for the line that links to the system python framework. Store in a variable. For me this is

    old_py=/System/Library/Frameworks/Python.framework/Versions/2.7/Python a. Figure out the new library.

    otool -L which python Find the python library, usually ending either "Python" or "libpython.dylib". For me this was

    new_py=@rpath/Python a. Change the linking of all the VMTK and VTK libraries. Don't worry - if the old path isn't in the library, install_name_tool won't do anything.

    cd $VMTKHOME/vmtk/lib for lib in *; do install_name_tool -change $old_py $new_py $lib; done

  8. Check it works! a. VTK and WX:

    cd ~ python -m vtk.wx.wxVTKRenderWindowInteractor This should pop up a window with a cone in it, that you can turn around. Exit with 'q' b. VMTK

    cd $HEMELB/../RegressionTests/diffTest gunzip -k cyl.stl.gz vmtksurfaceviewer -ifile cyl.stl This should open a window with a cylinder in it. Exit with 'q'.

Setuptool

See the generic instructions

HemeLB

Install MPI

OS X no longer comes with an MPI

brew install open-mpi

Optional dependencies

The HemeLB master CMake file is able to install these but it may be easier to use brew.

brew install ctemplate
brew install cppunit
brew install tinyxml
brew install boost

If you want to install ParMETIS this way, then you must "tap" the science Homebrew repo first, if you haven't already:

brew tap homebrew/science
brew install parmetis
Clone this wiki locally