macOS: enable Accelerate ILP64 through Apple's new interface - #198
Merged
Conversation
BLAS++ and LAPACK++ merged new-Accelerate support on 2026-08-27 (icl-utk-edu/blaspp#134, icl-utk-edu/lapackpp#88). Requesting int64 with the new interface defines ACCELERATE_LAPACK_ILP64, so the width is real and verifiable through the generated defines.h, like MKL. - Advance the BLAS++/LAPACK++ pins past the merges, in install.sh and the Windows CI provisioner. - install.sh: stop refusing --blas-int=ilp64 with Accelerate. The width default (ilp64 where available) now applies to Accelerate too; on macOS older than 13.3 the int64 probe fails, so auto falls back to LP64 with the usual warning and an explicit ilp64 request fails the BLAS++ configure rather than silently downgrading. - core CI: the macOS Accelerate lanes build blaspp with blas_int=int64 and hard-fail if defines.h lacks ACCELERATE_NEW_LAPACK or BLAS_ILP64, so a silent fall-back to the legacy interface cannot go unnoticed. Dependency cache keys bumped (the old caches hold LP64 builds). - install-script CI: the macOS lane asserts the default resolves to accelerate + ILP64; the old ILP64-refusal test becomes an explicit --blas-int=lp64 leg so the 32-bit width stays exercised. - INSTALL.md: tested-configuration and width tables updated. Closes #189. Closes #150. Verified on Linux/MKL against the new pins: full installer run end to end, then 504/504 tests.
5 tasks
rileyjmurray
requested changes
Aug 27, 2026
rileyjmurray
left a comment
Contributor
There was a problem hiding this comment.
While we're here, please rename the install folder to installers. Update references to that folder wherever appropriate (readme? install.md? web docs?).
Other than that, looks good.
References updated in INSTALL.md, the install-script workflow, the Windows provisioning comments, and the script's own usage text.
Contributor
Author
|
Renamed in |
rileyjmurray
approved these changes
Aug 27, 2026
Contributor
|
We can merge once CI passes |
mmelnich
added a commit
to BallisticLA/RandLAPACK
that referenced
this pull request
Aug 27, 2026
…#172) ## Summary Follow-up to #155, which retired the legacy-Accelerate accommodations in the library and CI. This PR does the installer half: with new-Accelerate support merged upstream on 2026-08-27 ([icl-utk-edu/blaspp#134](icl-utk-edu/blaspp#134), [icl-utk-edu/lapackpp#88](icl-utk-edu/lapackpp#88)), the reasons macOS defaulted to Homebrew OpenBLAS — the legacy `gesdd` bug, the missing routines, the missing ILP64 — are gone. The default macOS build now uses Accelerate through Apple's new interface and needs no Homebrew BLAS. (ILP64 turned out to be blocked upstream — see below.) Closes #165 except its ILP64 item, which is split into #173: this PR's own install-macos lane discovered that LAPACK++ does not compile against Accelerate ILP64 (`lapack_int` becomes Apple's `long` while the wrappers assume `int64_t`; filed upstream as icl-utk-edu/lapackpp#89). Accelerate is therefore constrained to LP64 for now — the same width the old OpenBLAS default produced on macOS, so nothing regresses. RandBLAS mirror: BallisticLA/RandBLAS#198 (unaffected: RandBLAS does not need LAPACK++, and its Accelerate ILP64 lanes are green). ## Changes - **Pins**: `installers/install.sh` and `.github/actions/setup-randlapack-deps-windows/setup.ps1` advance BLAS++ to `2d8d4e9` (the #134 merge) and LAPACK++ to `b9439cf` (the #88 merge). - **Backend default**: `--blas=auto` on macOS resolves to `accelerate` (previously `openblas`). `--blas=openblas` remains fully supported. - **Correctness guard**: a build in which BLAS++ silently fell back to Apple's LEGACY interface is refused immediately after the BLAS++ build, by checking the generated `defines.h` for `ACCELERATE_NEW_LAPACK` — the legacy `gesdd` computes wrong singular values, so this must be a hard error, not a warning. The numerical `gesdd` conftest stays as the second net. On macOS < 13.3 the error message points at `--blas=openblas`. - **Width**: the gesdd warning is removed. Accelerate stays LP64 for now, and an explicit `--blas-int=ilp64` is refused with a message citing icl-utk-edu/lapackpp#89 / #173 (previously the refusal cited the long-gone interface gap). - **Portability fix found by this PR's CI**: macOS ships bash 3.2, where expanding an empty array under `set -u` is an "unbound variable" error; with the old OpenBLAS default the affected arrays were never empty on macOS, so the default flip exposed it (it was already reachable with an explicit `--blas=accelerate` or `--blas=mkl` on any Mac). All possibly-empty array expansions now use the bash-3.2-safe guard, and the install-script lanes print `install.log` on failure so errors of this class are never silent again. - **install-script CI (macOS)**: the default lane deliberately does NOT `brew install openblas` anymore, and asserts the summary reports `accelerate, LP64`; a new explicit `--blas=openblas` leg (with its own project dir and test-suite run) keeps that route exercised. - **Rename, mirroring the review on BallisticLA/RandBLAS#198**: the `install/` folder is now `installers/`. The root `install.sh` wrapper keeps working (`bash install.sh` unchanged for users) and now execs `installers/install.sh`; references updated in INSTALL.md, INSTALL_SCRIPT.md, INSTALL_WINDOWS.md, docs/CI.md, the install-script workflow, and the Windows guard scripts. - **Docs**: INSTALL.md, INSTALL_SCRIPT.md (§6.1 table, §6.2 width table, §6.4 rewritten), docs/CI.md.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BLAS++ and LAPACK++ merged new-Apple-Accelerate support on 2026-08-27 (icl-utk-edu/blaspp#134, icl-utk-edu/lapackpp#88). With the new interface, requesting
blas_int=int64definesACCELERATE_LAPACK_ILP64(in BLAS++'sinclude/blas/config.h), so on macOS >= 13.3 the ILP64 width is real and verifiable through the generateddefines.h, exactly like MKL. This PR lifts RandBLAS's macOS ILP64 restriction and puts the new interface under CI.Closes #189. Closes #150.
Changes
installers/install.shand the Windows CI provisioner advance BLAS++ to2d8d4e9(the Argument handling forprint_buff_to_stream#134 merge) and LAPACK++ tob9439cf(the Add learning resources for people new to C++ #88 merge).--blas-int=ilp64+ Accelerate refusal is gone. The standard width policy (prefer ILP64 where the backend provides it) now covers Accelerate:autoresolves to ILP64 on macOS >= 13.3, falls back to LP64 with the usual warning on older macOS, and an explicitilp64request fails the BLAS++ configure there rather than silently downgrading.-Dblas_int=int64(mirroring the MKL treatment) and hard-fail if the installeddefines.hlacksACCELERATE_NEW_LAPACKorBLAS_ILP64, so a silent fall-back to the legacy interface cannot masquerade as coverage. Dependency cache keys are bumped because existing caches hold LP64 legacy-interface builds. Note these lanes clone blaspp/lapackpp HEAD by design, so they pick the new interface up immediately.accelerate, ILP64; the old "ILP64 is refused" test becomes an explicit--blas-int=lp64install + test-suite run, so the 32-bit width on Accelerate stays exercised now that no lane hits it by default.install/folder is nowinstallers/, with references updated in INSTALL.md, the install-script workflow, the Windows provisioning comments, and the script's own usage text (the web docs and README carry no references to the folder). RandLAPACK gets the same rename on macOS: default the installer to Accelerate (new interface) with ILP64 RandLAPACK#172 so the two repos stay symmetric.