Compiling code in ARM based MacOS - geomechanics/mpm GitHub Wiki
Download and Installation
In order to obtain the source code, you will need to clone the repository using git. You need to install homebrew if you don't already have it, then you can install git through the following command:
brew install git
Once git is installed you can clone the code by using this command in a terminal:
git clone https://github.com/geomechanics/mpm.git mpm
Alternatively, one can go to our GitHub, click the green "Code" button, and "Download ZIP" to manually download the compressed .zip
folder.
Compile
-
Go to the downloaded mpm folder and run
mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=g++ -DOpenMP_CXX_FLAGS=-fopenmp=lomp -DOpenMP_CXX_LIB_NAMES="libomp" -DNO_KAHIP=True ..
-
Run
make clean && make -jN
(where N is the number of cores).
Compile mpm or mpmtests
To compile either mpm
, mpmtest_unit
, or mpmtest_small
alone, run make mpm -jN
, make mpmtest_unit -jN
, make mpmtest_small -jN
(where N is the number of cores).