Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Apple Silicon docs #6038

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
nilsvu marked this conversation as resolved.
Show resolved Hide resolved
```
Loading