diff --git a/Install.md b/Install.md index 9ebaa7fa..55989225 100644 --- a/Install.md +++ b/Install.md @@ -1,7 +1,8 @@ This guide is for building SDPB. To just run SDPB, it may be easier to use [Docker](docs/Docker.md) or [Singularity](docs/Singularity.md). In addition, there are [site specific -notes](docs/site_installs/Readme.md) for different HPC machines. +notes](docs/site_installs/Readme.md) for different HPC machines and also +for [Apple MacBooks](docs/site_installs/Apple_MacBook.md). * [Requirements](#requirements) * [Installation](#installation) diff --git a/docs/site_installs/Apple_MacBook.md b/docs/site_installs/Apple_MacBook.md new file mode 100644 index 00000000..73db5add --- /dev/null +++ b/docs/site_installs/Apple_MacBook.md @@ -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 ` (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. \ No newline at end of file diff --git a/docs/site_installs/Readme.md b/docs/site_installs/Readme.md index df014873..57125b30 100644 --- a/docs/site_installs/Readme.md +++ b/docs/site_installs/Readme.md @@ -1,5 +1,7 @@ The *.org and *.md files in this directory contain notes on building and -running SDPB on various HPC machines. Most of the systems use +running SDPB on various HPC machines, as well as [Apple MacBooks](Apple_MacBook). + +Most of the HPC systems use modules, so there is typically a module invocation like module load gcc/8.3.0 openmpi/3.1.4 openblas/0.3.6