[Note: this carries forward an mpi version specification we made to fix runaway CPU usage in idle notebooks. This may not be necessary but is probably not harmful]

The 2017 releases of MacOS brings a new suite of compilers: homebrew binaries and any python packages involving C / Fortran will need to be rebuilt.

We recommend building the core dependencies using petsc which ensures that only compatible versions are used. This also ensures that we can use the compatible petsc version specified by underworld2 and appropriate (tested) versions of the extension packages.

When upgrading, we always recommend purging homebrew altogether.

On a new machine, installing as follows:

A non-system python installation, libxml2, and swig are the only homebrew requirements, but you might also make sure that you have wget to grab a compatible version of petsc. The gcc requirement is to allow fortran dependencies to be installed. This takes a while but is worth having for later !

There are a number of python dependencies which we install via pip. If upgrading, these packages should be uninstalled and reinstalled. Note: cython is required for petsc4py which is not an underworld dependency but is

We currently test against petsc-3.7.7 and we support 3.5.x, 3.6.x. You can install anywhere, but the following instructions assume /usr/local/src, change as necessary If you need petsc-3.8.x, you will need to access the development branch where we are currently testing compatibility.

You should set the following environment variables

The following is a relatively bare-bones configuration for petsc that should work with all the example notebooks we provide. From the \$PETSC_DIR run the configure script and make. Note, we specify a particular version of open-mpi here because the default that is otherwise installed appears to have some problems (idle notebooks run at full CPU load).

To ensure that we use the compatible packages installed by petsc and by homebrew, set the following

Obtain the underworld source code from github The installation path for underworld is not especially important but you can specify it explicitly at this stage. Your python path will need to include this directory explicitly so that you can import the underworld modules.

The build process for underworld has been simplified slightly from earlier versions

Assuming that works flawlessly