Skip to content

Commit

Permalink
Update Apple Silicon docs
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey4444 committed Jun 2, 2024
1 parent 5249913 commit 793b40e
Showing 1 changed file with 12 additions and 27 deletions.
39 changes: 12 additions & 27 deletions docs/Installation/InstallationOnAppleSilicon.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export SPECTRE_HOME=$(pwd)
export SPECTRE_DEPS_ROOT=$HOME/apps
mkdir $SPECTRE_DEPS_ROOT
cd $SPECTRE_DEPS_ROOT
mkdir src
cd src
```

### 2. Install python dependencies
Expand Down Expand Up @@ -73,7 +71,7 @@ following the instructions on the [homebrew](https://brew.sh) homepage. Then,
run the following to install a fortran compiler and other dependencies:
```
brew install gcc
brew install boost gsl cmake doxygen catch2
brew install boost gsl cmake doxygen catch2 openblas
brew install ccache autoconf automake jemalloc hdf5 pybind11 yaml-cpp
```

Expand All @@ -99,36 +97,21 @@ tar -xf blaze-3.8.tar.gz
mv blaze-3.8 include
popd
git clone https://github.com/edouarda/brigand.git
# Need master branch of libxsmm to support Apple Silicon
git clone https://github.com/hfp/libxsmm.git
pushd libxsmm
make
popd
pushd ./src
git clone https://github.com/Libsharp/libsharp.git
cd libsharp
# Do not use compiler flag -march=native (unsupported on Apple Silicon)
sed "s/-march=native//" configure.ac > configure.ac.mod
mv configure.ac.mod configure.ac
autoupdate
autoconf
./configure
make
mv auto $SPECTRE_DEPS_ROOT/libsharp
popd
```

Next, clone, patch, and install charm++ v7.0.0.
```
git clone https://github.com/UIUC-PPL/charm
pushd charm
git checkout v7.0.0
./build LIBS multicore-darwin-arm8 --with-production -g3 -j
git apply $SPECTRE_HOME/support/charm/v7.0.0.patch
./build LIBS multicore-darwin-arm8 --with-production -g3 -j \
--without-romio --build-shared
popd
```

Expand All @@ -149,10 +132,8 @@ spack external find python
# Install dependencies
spack install \
blaze@3.8.2 \
brigand@master \
charmpp@7.0.0: backend=multicore \
charmpp@7.0.0: +shared backend=multicore \
libxsmm@main \
libsharp~mpi~openmp
```

### 5. Configure and build SpECTRE
Expand All @@ -174,14 +155,12 @@ cmake \
-D CMAKE_CXX_COMPILER=clang++ \
-D CMAKE_Fortran_COMPILER=gfortran \
-D CMAKE_BUILD_TYPE=Debug \
-D BUILD_SHARED_LIBS=OFF \
-D BUILD_SHARED_LIBS=ON \
-D MEMORY_ALLOCATOR=SYSTEM \
-D CHARM_ROOT=${SPECTRE_DEPS_ROOT}/charm/multicore-darwin-arm8 \
-D SPECTRE_TEST_TIMEOUT_FACTOR=5 \
-D LIBXSMM_ROOT=${SPECTRE_DEPS_ROOT}/libxsmm/ \
-D BLAZE_ROOT=${SPECTRE_DEPS_ROOT}/blaze/ \
-D BRIGAND_ROOT=${SPECTRE_DEPS_ROOT}/brigand/ \
-D LIBSHARP_ROOT=${SPECTRE_DEPS_ROOT}/libsharp/ \
..
```

Expand All @@ -191,3 +170,9 @@ make -j10 unit-tests
make -j10 test-executables
ctest --output-on-failure -j10
```

Optionally, to install the python bindings in your python environment,
```
make all-pybindings
pip install -e ${SPECTRE_HOME}/build/bin/python
```

0 comments on commit 793b40e

Please sign in to comment.