These are some pretty bare-bones installation notes for MacOS. We rely on the
homebrew package manager to install most of the compiled packages and we use
pip to install our python dependencies.
Everything other than installation of Xcode requires access to the terminal.
1) Install/Update Xcode
(From app store)
Run it once to accept the licence, then quit
2) Install/Update homebrew
If this is a machine that is being upgraded from a previous major release of the OS then it is safest to start afresh with the homebrew packages as it seems difficult to ensure that all of the dependencies are properly managed across the upgrade.
If this is a brand new machine or a clean installation of the OS, note, that
/usr/local does not exist on a new machine and it can be tricky to create it. The details are here on the homebrew github page and we recommend checking them carefully since things are likely to change. You may need to revisit these instructions after each system-software update.
To install homebrew into
Now, to check if there is anything on the system than needs fixing before moving on to install packages, run:
3) Install dependencies via homebrew
You probably need to run
and then install the following packages
(Some of these have many dependencies of their own so this can take several minutes )
4) Install python dependencies via pip
5) Obtain u/w source
The installation path for underworld is not especially important but you can specify it explicitly at this stage:
6) Configure & Build
Set the environment variables for PETSC.
brew info PETSC will tell you the value required for
$PETSC_DIR. Use this value since the version in
/usr/local/opt is incomplete.
The following may be necessary:
Then the actual compilation and python linking
There will be many warnings
7) Did it work ?
Go back to the underworld directory
Fire up ipython and see if it works
You should see in response:
Toolbox "StgDomain" found using ... Toolbox "StgFEM" found using ... Toolbox "PICellerator" found using ... Toolbox "Underworld" found using ... Toolbox "gLucifer" found using ... Toolbox "Solvers" found using ... Help on package underworld.mesh in underworld: NAME underworld.mesh - Implementation relating to meshing. FILE /Users/lmoresi/+Codes/underworld2-gitology/underworld/mesh/__init__.py PACKAGE CONTENTS _mesh _specialSets_Cartesian
The paths on your system to the various toolboxes will be spat out in the preamble text “
found using ... ”