-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MacBook Air M2 installation instructions to site_installs/Apple_M…
…acBook.md
- Loading branch information
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Apple MacBook Air M2 | ||
|
||
Chip: Apple M2 | ||
macOS: Ventura 13.6 | ||
|
||
# Build SDPB from sources | ||
|
||
## Homebrew packages | ||
|
||
If you don't have Homebrew package manager, install it following official instructions from https://brew.sh/. Add brew | ||
to path following instructions shown after installing. | ||
|
||
Then you can install packages required for SDPB: | ||
|
||
brew install gmp mpfr boost rapidjson libarchive openblas cmake open-mpi | ||
|
||
You can see installation directory and another information for a package (e.g. `boost`) | ||
by calling `brew info <package>` (e.g. `brew info boost`). | ||
|
||
## Python 2 | ||
|
||
If Python 2 is missing, install it using macOS installer from https://www.python.org/downloads/release/python-2718/ | ||
|
||
You may try to skip this step, but note that waf fails with `bunzip2: Data integrity error when decompressing` when | ||
using default Python 3, at least on some laptops. | ||
|
||
## Elemental | ||
|
||
git clone https://gitlab.com/bootstrapcollaboration/elemental.git | ||
cd elemental | ||
mkdir build | ||
cd build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/install -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc | ||
make && make install | ||
cd ../.. | ||
|
||
## sdpb | ||
|
||
git clone https://github.com/davidsd/sdpb.git | ||
cd sdpb | ||
CXXFLAGS="${CXXFLAGS} -arch arm64" LDFLAGS="${LDFLAGS} -arch arm64" ./waf configure --elemental-dir=$HOME/install --boost-dir=/opt/homebrew/opt/boost/ --gmpxx-dir=/opt/homebrew/Cellar/gmp/6.3.0/ --mpfr-dir=/opt/homebrew/Cellar/mpfr/4.2.1/ --rapidjson-dir=/opt/homebrew/Cellar/rapidjson/1.1.0 --libarchive-dir=/opt/homebrew/Cellar/libarchive/3.7.2/ --prefix=$HOME/install/sdpb-master | ||
./waf # build binaries | ||
./build/sdpb --help # run SDPB binary | ||
./test/run_all_tests.sh # run tests to check correctness | ||
./waf install # install sdpb to --prefix=$HOME/install/sdpb-master | ||
|
||
If waf fails to find some package, e.g. `boost`, check the installation directory by calling, e.g. `brew info boost` and | ||
update `--boost-dir` argument above. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters