Installation

You can pip install M3 in serial mode using PyPi via:

pip install mthree

Alternatively, one can install from source:

python setup.py install

To enable OpenMP one must have an OpenMP 3.0+ enabled compiler and install with:

python setup.py install --with-openmp

Optionally one can also set -march=native using:

python setup.py install --with-native

The openmp and native flags can be used simultaneously using a comma.

OpenMP on OSX

On OSX one must install LLVM using homebrew (You cannot use GCC):

brew install llvm

after which the following (or the like) must be executed in the terminal:

export PATH="/usr/local/opt/llvm/bin:$PATH"

and

export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include"

Then installation with openmp can be accomplished using:

CC=clang CXX=clang python setup.py install --with-openmp