We have added support for building mVMC on macOS using Homebrew GCC, without requiring BLIS as an external dependency.
For actual implementations, see PR
#80
What's changed
New: config/mac_gcc.cmake
A CMake configuration file for macOS + Homebrew GCC that:
- Auto-detects the latest Homebrew GCC via
brew --prefix gcc, so you don't need to hardcode a specific GCC version (e.g., gcc-14, gcc-15).
- Disables
USE_GEMMT (OFF) to build without BLIS. The reference implementations of dskr2k/zskr2k are used instead.
Build system fixes
CMakeLists.txt: Updated cmake_minimum_required to version range syntax (3.5...3.10) and added CMAKE_POLICY_VERSION_MINIMUM for compatibility with CMake 4.0 and later.
src/ltl2inv/CMakeLists.txt: Made blalink_gemmt.c conditional on USE_GEMMT. This file depends on BLIS symbols (bli_*gemmt) and previously caused link errors when BLIS was not available.
src/mVMC/CMakeLists.txt: Removed redundant cmake_minimum_required from the subdirectory to avoid CMake policy warnings.
Prerequisites
Install GCC and required libraries via Homebrew:
brew install gcc cmake open-mpi
How to build
mkdir build && cd build
cmake -DCONFIG=mac_gcc ..
make -j$(sysctl -n hw.logicalcpu)
The binaries (vmc.out, vmcdry.out) will be built in build/src/mVMC/.
Notes
-
Why no BLIS? Building BLIS on macOS (especially on Apple Silicon) is difficult due to platform-specific issues. This configuration bypasses BLIS entirely by setting USE_GEMMT=OFF, falling back to the reference implementations of dskr2k/zskr2k. If BLIS support on macOS improves in the future, it can be re-enabled.
-
This configuration uses the system BLAS/LAPACK found by CMake's find_package(LAPACK). On macOS, this typically resolves to Apple's Accelerate framework.
-
If you prefer to use OpenBLAS, you can add the following to config/mac_gcc.cmake:
set(BLA_VENDOR OpenBLAS CACHE STRING "BLAS vendor" FORCE)
-
PFAFFIAN_BLOCKED is not enabled by default. Enabling it requires BLIS.
Feedback
Comments, bug reports, and feature requests are welcome. Please feel free to open an issue or leave a comment.
We have added support for building mVMC on macOS using Homebrew GCC, without requiring BLIS as an external dependency.
For actual implementations, see PR
#80
What's changed
New:
config/mac_gcc.cmakeA CMake configuration file for macOS + Homebrew GCC that:
brew --prefix gcc, so you don't need to hardcode a specific GCC version (e.g.,gcc-14,gcc-15).USE_GEMMT(OFF) to build without BLIS. The reference implementations ofdskr2k/zskr2kare used instead.Build system fixes
CMakeLists.txt: Updatedcmake_minimum_requiredto version range syntax (3.5...3.10) and addedCMAKE_POLICY_VERSION_MINIMUMfor compatibility with CMake 4.0 and later.src/ltl2inv/CMakeLists.txt: Madeblalink_gemmt.cconditional onUSE_GEMMT. This file depends on BLIS symbols (bli_*gemmt) and previously caused link errors when BLIS was not available.src/mVMC/CMakeLists.txt: Removed redundantcmake_minimum_requiredfrom the subdirectory to avoid CMake policy warnings.Prerequisites
Install GCC and required libraries via Homebrew:
How to build
The binaries (
vmc.out,vmcdry.out) will be built inbuild/src/mVMC/.Notes
Why no BLIS? Building BLIS on macOS (especially on Apple Silicon) is difficult due to platform-specific issues. This configuration bypasses BLIS entirely by setting
USE_GEMMT=OFF, falling back to the reference implementations ofdskr2k/zskr2k. If BLIS support on macOS improves in the future, it can be re-enabled.This configuration uses the system BLAS/LAPACK found by CMake's
find_package(LAPACK). On macOS, this typically resolves to Apple's Accelerate framework.If you prefer to use OpenBLAS, you can add the following to
config/mac_gcc.cmake:PFAFFIAN_BLOCKEDis not enabled by default. Enabling it requires BLIS.Feedback
Comments, bug reports, and feature requests are welcome. Please feel free to open an issue or leave a comment.