Skip to content

Enable ARM macOS runner, fixes for SCOTCH allocation and PETSc detection on macOS

Dave Moxey requested to merge feature/macos-arm into master

Issue/feature addressed

This MR enables a macOS ARM-based M1 runner. It also addresses two macOS-related issues with Scotch graph allocation and PETSc detection.

Proposed solution

Most of the work in this branch has been in setting up the runner itself. However two regressions were identified. Firstly, SCOTCH_Graph behaviour seems to be different in newer versions of Scotch. Secondly, PETSc detection recently moved to use pkg-config in !1454 (merged), but when the library is not in the main linker path, linking fails.


Scotch graph allocation now uses the SCOTCH_graphAlloc function in SubStructuredGraph.cpp:

SCOTCH_graphAlloc *scGraph = SCOTCH_graphAlloc();

PETSc detection now uses the PETSC_LINK_LIBRARIES variable, if available:

        # Prefer to use absolute paths to avoid separate link directories on
        # some platforms (e.g. macOS). However not available in all CMake
        # versions.


No new tests, but macOS runner now enabled.

Suggested reviewers

@ccantwel @mgreen


@mgreen I think this is the thing that was causing runtime errors for you, might be worth checking this now works for you.


  • [ ] Functions and classes, or changes to them, are documented.
  • [ ] User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • [ ] License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Dave Moxey

Merge request reports