Cytnx
Cytnx copied to clipboard
gcc+openblas on MacOS (intel)
To build from source, using gcc and openblas on MacOS (intel).
- Install homebrew
- Use homebrew to install following packages
brew install gcc openblas lapack boost pybind11
Note
The openblas package does not provide lapacke.h. You have to install lapack package, which provide lapacke.h.
Note Because homebrew installations of openblas/lapack are ot symbolic linked into /usr/local. One way to fix this is to
cd /usr/local/lib
ln -s ../Cellar/openblas/0.3.20/lib/libopenblas.dylib
cd /usr/local/include
ln -s ../../Cellar/lapack/3.10.0/include/lapack*
Then
mkdir -p build
cd build
cmake -DCMAKE_C_COMPILER=/usr/local/bin/gcc-11 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-11 ..