From c673e9b3bff32c496f49dc9e275a642e0ff44197 Mon Sep 17 00:00:00 2001 From: Rich Townsend Date: Wed, 11 Feb 2026 13:56:09 -0600 Subject: [PATCH 1/7] Changed handling of math slots to work with SDK 26.2.2 approach of adding math-slots subdir to PKG_CONFIG_PATH --- make/setup-depends.mk | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/make/setup-depends.mk b/make/setup-depends.mk index e856312f3..e94e08839 100644 --- a/make/setup-depends.mk +++ b/make/setup-depends.mk @@ -2,17 +2,12 @@ INTERNAL_DEPENDS_ON := $(addprefix mesa-,$(INTERNAL_DEPENDS_ON)) include $(MAKE_DIR)/subdirs.mk -PKG_CONFIG_FLAGS = - ifneq ($(MESASDK_ROOT),) ifeq ($(WITH_CRLIBM),yes) - PKG_CONFIG_FLAGS += --define-variable=MATH_SLOT=crmath - MESASDK_MATH_SLOT = crmath + PKG_CONFIG_PATH := $(MESASDK_ROOT)/math-slots/crmath/lib/pkgconfig:$(PKG_CONFIG_PATH) else - PKG_CONFIG_FLAGS += --define-variable=MATH_SLOT=default - MESASDK_MATH_SLOT = default + PKG_CONFIG_PATH := $(MESASDK_ROOT)/math-slots/default/lib/pkgconfig:$(PKG_CONFIG_PATH) endif - export MESASDK_MATH_SLOT endif PKG_CONFIG_PATH := $(shell BUILD_DIR=$(BUILD_DIR_) $(MAKE_DIR)/gen-pkgconfig-path $(SUBDIRS)):$(PKG_CONFIG_PATH) @@ -20,7 +15,7 @@ export PKG_CONFIG_PATH define pkg-config-inner ifneq ($(2),) - TMP_VAR := $$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config $(PKG_CONFIG_FLAGS) $(1) $(2) || echo "failed") + TMP_VAR := $$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config $(1) $(2) || echo "failed") ifeq ($$(TMP_VAR),failed) $$(warning PKG_CONFIG_PATH is $$(PKG_CONFIG_PATH)) $$(error pkg-config failed to find some of $(2), check PKG_CONFIG_PATH is correct) From ddf40d24e7c23e10a72d657f2a483fd03e3d8453 Mon Sep 17 00:00:00 2001 From: Rich Townsend Date: Wed, 11 Feb 2026 13:57:00 -0600 Subject: [PATCH 2/7] Added blas to EXTERNAL_DEPENDS_ON --- gyre/Makefile | 2 +- mtx/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gyre/Makefile b/gyre/Makefile index fbec74fc8..4d513e8fc 100644 --- a/gyre/Makefile +++ b/gyre/Makefile @@ -8,7 +8,7 @@ ifeq ($(WITH_GYRE),yes) SRCS := SRCS_CHECK := test/src/test_gyre.f90 INTERNAL_DEPENDS_ON := forum const -EXTERNAL_DEPENDS_ON := hdf5_fortran lapack95 lapack +EXTERNAL_DEPENDS_ON := hdf5_fortran lapack95 lapack blas CHECK_RESULTS_GOLDEN := test/test_output CHECK_DIFF_PROG := ndiff -quiet -relerr 1.0e-6 BINTYPE := lib diff --git a/mtx/Makefile b/mtx/Makefile index b6bf23a07..ec98001e6 100644 --- a/mtx/Makefile +++ b/mtx/Makefile @@ -16,7 +16,7 @@ SRCS_CHECK := test/src/test_mtx.f90 \ test/src/test_block_tridiagonal.f90 # TODO: Also contains test dependencies sadly, I should fix this at some point INTERNAL_DEPENDS_ON := const utils math -EXTERNAL_DEPENDS_ON := lapack +EXTERNAL_DEPENDS_ON := lapack blas BINTYPE := lib # Testing From b3c972010341f9a4f166be2973bd0a4148573362 Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Thu, 12 Feb 2026 17:07:54 +0100 Subject: [PATCH 3/7] mtx: fix undefined behaviour in `b` pivot swaps The omp simd directive assumes that all loop iterations are independent. This is not the case for swapping elements of a single row/column. Hence, this causes UB. --- mtx/public/mtx_solve_routines.inc | 3 --- 1 file changed, 3 deletions(-) diff --git a/mtx/public/mtx_solve_routines.inc b/mtx/public/mtx_solve_routines.inc index a3138bfac..736220990 100644 --- a/mtx/public/mtx_solve_routines.inc +++ b/mtx/public/mtx_solve_routines.inc @@ -215,7 +215,6 @@ real(dp) :: temp integer :: i, k info = 0 - !$omp simd private(temp) do i = 1,n temp = b(i) b(i) = b(ipiv(i)) @@ -251,7 +250,6 @@ real(dp) :: temp integer :: i, k info = 0 - !$omp simd private(temp) do i = 1,n temp = b(i) b(i) = b(ipiv(i)) @@ -287,7 +285,6 @@ real(dp) :: temp integer :: i, k info = 0 - !$omp simd private(temp) do i = 1,n temp = b(i) b(i) = b(ipiv(i)) From 7550366306f047fe53e680f58a96c6f2ee5b42e2 Mon Sep 17 00:00:00 2001 From: Rich Townsend Date: Fri, 6 Mar 2026 08:50:53 -0600 Subject: [PATCH 4/7] Tweaked pkgconfig invocation to align with latest SDK --- make/setup-depends.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/make/setup-depends.mk b/make/setup-depends.mk index e94e08839..a2c9b8781 100644 --- a/make/setup-depends.mk +++ b/make/setup-depends.mk @@ -4,9 +4,11 @@ include $(MAKE_DIR)/subdirs.mk ifneq ($(MESASDK_ROOT),) ifeq ($(WITH_CRLIBM),yes) - PKG_CONFIG_PATH := $(MESASDK_ROOT)/math-slots/crmath/lib/pkgconfig:$(PKG_CONFIG_PATH) + PKG_CONFIG_FLAGS += --define-variable=math_slot=crmath + MESASDK_MATH_SLOT = crmath else - PKG_CONFIG_PATH := $(MESASDK_ROOT)/math-slots/default/lib/pkgconfig:$(PKG_CONFIG_PATH) + PKG_CONFIG_FLAGS += --define-variable=math_slot=default + MESASDK_MATH_SLOT = default endif endif From addc58b702239727ab21a85bde522b2fcbd9221f Mon Sep 17 00:00:00 2001 From: Rich Townsend Date: Fri, 6 Mar 2026 09:50:08 -0600 Subject: [PATCH 5/7] Added missing flags for pkgconfig --- make/setup-depends.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/make/setup-depends.mk b/make/setup-depends.mk index a2c9b8781..37c6bf4f2 100644 --- a/make/setup-depends.mk +++ b/make/setup-depends.mk @@ -2,13 +2,13 @@ INTERNAL_DEPENDS_ON := $(addprefix mesa-,$(INTERNAL_DEPENDS_ON)) include $(MAKE_DIR)/subdirs.mk +PKG_CONFIG_FLAGS = + ifneq ($(MESASDK_ROOT),) ifeq ($(WITH_CRLIBM),yes) PKG_CONFIG_FLAGS += --define-variable=math_slot=crmath - MESASDK_MATH_SLOT = crmath else PKG_CONFIG_FLAGS += --define-variable=math_slot=default - MESASDK_MATH_SLOT = default endif endif @@ -17,7 +17,7 @@ export PKG_CONFIG_PATH define pkg-config-inner ifneq ($(2),) - TMP_VAR := $$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config $(1) $(2) || echo "failed") + TMP_VAR := $$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config $(PKG_CONFIG_FLAGS) $(1) $(2) || echo "failed") ifeq ($$(TMP_VAR),failed) $$(warning PKG_CONFIG_PATH is $$(PKG_CONFIG_PATH)) $$(error pkg-config failed to find some of $(2), check PKG_CONFIG_PATH is correct) From 2ab252c32e5ce5ad871f478df2bdc83cda530c4e Mon Sep 17 00:00:00 2001 From: Rich Townsend Date: Wed, 25 Mar 2026 14:54:33 -0500 Subject: [PATCH 6/7] Updated github actions --- .github/actions/install-mesa/action.yml | 16 ++++++++-------- .github/workflows/build.yml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/install-mesa/action.yml b/.github/actions/install-mesa/action.yml index 49937fba7..37cb27dec 100644 --- a/.github/actions/install-mesa/action.yml +++ b/.github/actions/install-mesa/action.yml @@ -7,7 +7,7 @@ inputs: sdk: description: 'The version of the MESA SDK to install' required: false - default: '25.12.1' + default: '26.3.2' runs: @@ -60,10 +60,10 @@ runs: mesasdk-x86_64-linux-${{inputs.sdk}}.tar.gz key: ${{ runner.os }}-${{inputs.sdk}} - - name: Get SDK ${{ runner.os }} '25.12.1' - if: ${{ (steps.cache.outputs.cache-hit != 'true') && ( inputs.sdk == '25.12.1') && (runner.os == 'Linux') }} + - name: Get SDK ${{ runner.os }} '26.3.2' + if: ${{ (steps.cache.outputs.cache-hit != 'true') && ( inputs.sdk == '26.3.2') && (runner.os == 'Linux') }} run: | - wget -q https://zenodo.org/records/18163992/files/mesasdk-x86_64-linux-25.12.1.tar.gz + wget -q https://zenodo.org/records/19210930/files/mesasdk-x86_64-linux-26.3.2.tar.gz shell: bash - name: Unpack SDK ${{ runner.os }} ${{inputs.sdk}} @@ -72,16 +72,16 @@ runs: tar xvf mesasdk-x86_64-linux-${{inputs.sdk}}.tar.gz shell: bash - - name: Get SDK ${{ runner.os }} '25.12.1' - if: ${{ (steps.cache.outputs.cache-hit != 'true') && ( inputs.sdk == '25.12.1') && (runner.os == 'macOS') }} + - name: Get SDK ${{ runner.os }} '26.3.2' + if: ${{ (steps.cache.outputs.cache-hit != 'true') && ( inputs.sdk == '26.3.2') && (runner.os == 'macOS') }} run: | - wget --user-agent="" -q http://user.astro.wisc.edu/~townsend/resource/download/mesasdk/mesasdk-aarch64-macos-25.12.1.pkg + wget -q https://zenodo.org/records/19210744/files/mesasdk-aarch64-macos-26.3.2.pkg shell: bash - name: Unpack SDK ${{ runner.os }} ${{inputs.sdk}} if: runner.os == 'macOS' run: | - sudo installer -pkg mesasdk-aarch64-macos-25.12.1.pkg -target / + sudo installer -pkg mesasdk-aarch64-macos-26.3.2.pkg -target / ln -s /Applications/mesasdk mesasdk shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46f388edf..6b7471b87 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: ["25.12.1"] # pick 2 or 3 most recent. + sdk: ["26.3.2"] # pick 2 or 3 most recent. os: [ubuntu-latest, macos-latest] dynamic: ["yes", "no"] runs-on: ${{ matrix.os }} From 3714d736089a498ff5a3c34c6f831dc316f6f892 Mon Sep 17 00:00:00 2001 From: Rich Townsend Date: Wed, 25 Mar 2026 15:20:53 -0500 Subject: [PATCH 7/7] Added symlink for linux installs --- .github/actions/install-mesa/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/install-mesa/action.yml b/.github/actions/install-mesa/action.yml index 37cb27dec..ca2b3caab 100644 --- a/.github/actions/install-mesa/action.yml +++ b/.github/actions/install-mesa/action.yml @@ -70,6 +70,7 @@ runs: if: runner.os == 'Linux' run: | tar xvf mesasdk-x86_64-linux-${{inputs.sdk}}.tar.gz + ln -s mesasdk-${{inputs.sdk}} mesasdk shell: bash - name: Get SDK ${{ runner.os }} '26.3.2'