From c9094855da0a0d8a4c746df4fd280364cc6c2469 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:26:55 +0100 Subject: [PATCH 01/50] Add a test with MUMPS --- .github/actions/build/action.yml | 24 ++++++++++++++++++++++-- .github/actions/test/action.yml | 5 +++++ .github/workflows/main.yml | 11 +++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 9a48049b..012d45c0 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -1,4 +1,11 @@ name: "Linux Build" + +inputs: + use_mumps: + description: 'Indicates if GMGPolar should be built with mumps support' + type: bool + required: true + runs: using: "composite" steps: @@ -7,18 +14,31 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov + - name: Install MUMPS + shell: bash + if: inputs.use_mumps == 'true' + run: + spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared - name: Build - shell: + shell: bash # ensure that the installed compiler version is used run: | mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=Debug -DGMGPOLAR_ENABLE_COVERAGE=ON .. + cmake -DCMAKE_BUILD_TYPE=Debug -DGMGPOLAR_ENABLE_COVERAGE=ON -DGMGPOLAR_USE_MUMPS=${{ inputs.use_mumps }} .. make -j4 - name: create build dir archive shell: bash run: | tar -czf build.tar.gz build - name: Upload build dir archive + if: inputs.use_mumps == 'true' + uses: actions/upload-artifact@v4 + with: + name: build-cpp-linux-gmgpolar-mumps + path: build.tar.gz + retention-days: 1 + - name: Upload build dir archive + if: inputs.use_mumps != 'true' uses: actions/upload-artifact@v4 with: name: build-cpp-linux-gmgpolar diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index d25e4d06..83ec2533 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -13,6 +13,11 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov + - name: Install MUMPS + shell: bash + if: inputs.use_mumps == 'true' + run: + spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared - name: Download build test directory uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65529cdc..6a5ef9ae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,6 +13,9 @@ jobs: install-and-build: if: github.event.pull_request.draft == false runs-on: ubuntu-latest + strategy: + matrix: + USE_MUMPS: [0, 1] container: image: ghcr.io/gyselax/gyselalibxx_env:latest options: --user root @@ -23,14 +26,22 @@ jobs: run-unit-test: needs: install-and-build runs-on: ubuntu-latest + strategy: + matrix: + USE_MUMPS: [0, 1] container: image: ghcr.io/gyselax/gyselalibxx_env:latest options: --user root steps: - uses: actions/checkout@v4 - uses: ./.github/actions/test + if: USE_MUMPS == 0 with: build-artifact: build-cpp-linux-gmgpolar + - uses: ./.github/actions/test + if: USE_MUMPS == 1 + with: + build-artifact: build-cpp-linux-gmgpolar-mumps codecov: if: github.event.pull_request.draft == false From 9de4b5efda1f9644a15f3a87e49bbe979348b798 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:28:42 +0100 Subject: [PATCH 02/50] Correct matrix usage --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6a5ef9ae..c1b2690e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/build + with: + use_mumps: matrix.USE_MUMPS run-unit-test: needs: install-and-build @@ -35,11 +37,11 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/test - if: USE_MUMPS == 0 + if: matrix.USE_MUMPS == 0 with: build-artifact: build-cpp-linux-gmgpolar - uses: ./.github/actions/test - if: USE_MUMPS == 1 + if: matrix.USE_MUMPS == 1 with: build-artifact: build-cpp-linux-gmgpolar-mumps From 198e00b787e936c166d0b0de6cceefc206ca1576 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:29:16 +0100 Subject: [PATCH 03/50] Run on draft to test --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1b2690e..d6d2e795 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on : jobs: install-and-build: - if: github.event.pull_request.draft == false + #if: github.event.pull_request.draft == false runs-on: ubuntu-latest strategy: matrix: From f8fe2f8f57d47d4d8bc9a09a007dcacfe19b7f51 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:30:11 +0100 Subject: [PATCH 04/50] Better name --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d6d2e795..a7496d4a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,7 @@ jobs: strategy: matrix: USE_MUMPS: [0, 1] + name: 'install-and-build (USE_MUMPS=${{matrix.USE_MUMPS}})' container: image: ghcr.io/gyselax/gyselalibxx_env:latest options: --user root From 626c9d0f01837febb8843b45ce039d48d8e58a7d Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:30:57 +0100 Subject: [PATCH 05/50] Correct input --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a7496d4a..ce6f6a38 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/build with: - use_mumps: matrix.USE_MUMPS + use_mumps: ${{ matrix.USE_MUMPS }} run-unit-test: needs: install-and-build From 875250018459faf7d13219c0859979130bf9d575 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:31:32 +0100 Subject: [PATCH 06/50] Check val --- .github/actions/build/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 012d45c0..3394b5ea 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -14,6 +14,8 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov + echo "${{ inputs.use_mumps }}" + echo "${{ inputs.use_mumps == 'true'}}" - name: Install MUMPS shell: bash if: inputs.use_mumps == 'true' From 155098c4f428bc3f908d8b5caf09188e2b435cbd Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:32:18 +0100 Subject: [PATCH 07/50] Use bool --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce6f6a38..ec68537f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - USE_MUMPS: [0, 1] + USE_MUMPS: [false, true] name: 'install-and-build (USE_MUMPS=${{matrix.USE_MUMPS}})' container: image: ghcr.io/gyselax/gyselalibxx_env:latest @@ -31,18 +31,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - USE_MUMPS: [0, 1] + USE_MUMPS: [false, true] container: image: ghcr.io/gyselax/gyselalibxx_env:latest options: --user root steps: - uses: actions/checkout@v4 - uses: ./.github/actions/test - if: matrix.USE_MUMPS == 0 + if: matrix.USE_MUMPS with: build-artifact: build-cpp-linux-gmgpolar - uses: ./.github/actions/test - if: matrix.USE_MUMPS == 1 + if: matrix.USE_MUMPS with: build-artifact: build-cpp-linux-gmgpolar-mumps From b27be112f27f9b4f39903311b7c12cc2965a4f70 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 11:34:43 +0100 Subject: [PATCH 08/50] Clone spack --- .github/actions/build/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 3394b5ea..65de9c03 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,6 +20,8 @@ runs: shell: bash if: inputs.use_mumps == 'true' run: + git clone https://github.com/spack/spack.git + source spack/share/spack/setup-env.sh spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared - name: Build shell: bash From 2df8bbf86689c8a4ae46a21f080ed44dbd639ecd Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 12:16:23 +0100 Subject: [PATCH 09/50] Multi-line run --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 65de9c03..a2edcb0d 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -19,7 +19,7 @@ runs: - name: Install MUMPS shell: bash if: inputs.use_mumps == 'true' - run: + run: | git clone https://github.com/spack/spack.git source spack/share/spack/setup-env.sh spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared From 5f73c7b57acef74a63fb5c62b909af6a92ed95da Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 13:19:21 +0100 Subject: [PATCH 10/50] Different names for artifacts --- .github/actions/test/action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 83ec2533..68c31d85 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -49,6 +49,7 @@ runs: retention-days: 3 - name: Upload coverage reports uses: actions/upload-artifact@v4 + if: inputs.use_mumps != 'true' with: name: test-coverage-reports path: | @@ -56,3 +57,13 @@ runs: build/coverage if-no-files-found: error retention-days: 1 + - name: Upload coverage reports + uses: actions/upload-artifact@v4 + if: inputs.use_mumps == 'true' + with: + name: test-coverage-reports-mumps + path: | + build/coverage-filtered.info + build/coverage + if-no-files-found: error + retention-days: 1 From 6e37ce379eb1cd292334c6ad73d77378c31436c0 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 13:25:02 +0100 Subject: [PATCH 11/50] Get both coverage reports --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ec68537f..fe5bc2bb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,9 +56,15 @@ jobs: uses: actions/download-artifact@v4 with: name: test-coverage-reports + path: coverage + - name: Download mumps cpp coverage report + uses: actions/download-artifact@v4 + with: + name: test-coverage-reports-mumps + path: coverage-mumps - name: Deploy to codecov.io uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: coverage-filtered.info + files: coverage/coverage-filtered.info,coverage-mumps/coverage-filtered.info verbose: true From d8b16498f1348a74d65774499c53bbbe37b6a728 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:02:25 +0100 Subject: [PATCH 12/50] Install manually --- .github/actions/build/action.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a2edcb0d..a7e77312 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,9 +20,28 @@ runs: shell: bash if: inputs.use_mumps == 'true' run: | - git clone https://github.com/spack/spack.git - source spack/share/spack/setup-env.sh - spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared + git clone -b v5.1.0.4 https://github.com/scivision/METIS.git + cd METIS + make config prefix=$(pwd)/install + make install + ls install + ls install/* + cd .. + git clone https://github.com/cfwen/mumps.git + cd mumps + cp Make.inc/Makefile.inc.generic.SEQ ./Makefile.inc + sed -i 's/^OPTF.*/& -fopenmp/g' Makefile.inc + sed -i 's/^OPTC.*/& -fopenmp/g' Makefile.inc + sed -i 's/^OPTL.*/& -fopenmp/g' Makefile.inc + sed -i 's/^#LMETISDIR.*/LMETISDIR = $(topdir)\/..\/metis\/install\/lib/g' Makefile.inc + sed -i 's/^#IMETIS.*/IMETIS = $(topdir)\/..\/metis\/install\/include/g' Makefile.inc + sed -i 's/^ORDERINGSF.*/ORDERINGSF = -Dpord -Dmetis/g' Makefile.inc + make s + make d + ls + echo $LD_LIBRARY_PATH + echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/lib" + #spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared - name: Build shell: bash # ensure that the installed compiler version is used From 5e684fd0738dc510c58370138406b667b55adc91 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:11:32 +0100 Subject: [PATCH 13/50] Metis uses cmake now --- .github/actions/build/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a7e77312..ab7e7c01 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -22,10 +22,10 @@ runs: run: | git clone -b v5.1.0.4 https://github.com/scivision/METIS.git cd METIS - make config prefix=$(pwd)/install - make install - ls install - ls install/* + cmake -Bbuild + cmake --build build + ls build + ls build/* cd .. git clone https://github.com/cfwen/mumps.git cd mumps @@ -33,8 +33,8 @@ runs: sed -i 's/^OPTF.*/& -fopenmp/g' Makefile.inc sed -i 's/^OPTC.*/& -fopenmp/g' Makefile.inc sed -i 's/^OPTL.*/& -fopenmp/g' Makefile.inc - sed -i 's/^#LMETISDIR.*/LMETISDIR = $(topdir)\/..\/metis\/install\/lib/g' Makefile.inc - sed -i 's/^#IMETIS.*/IMETIS = $(topdir)\/..\/metis\/install\/include/g' Makefile.inc + sed -i 's/^#LMETISDIR.*/LMETISDIR = $(topdir)\/..\/metis\/build\/lib/g' Makefile.inc + sed -i 's/^#IMETIS.*/IMETIS = $(topdir)\/..\/metis\/include/g' Makefile.inc sed -i 's/^ORDERINGSF.*/ORDERINGSF = -Dpord -Dmetis/g' Makefile.inc make s make d From 18acf7c7a833d51e266d10b0f928cfa72dcfda27 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:15:29 +0100 Subject: [PATCH 14/50] Specify compilers --- .github/actions/build/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index ab7e7c01..938ab1c4 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -36,6 +36,9 @@ runs: sed -i 's/^#LMETISDIR.*/LMETISDIR = $(topdir)\/..\/metis\/build\/lib/g' Makefile.inc sed -i 's/^#IMETIS.*/IMETIS = $(topdir)\/..\/metis\/include/g' Makefile.inc sed -i 's/^ORDERINGSF.*/ORDERINGSF = -Dpord -Dmetis/g' Makefile.inc + sed -i 's/^CC.*/CC = gcc/g' Makefile.inc + sed -i 's/^FC.*/FC = gfortran/g' Makefile.inc + sed -i 's/^FL.*/FL = gfortran/g' Makefile.inc make s make d ls From fd5ec4337be2875ff1ec0179debbf1ebd2ade412 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:21:00 +0100 Subject: [PATCH 15/50] Missing fortran --- .github/actions/build/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 938ab1c4..d16b8cae 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,6 +20,7 @@ runs: shell: bash if: inputs.use_mumps == 'true' run: | + apt-get -qq -y install gfortran git clone -b v5.1.0.4 https://github.com/scivision/METIS.git cd METIS cmake -Bbuild From 5820844089a5305186b9451848f7291e935e2b6d Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:25:48 +0100 Subject: [PATCH 16/50] Add flag for gfortran>=10 --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index d16b8cae..c43c9a27 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -31,7 +31,7 @@ runs: git clone https://github.com/cfwen/mumps.git cd mumps cp Make.inc/Makefile.inc.generic.SEQ ./Makefile.inc - sed -i 's/^OPTF.*/& -fopenmp/g' Makefile.inc + sed -i 's/^OPTF.*/& -fopenmp -fallow-argument-mismatch/g' Makefile.inc sed -i 's/^OPTC.*/& -fopenmp/g' Makefile.inc sed -i 's/^OPTL.*/& -fopenmp/g' Makefile.inc sed -i 's/^#LMETISDIR.*/LMETISDIR = $(topdir)\/..\/metis\/build\/lib/g' Makefile.inc From 4f45dc9519744e7926fdde1d05f62d93474c9198 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:34:52 +0100 Subject: [PATCH 17/50] Correct path --- .github/actions/build/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index c43c9a27..be36e709 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -34,12 +34,13 @@ runs: sed -i 's/^OPTF.*/& -fopenmp -fallow-argument-mismatch/g' Makefile.inc sed -i 's/^OPTC.*/& -fopenmp/g' Makefile.inc sed -i 's/^OPTL.*/& -fopenmp/g' Makefile.inc - sed -i 's/^#LMETISDIR.*/LMETISDIR = $(topdir)\/..\/metis\/build\/lib/g' Makefile.inc - sed -i 's/^#IMETIS.*/IMETIS = $(topdir)\/..\/metis\/include/g' Makefile.inc + sed -i 's/^#LMETISDIR.*/LMETISDIR = $(pwd)\/..\/metis\/build\/lib/g' Makefile.inc + sed -i 's/^#IMETIS.*/IMETIS = $(pwd)\/..\/metis\/include/g' Makefile.inc sed -i 's/^ORDERINGSF.*/ORDERINGSF = -Dpord -Dmetis/g' Makefile.inc sed -i 's/^CC.*/CC = gcc/g' Makefile.inc sed -i 's/^FC.*/FC = gfortran/g' Makefile.inc sed -i 's/^FL.*/FL = gfortran/g' Makefile.inc + sed -i 's/\/pwd/g' Makefile.inc make s make d ls From 7af986c0566ced6e318e6ab0eea854a8cb8be171 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:40:17 +0100 Subject: [PATCH 18/50] Use absolute path --- .github/actions/build/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index be36e709..49c4fbd1 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -34,13 +34,13 @@ runs: sed -i 's/^OPTF.*/& -fopenmp -fallow-argument-mismatch/g' Makefile.inc sed -i 's/^OPTC.*/& -fopenmp/g' Makefile.inc sed -i 's/^OPTL.*/& -fopenmp/g' Makefile.inc - sed -i 's/^#LMETISDIR.*/LMETISDIR = $(pwd)\/..\/metis\/build\/lib/g' Makefile.inc - sed -i 's/^#IMETIS.*/IMETIS = $(pwd)\/..\/metis\/include/g' Makefile.inc + sed -i 's/^#LMETISDIR.*/LMETISDIR = '"$(pwd)"'\/..\/metis\/build\/lib/g' Makefile.inc + sed -i 's/^#IMETIS.*/IMETIS = '"$(pwd)"'\/..\/metis\/include/g' Makefile.inc sed -i 's/^ORDERINGSF.*/ORDERINGSF = -Dpord -Dmetis/g' Makefile.inc sed -i 's/^CC.*/CC = gcc/g' Makefile.inc sed -i 's/^FC.*/FC = gfortran/g' Makefile.inc sed -i 's/^FL.*/FL = gfortran/g' Makefile.inc - sed -i 's/\/pwd/g' Makefile.inc + sed -i 's/\$(topdir)/'"$(pwd)"'/g' Makefile.inc make s make d ls From f1b672c14ce25b08c5a2ffd8a5350e68aebd6d9b Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:50:38 +0100 Subject: [PATCH 19/50] Use clearer separator --- .github/actions/build/action.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 49c4fbd1..25803fec 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -31,16 +31,16 @@ runs: git clone https://github.com/cfwen/mumps.git cd mumps cp Make.inc/Makefile.inc.generic.SEQ ./Makefile.inc - sed -i 's/^OPTF.*/& -fopenmp -fallow-argument-mismatch/g' Makefile.inc - sed -i 's/^OPTC.*/& -fopenmp/g' Makefile.inc - sed -i 's/^OPTL.*/& -fopenmp/g' Makefile.inc - sed -i 's/^#LMETISDIR.*/LMETISDIR = '"$(pwd)"'\/..\/metis\/build\/lib/g' Makefile.inc - sed -i 's/^#IMETIS.*/IMETIS = '"$(pwd)"'\/..\/metis\/include/g' Makefile.inc - sed -i 's/^ORDERINGSF.*/ORDERINGSF = -Dpord -Dmetis/g' Makefile.inc - sed -i 's/^CC.*/CC = gcc/g' Makefile.inc - sed -i 's/^FC.*/FC = gfortran/g' Makefile.inc - sed -i 's/^FL.*/FL = gfortran/g' Makefile.inc - sed -i 's/\$(topdir)/'"$(pwd)"'/g' Makefile.inc + sed -i 's|^OPTF.*|& -fopenmp -fallow-argument-mismatch/g' Makefile.inc + sed -i 's|^OPTC.*|& -fopenmp/g' Makefile.inc + sed -i 's|^OPTL.*|& -fopenmp/g' Makefile.inc + sed -i "s|^#LMETISDIR.*|LMETISDIR = $(pwd)/../metis/build/lib|g" Makefile.inc + sed -i "s|^#IMETIS.*|IMETIS = $(pwd)/../metis/include|g" Makefile.inc + sed -i 's|^ORDERINGSF.*|ORDERINGSF = -Dpord -Dmetis|g' Makefile.inc + sed -i 's|^CC.*|CC = gcc|g' Makefile.inc + sed -i 's|^FC.*|FC = gfortran|g' Makefile.inc + sed -i 's|^FL.*|FL = gfortran|g' Makefile.inc + sed -i "s|\$(topdir)|$(pwd)/g" Makefile.inc make s make d ls From c689f78c59187ceafea7632ed874a7caacf35dfd Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 15:58:45 +0100 Subject: [PATCH 20/50] Fix sed --- .github/actions/build/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 25803fec..bb4293ae 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -31,16 +31,17 @@ runs: git clone https://github.com/cfwen/mumps.git cd mumps cp Make.inc/Makefile.inc.generic.SEQ ./Makefile.inc - sed -i 's|^OPTF.*|& -fopenmp -fallow-argument-mismatch/g' Makefile.inc - sed -i 's|^OPTC.*|& -fopenmp/g' Makefile.inc - sed -i 's|^OPTL.*|& -fopenmp/g' Makefile.inc + sed -i 's|^OPTF.*|& -fopenmp -fallow-argument-mismatch|g' Makefile.inc + sed -i 's|^OPTC.*|& -fopenmp|g' Makefile.inc + sed -i 's|^OPTL.*|& -fopenmp|g' Makefile.inc sed -i "s|^#LMETISDIR.*|LMETISDIR = $(pwd)/../metis/build/lib|g" Makefile.inc sed -i "s|^#IMETIS.*|IMETIS = $(pwd)/../metis/include|g" Makefile.inc + sed -i 's|^#LMETIS *= -L$(LMETISDIR) -lmetis|LMETIS = -L$(LMETISDIR) -lmetis|g' Makefile.inc sed -i 's|^ORDERINGSF.*|ORDERINGSF = -Dpord -Dmetis|g' Makefile.inc sed -i 's|^CC.*|CC = gcc|g' Makefile.inc sed -i 's|^FC.*|FC = gfortran|g' Makefile.inc sed -i 's|^FL.*|FL = gfortran|g' Makefile.inc - sed -i "s|\$(topdir)|$(pwd)/g" Makefile.inc + sed -i "s|\$(topdir)|$(pwd)|g" Makefile.inc make s make d ls From c39293a40733a5dd674eabf9c6210bc0ac8ae8f4 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 16:03:08 +0100 Subject: [PATCH 21/50] gmake --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index bb4293ae..a5c06475 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,7 +20,7 @@ runs: shell: bash if: inputs.use_mumps == 'true' run: | - apt-get -qq -y install gfortran + apt-get -qq -y install build-essential git clone -b v5.1.0.4 https://github.com/scivision/METIS.git cd METIS cmake -Bbuild From 0243e7c0a5a093cda5e0385a8b918ea3a8fa9365 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 16:05:43 +0100 Subject: [PATCH 22/50] Explicit topdir --- .github/actions/build/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a5c06475..d1a73b43 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -20,7 +20,7 @@ runs: shell: bash if: inputs.use_mumps == 'true' run: | - apt-get -qq -y install build-essential + apt-get -qq -y install gfortran git clone -b v5.1.0.4 https://github.com/scivision/METIS.git cd METIS cmake -Bbuild @@ -42,6 +42,7 @@ runs: sed -i 's|^FC.*|FC = gfortran|g' Makefile.inc sed -i 's|^FL.*|FL = gfortran|g' Makefile.inc sed -i "s|\$(topdir)|$(pwd)|g" Makefile.inc + sed -i "s|topdir = .|topdir = $(pwd)|g" Makefile make s make d ls From 223ac0f6d7033b55235b9ebae6c30a9a0feaaaf5 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 16:09:39 +0100 Subject: [PATCH 23/50] Prepare folder --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index d1a73b43..1a2965a3 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -42,7 +42,7 @@ runs: sed -i 's|^FC.*|FC = gfortran|g' Makefile.inc sed -i 's|^FL.*|FL = gfortran|g' Makefile.inc sed -i "s|\$(topdir)|$(pwd)|g" Makefile.inc - sed -i "s|topdir = .|topdir = $(pwd)|g" Makefile + mkdir lib make s make d ls From 53b1223f8bfdc996547e9497da3250aabc8a1d88 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 16:21:28 +0100 Subject: [PATCH 24/50] Fix install --- .github/actions/build/action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 1a2965a3..790c81b9 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -23,8 +23,9 @@ runs: apt-get -qq -y install gfortran git clone -b v5.1.0.4 https://github.com/scivision/METIS.git cd METIS - cmake -Bbuild + cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(pwd)/install cmake --build build + cmake --install build ls build ls build/* cd .. @@ -34,8 +35,8 @@ runs: sed -i 's|^OPTF.*|& -fopenmp -fallow-argument-mismatch|g' Makefile.inc sed -i 's|^OPTC.*|& -fopenmp|g' Makefile.inc sed -i 's|^OPTL.*|& -fopenmp|g' Makefile.inc - sed -i "s|^#LMETISDIR.*|LMETISDIR = $(pwd)/../metis/build/lib|g" Makefile.inc - sed -i "s|^#IMETIS.*|IMETIS = $(pwd)/../metis/include|g" Makefile.inc + sed -i "s|^#LMETISDIR.*|LMETISDIR = $(pwd)/../METIS/install/lib|g" Makefile.inc + sed -i "s|^#IMETIS.*|IMETIS = -I$(pwd)/../METIS/install/include|g" Makefile.inc sed -i 's|^#LMETIS *= -L$(LMETISDIR) -lmetis|LMETIS = -L$(LMETISDIR) -lmetis|g' Makefile.inc sed -i 's|^ORDERINGSF.*|ORDERINGSF = -Dpord -Dmetis|g' Makefile.inc sed -i 's|^CC.*|CC = gcc|g' Makefile.inc From 66a8ad3bf3e6460e50fa71ff9c87deee8d0f4e61 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 16:32:02 +0100 Subject: [PATCH 25/50] Don't run twice --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fe5bc2bb..66341949 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/test - if: matrix.USE_MUMPS + if: ! matrix.USE_MUMPS with: build-artifact: build-cpp-linux-gmgpolar - uses: ./.github/actions/test From 75dd4a8a5cf65e03abc02f977b6d50d0617e1944 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 16:40:12 +0100 Subject: [PATCH 26/50] Working condition? --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 66341949..90600b55 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,11 +38,11 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/test - if: ! matrix.USE_MUMPS + if: matrix.USE_MUMPS != true with: build-artifact: build-cpp-linux-gmgpolar - uses: ./.github/actions/test - if: matrix.USE_MUMPS + if: matrix.USE_MUMPS == true with: build-artifact: build-cpp-linux-gmgpolar-mumps From 4b87bd818f28f541dc27046eea180becf2414747 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 16:50:08 +0100 Subject: [PATCH 27/50] Uniform naming. Pass argument --- .github/actions/build/action.yml | 14 +++++++------- .github/actions/test/action.yml | 10 +++++++--- .github/workflows/main.yml | 4 +++- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 790c81b9..2a124801 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -1,7 +1,7 @@ name: "Linux Build" inputs: - use_mumps: + use-mumps: description: 'Indicates if GMGPolar should be built with mumps support' type: bool required: true @@ -14,11 +14,11 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov - echo "${{ inputs.use_mumps }}" - echo "${{ inputs.use_mumps == 'true'}}" + echo "${{ inputs.use-mumps }}" + echo "${{ inputs.use-mumps == 'true'}}" - name: Install MUMPS shell: bash - if: inputs.use_mumps == 'true' + if: inputs.use-mumps == 'true' run: | apt-get -qq -y install gfortran git clone -b v5.1.0.4 https://github.com/scivision/METIS.git @@ -55,21 +55,21 @@ runs: # ensure that the installed compiler version is used run: | mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=Debug -DGMGPOLAR_ENABLE_COVERAGE=ON -DGMGPOLAR_USE_MUMPS=${{ inputs.use_mumps }} .. + cmake -DCMAKE_BUILD_TYPE=Debug -DGMGPOLAR_ENABLE_COVERAGE=ON -DGMGPOLAR_USE_MUMPS=${{ inputs.use-mumps }} .. make -j4 - name: create build dir archive shell: bash run: | tar -czf build.tar.gz build - name: Upload build dir archive - if: inputs.use_mumps == 'true' + if: inputs.use-mumps == 'true' uses: actions/upload-artifact@v4 with: name: build-cpp-linux-gmgpolar-mumps path: build.tar.gz retention-days: 1 - name: Upload build dir archive - if: inputs.use_mumps != 'true' + if: inputs.use-mumps != 'true' uses: actions/upload-artifact@v4 with: name: build-cpp-linux-gmgpolar diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 68c31d85..558a725b 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -4,6 +4,10 @@ inputs: build-artifact: description: "Name of the build artifact that contains the unit test" required: true + use-mumps: + description: 'Indicates if GMGPolar should be built with mumps support' + type: bool + required: true runs: using: "composite" @@ -15,7 +19,7 @@ runs: apt-get -qq -y install lcov - name: Install MUMPS shell: bash - if: inputs.use_mumps == 'true' + if: inputs.use-mumps == 'true' run: spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared - name: Download build test directory @@ -49,7 +53,7 @@ runs: retention-days: 3 - name: Upload coverage reports uses: actions/upload-artifact@v4 - if: inputs.use_mumps != 'true' + if: inputs.use-mumps != 'true' with: name: test-coverage-reports path: | @@ -59,7 +63,7 @@ runs: retention-days: 1 - name: Upload coverage reports uses: actions/upload-artifact@v4 - if: inputs.use_mumps == 'true' + if: inputs.use-mumps == 'true' with: name: test-coverage-reports-mumps path: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90600b55..b71c5251 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/build with: - use_mumps: ${{ matrix.USE_MUMPS }} + use-mumps: ${{ matrix.USE_MUMPS }} run-unit-test: needs: install-and-build @@ -41,10 +41,12 @@ jobs: if: matrix.USE_MUMPS != true with: build-artifact: build-cpp-linux-gmgpolar + use-mumps: ${{ matrix.USE_MUMPS }} - uses: ./.github/actions/test if: matrix.USE_MUMPS == true with: build-artifact: build-cpp-linux-gmgpolar-mumps + use-mumps: ${{ matrix.USE_MUMPS }} codecov: if: github.event.pull_request.draft == false From 572d675d6df349df634e33f3ae32e69817850395 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:12:36 +0100 Subject: [PATCH 28/50] Install not required --- .github/actions/test/action.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 558a725b..3b5e0cde 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -17,11 +17,6 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov - - name: Install MUMPS - shell: bash - if: inputs.use-mumps == 'true' - run: - spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared - name: Download build test directory uses: actions/download-artifact@v4 with: From 084bc5f7e905d0b7d97e6fd385d5136bed48cd87 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:24:55 +0100 Subject: [PATCH 29/50] Fix for test-report. Use ternary --- .github/actions/build/action.yml | 10 +--------- .github/actions/test/action.yml | 15 ++------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 2a124801..98566817 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -62,16 +62,8 @@ runs: run: | tar -czf build.tar.gz build - name: Upload build dir archive - if: inputs.use-mumps == 'true' - uses: actions/upload-artifact@v4 - with: - name: build-cpp-linux-gmgpolar-mumps - path: build.tar.gz - retention-days: 1 - - name: Upload build dir archive - if: inputs.use-mumps != 'true' uses: actions/upload-artifact@v4 with: - name: build-cpp-linux-gmgpolar + name: build-cpp-linux-gmgpolar${{ inputs.use-mumps && '-mumps' || ''}} path: build.tar.gz retention-days: 1 diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 3b5e0cde..20338532 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -42,25 +42,14 @@ runs: - name: Upload test report uses: actions/upload-artifact@v4 with: - name: test-report + name: test-report${{ inputs.use-mumps && '-mumps' || ''}} path: build/tests/testreport.xml if-no-files-found: error retention-days: 3 - name: Upload coverage reports uses: actions/upload-artifact@v4 - if: inputs.use-mumps != 'true' with: - name: test-coverage-reports - path: | - build/coverage-filtered.info - build/coverage - if-no-files-found: error - retention-days: 1 - - name: Upload coverage reports - uses: actions/upload-artifact@v4 - if: inputs.use-mumps == 'true' - with: - name: test-coverage-reports-mumps + name: test-coverage-reports${{ inputs.use-mumps && '-mumps' || ''}} path: | build/coverage-filtered.info build/coverage From eb084be6918140a98db1eaf08b9d901e8b00a7ff Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:30:10 +0100 Subject: [PATCH 30/50] Correct condition --- .github/actions/build/action.yml | 2 +- .github/actions/test/action.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 98566817..0a2c2069 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -64,6 +64,6 @@ runs: - name: Upload build dir archive uses: actions/upload-artifact@v4 with: - name: build-cpp-linux-gmgpolar${{ inputs.use-mumps && '-mumps' || ''}} + name: build-cpp-linux-gmgpolar${{ inputs.use-mumps == 'true' && '-mumps' || ''}} path: build.tar.gz retention-days: 1 diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 20338532..6e01e2b8 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -42,14 +42,14 @@ runs: - name: Upload test report uses: actions/upload-artifact@v4 with: - name: test-report${{ inputs.use-mumps && '-mumps' || ''}} + name: test-report${{ inputs.use-mumps == 'true' && '-mumps' || ''}} path: build/tests/testreport.xml if-no-files-found: error retention-days: 3 - name: Upload coverage reports uses: actions/upload-artifact@v4 with: - name: test-coverage-reports${{ inputs.use-mumps && '-mumps' || ''}} + name: test-coverage-reports${{ inputs.use-mumps == 'true' && '-mumps' || ''}} path: | build/coverage-filtered.info build/coverage From 57f6ba5fe093148065c4d10a5380eb0cdf50001d Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:35:29 +0100 Subject: [PATCH 31/50] Simplify with ternary --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b71c5251..f20cf84d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,14 +38,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/test - if: matrix.USE_MUMPS != true with: - build-artifact: build-cpp-linux-gmgpolar - use-mumps: ${{ matrix.USE_MUMPS }} - - uses: ./.github/actions/test - if: matrix.USE_MUMPS == true - with: - build-artifact: build-cpp-linux-gmgpolar-mumps + build-artifact: build-cpp-linux-gmgpolar${{ inputs.use-mumps == 'true' && '-mumps' || ''}} use-mumps: ${{ matrix.USE_MUMPS }} codecov: From 875ffd54031b0f03fac70dadd4fa10530a21a93e Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:37:17 +0100 Subject: [PATCH 32/50] Finished debugging --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f20cf84d..a1325bb5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on : jobs: install-and-build: - #if: github.event.pull_request.draft == false + if: github.event.pull_request.draft == false runs-on: ubuntu-latest strategy: matrix: From 9bce99ffbb41d2d1b3ab06085f4ac7de7b1a5309 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:42:38 +0100 Subject: [PATCH 33/50] Set environment variables --- .github/actions/build/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 0a2c2069..9167858a 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -28,6 +28,7 @@ runs: cmake --install build ls build ls build/* + echo "METIS_DIR=$(pwd)/install" >> $GITHUB_ENV cd .. git clone https://github.com/cfwen/mumps.git cd mumps @@ -48,8 +49,8 @@ runs: make d ls echo $LD_LIBRARY_PATH - echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/lib" - #spack install mumps@5.5.1 ~blr_mt ~complex +double +float ~incfort ~int64 +metis ~mpi +openmp ~parmetis ~ptscotch ~scotch +shared + echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/lib" >> $GITHUB_ENV + echo "MUMPS_DIR=$(pwd)" >> $GITHUB_ENV - name: Build shell: bash # ensure that the installed compiler version is used From bf1db7c51816ee66352880bd91ee7ea5e458a34a Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:44:00 +0100 Subject: [PATCH 34/50] Add error messages if libraries not found when GMGPOLAR_USE_MUMPS is requested --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index db892c3c..96809611 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -226,10 +226,14 @@ if(GMGPOLAR_USE_MUMPS) mpiseq ) target_compile_definitions(GMGPolarLib PUBLIC GMGPOLAR_USE_MUMPS) + else() + message(SEND_ERROR "MUMPS not found") endif() if(METIS_FOUND) target_link_libraries(GMGPolarLib PUBLIC metis) + else() + message(SEND_ERROR "METIS not found") endif() endif() From d60982ad3510b7f03618595fa8ed165273f52913 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 17:44:31 +0100 Subject: [PATCH 35/50] Test with debug --- .github/workflows/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1325bb5..550ca03c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,11 +11,12 @@ on : jobs: install-and-build: - if: github.event.pull_request.draft == false + #if: github.event.pull_request.draft == false runs-on: ubuntu-latest strategy: matrix: - USE_MUMPS: [false, true] + #USE_MUMPS: [false, true] + USE_MUMPS: [true] name: 'install-and-build (USE_MUMPS=${{matrix.USE_MUMPS}})' container: image: ghcr.io/gyselax/gyselalibxx_env:latest @@ -31,7 +32,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - USE_MUMPS: [false, true] + #USE_MUMPS: [false, true] + USE_MUMPS: [true] container: image: ghcr.io/gyselax/gyselalibxx_env:latest options: --user root From fb5ca3b0791b9b89be7ab9b63e398245dec6b0e6 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 18:00:40 +0100 Subject: [PATCH 36/50] MPI spoof is in libseq not lib --- src/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 96809611..dd2d7254 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -201,6 +201,11 @@ if(GMGPOLAR_USE_MUMPS) target_include_directories(GMGPolarLib PUBLIC ${MUMPS_INCLUDE_DIR}) target_link_directories(GMGPolarLib PUBLIC ${MUMPS_LIBRARY_DIR}) + + if (EXISTS "${MUMPS_DIR}/libseq") + target_link_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") + endif() + set(MUMPS_FOUND TRUE) endif() endif() From 666bcd268e1bfaeff709600639183bf4c84b745c Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 18:04:05 +0100 Subject: [PATCH 37/50] Include dir too --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dd2d7254..0c641651 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -203,6 +203,7 @@ if(GMGPOLAR_USE_MUMPS) target_link_directories(GMGPolarLib PUBLIC ${MUMPS_LIBRARY_DIR}) if (EXISTS "${MUMPS_DIR}/libseq") + target_include_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") target_link_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") endif() From 5d873c93e61a28f6310e7c72787354f8d97b75e4 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Wed, 29 Oct 2025 18:11:09 +0100 Subject: [PATCH 38/50] Check folders --- .github/actions/build/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 9167858a..bf3169ff 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -48,6 +48,8 @@ runs: make s make d ls + ls lib + ls libseq echo $LD_LIBRARY_PATH echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/lib" >> $GITHUB_ENV echo "MUMPS_DIR=$(pwd)" >> $GITHUB_ENV From 033a6d18f932e34d17abf410809d2984f892b23f Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 12:21:25 +0100 Subject: [PATCH 39/50] Install using CMake --- .github/actions/build/action.yml | 34 +++++++++----------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index bf3169ff..7b6aadff 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -23,36 +23,20 @@ runs: apt-get -qq -y install gfortran git clone -b v5.1.0.4 https://github.com/scivision/METIS.git cd METIS - cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(pwd)/install + cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DCMAKE_BUILD_TYPE=Release cmake --build build cmake --install build - ls build - ls build/* + ls install/* echo "METIS_DIR=$(pwd)/install" >> $GITHUB_ENV + echo "METIS_ROOT=$(pwd)/install" >> $GITHUB_ENV cd .. - git clone https://github.com/cfwen/mumps.git + git clone -b v5.5.1.11 https://github.com/scivision/mumps.git cd mumps - cp Make.inc/Makefile.inc.generic.SEQ ./Makefile.inc - sed -i 's|^OPTF.*|& -fopenmp -fallow-argument-mismatch|g' Makefile.inc - sed -i 's|^OPTC.*|& -fopenmp|g' Makefile.inc - sed -i 's|^OPTL.*|& -fopenmp|g' Makefile.inc - sed -i "s|^#LMETISDIR.*|LMETISDIR = $(pwd)/../METIS/install/lib|g" Makefile.inc - sed -i "s|^#IMETIS.*|IMETIS = -I$(pwd)/../METIS/install/include|g" Makefile.inc - sed -i 's|^#LMETIS *= -L$(LMETISDIR) -lmetis|LMETIS = -L$(LMETISDIR) -lmetis|g' Makefile.inc - sed -i 's|^ORDERINGSF.*|ORDERINGSF = -Dpord -Dmetis|g' Makefile.inc - sed -i 's|^CC.*|CC = gcc|g' Makefile.inc - sed -i 's|^FC.*|FC = gfortran|g' Makefile.inc - sed -i 's|^FL.*|FL = gfortran|g' Makefile.inc - sed -i "s|\$(topdir)|$(pwd)|g" Makefile.inc - mkdir lib - make s - make d - ls - ls lib - ls libseq - echo $LD_LIBRARY_PATH - echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/lib" >> $GITHUB_ENV - echo "MUMPS_DIR=$(pwd)" >> $GITHUB_ENV + cmake -Bbuild -DBUILD_SINGLE=on -DBUILD_DOUBLE=on -Dmetis=on -Dopenmp=on -Dparallel=off -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DCMAKE_BUILD_TYPE=Release -S . + cmake --build build + cmake --install build + ls install/* + echo "MUMPS_DIR=$(pwd)/install" >> $GITHUB_ENV - name: Build shell: bash # ensure that the installed compiler version is used From da172f2810d8e3596224d91710ccdbcef65d9777 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 12:25:52 +0100 Subject: [PATCH 40/50] Export so var is available locally --- .github/actions/build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 7b6aadff..a98341a2 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -28,7 +28,7 @@ runs: cmake --install build ls install/* echo "METIS_DIR=$(pwd)/install" >> $GITHUB_ENV - echo "METIS_ROOT=$(pwd)/install" >> $GITHUB_ENV + export METIS_ROOT=$(pwd)/install cd .. git clone -b v5.5.1.11 https://github.com/scivision/mumps.git cd mumps From 3b3793943dab96d693b3a0f477514126a5bc895f Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 13:10:38 +0100 Subject: [PATCH 41/50] Fix linking --- CMakeLists.txt | 7 +++- src/CMakeLists.txt | 90 ++++++++++++++++++++++++---------------------- 2 files changed, 54 insertions(+), 43 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4670da20..57f1454d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ cmake_minimum_required(VERSION 3.12) -project(GMGPolar VERSION 2.0.0 LANGUAGES CXX) # Options should be defined before they're used option(GMGPOLAR_BUILD_TESTS "Build GMGPolar unit tests." ON) @@ -7,6 +6,12 @@ option(GMGPOLAR_USE_LIKWID "Use LIKWID to measure code (regions)." OFF) option(GMGPOLAR_USE_MUMPS "Use MUMPS to solve linear systems." OFF) option(GMGPOLAR_ENABLE_COVERAGE "Enable code coverage reporting (requires GCC/Clang)" OFF) +if (${GMGPOLAR_USE_MUMPS}) + project(GMGPolar VERSION 2.0.0 LANGUAGES CXX Fortran) +else() +project(GMGPolar VERSION 2.0.0 LANGUAGES CXX) +endif() + set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED True) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0c641651..ee7b72a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -192,54 +192,60 @@ endif() # Handle MUMPS configuration if(GMGPOLAR_USE_MUMPS) - if(DEFINED ENV{MUMPS_DIR}) - set(MUMPS_DIR $ENV{MUMPS_DIR}) - - if(EXISTS "${MUMPS_DIR}/include" AND EXISTS "${MUMPS_DIR}/lib") - set(MUMPS_INCLUDE_DIR "${MUMPS_DIR}/include") - set(MUMPS_LIBRARY_DIR "${MUMPS_DIR}/lib") - - target_include_directories(GMGPolarLib PUBLIC ${MUMPS_INCLUDE_DIR}) - target_link_directories(GMGPolarLib PUBLIC ${MUMPS_LIBRARY_DIR}) + find_package(MUMPS COMPONENTS OpenMP METIS) + if (${MUMPS_FOUND}) + target_link_libraries(GMGPolarLib PUBLIC MUMPS::MUMPS) + target_compile_definitions(GMGPolarLib PUBLIC GMGPOLAR_USE_MUMPS) + else() + if(DEFINED ENV{MUMPS_DIR}) + set(MUMPS_DIR $ENV{MUMPS_DIR}) + + if(EXISTS "${MUMPS_DIR}/include" AND EXISTS "${MUMPS_DIR}/lib") + set(MUMPS_INCLUDE_DIR "${MUMPS_DIR}/include") + set(MUMPS_LIBRARY_DIR "${MUMPS_DIR}/lib") + + target_include_directories(GMGPolarLib PUBLIC ${MUMPS_INCLUDE_DIR}) + target_link_directories(GMGPolarLib PUBLIC ${MUMPS_LIBRARY_DIR}) - if (EXISTS "${MUMPS_DIR}/libseq") - target_include_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") - target_link_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") - endif() + if (EXISTS "${MUMPS_DIR}/libseq") + target_include_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") + target_link_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") + endif() - set(MUMPS_FOUND TRUE) - endif() - endif() + set(MUMPS_FOUND TRUE) + endif() + endif() - if(DEFINED ENV{METIS_DIR}) - set(METIS_DIR $ENV{METIS_DIR}) + if(DEFINED ENV{METIS_DIR}) + set(METIS_DIR $ENV{METIS_DIR}) - if(EXISTS "${METIS_DIR}/include" AND EXISTS "${METIS_DIR}/lib") - set(METIS_INCLUDE_DIR "${METIS_DIR}/include") - set(METIS_LIBRARY_DIR "${METIS_DIR}/lib") - - target_include_directories(GMGPolarLib PUBLIC ${METIS_INCLUDE_DIR}) - target_link_directories(GMGPolarLib PUBLIC ${METIS_LIBRARY_DIR}) - set(METIS_FOUND TRUE) - endif() - endif() + if(EXISTS "${METIS_DIR}/include" AND EXISTS "${METIS_DIR}/lib") + set(METIS_INCLUDE_DIR "${METIS_DIR}/include") + set(METIS_LIBRARY_DIR "${METIS_DIR}/lib") + + target_include_directories(GMGPolarLib PUBLIC ${METIS_INCLUDE_DIR}) + target_link_directories(GMGPolarLib PUBLIC ${METIS_LIBRARY_DIR}) + set(METIS_FOUND TRUE) + endif() + endif() - if(MUMPS_FOUND) - target_link_libraries(GMGPolarLib PUBLIC - mumps_common - smumps - dmumps - mpiseq - ) - target_compile_definitions(GMGPolarLib PUBLIC GMGPOLAR_USE_MUMPS) - else() - message(SEND_ERROR "MUMPS not found") - endif() + if(MUMPS_FOUND) + target_link_libraries(GMGPolarLib PUBLIC + mumps_common + smumps + dmumps + mpiseq + ) + target_compile_definitions(GMGPolarLib PUBLIC GMGPOLAR_USE_MUMPS) + else() + message(SEND_ERROR "MUMPS not found") + endif() - if(METIS_FOUND) - target_link_libraries(GMGPolarLib PUBLIC metis) - else() - message(SEND_ERROR "METIS not found") + if(METIS_FOUND) + target_link_libraries(GMGPolarLib PUBLIC metis) + else() + message(SEND_ERROR "METIS not found") + endif() endif() endif() From d17c370ae2b1b42602dcd580745feb5f8a85a949 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 13:17:51 +0100 Subject: [PATCH 42/50] Ensure METIS is found --- .github/actions/build/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a98341a2..9b0da3db 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -28,6 +28,7 @@ runs: cmake --install build ls install/* echo "METIS_DIR=$(pwd)/install" >> $GITHUB_ENV + echo "METIS_ROOT=$(pwd)/install" >> $GITHUB_ENV export METIS_ROOT=$(pwd)/install cd .. git clone -b v5.5.1.11 https://github.com/scivision/mumps.git From b4b38d41d0ebbb3430962cac6390bf2aa215c1dc Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:04:13 +0100 Subject: [PATCH 43/50] Correct condition --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 550ca03c..0bc75692 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/test with: - build-artifact: build-cpp-linux-gmgpolar${{ inputs.use-mumps == 'true' && '-mumps' || ''}} + build-artifact: build-cpp-linux-gmgpolar${{ matrix.USE_MUMPS == 'true' && '-mumps' || ''}} use-mumps: ${{ matrix.USE_MUMPS }} codecov: From c85e5d1dd0a9ec1f1d67b46383ab43db9d3103fb Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:08:25 +0100 Subject: [PATCH 44/50] Tidy up fail --- src/CMakeLists.txt | 86 ++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ee7b72a5..3cf596c1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -196,56 +196,54 @@ if(GMGPOLAR_USE_MUMPS) if (${MUMPS_FOUND}) target_link_libraries(GMGPolarLib PUBLIC MUMPS::MUMPS) target_compile_definitions(GMGPolarLib PUBLIC GMGPOLAR_USE_MUMPS) - else() - if(DEFINED ENV{MUMPS_DIR}) - set(MUMPS_DIR $ENV{MUMPS_DIR}) - - if(EXISTS "${MUMPS_DIR}/include" AND EXISTS "${MUMPS_DIR}/lib") - set(MUMPS_INCLUDE_DIR "${MUMPS_DIR}/include") - set(MUMPS_LIBRARY_DIR "${MUMPS_DIR}/lib") - - target_include_directories(GMGPolarLib PUBLIC ${MUMPS_INCLUDE_DIR}) - target_link_directories(GMGPolarLib PUBLIC ${MUMPS_LIBRARY_DIR}) + elseif(DEFINED ENV{MUMPS_DIR}) + set(MUMPS_DIR $ENV{MUMPS_DIR}) + + if(EXISTS "${MUMPS_DIR}/include" AND EXISTS "${MUMPS_DIR}/lib") + set(MUMPS_INCLUDE_DIR "${MUMPS_DIR}/include") + set(MUMPS_LIBRARY_DIR "${MUMPS_DIR}/lib") - if (EXISTS "${MUMPS_DIR}/libseq") - target_include_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") - target_link_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") - endif() + target_include_directories(GMGPolarLib PUBLIC ${MUMPS_INCLUDE_DIR}) + target_link_directories(GMGPolarLib PUBLIC ${MUMPS_LIBRARY_DIR}) - set(MUMPS_FOUND TRUE) - endif() - endif() + if (EXISTS "${MUMPS_DIR}/libseq") + target_include_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") + target_link_directories(GMGPolarLib PUBLIC "${MUMPS_DIR}/libseq") + endif() - if(DEFINED ENV{METIS_DIR}) - set(METIS_DIR $ENV{METIS_DIR}) + set(MUMPS_FOUND TRUE) + endif() - if(EXISTS "${METIS_DIR}/include" AND EXISTS "${METIS_DIR}/lib") - set(METIS_INCLUDE_DIR "${METIS_DIR}/include") - set(METIS_LIBRARY_DIR "${METIS_DIR}/lib") - - target_include_directories(GMGPolarLib PUBLIC ${METIS_INCLUDE_DIR}) - target_link_directories(GMGPolarLib PUBLIC ${METIS_LIBRARY_DIR}) - set(METIS_FOUND TRUE) - endif() - endif() + if(MUMPS_FOUND) + target_link_libraries(GMGPolarLib PUBLIC + mumps_common + smumps + dmumps + mpiseq + ) + target_compile_definitions(GMGPolarLib PUBLIC GMGPOLAR_USE_MUMPS) + else() + message(SEND_ERROR "MUMPS not found") + endif() + endif() - if(MUMPS_FOUND) - target_link_libraries(GMGPolarLib PUBLIC - mumps_common - smumps - dmumps - mpiseq - ) - target_compile_definitions(GMGPolarLib PUBLIC GMGPOLAR_USE_MUMPS) - else() - message(SEND_ERROR "MUMPS not found") - endif() + if(DEFINED ENV{METIS_DIR}) + set(METIS_DIR $ENV{METIS_DIR}) - if(METIS_FOUND) - target_link_libraries(GMGPolarLib PUBLIC metis) - else() - message(SEND_ERROR "METIS not found") - endif() + if(EXISTS "${METIS_DIR}/include" AND EXISTS "${METIS_DIR}/lib") + set(METIS_INCLUDE_DIR "${METIS_DIR}/include") + set(METIS_LIBRARY_DIR "${METIS_DIR}/lib") + + target_include_directories(GMGPolarLib PUBLIC ${METIS_INCLUDE_DIR}) + target_link_directories(GMGPolarLib PUBLIC ${METIS_LIBRARY_DIR}) + set(METIS_FOUND TRUE) + endif() + + if(METIS_FOUND) + target_link_libraries(GMGPolarLib PUBLIC metis) + else() + message(SEND_ERROR "METIS not found") + endif() endif() endif() From 451218067f5abeb0f72d23f6aaa20de0bad2a075 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:09:53 +0100 Subject: [PATCH 45/50] Fix linkage --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 57f1454d..47cad7d8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,9 +7,10 @@ option(GMGPOLAR_USE_MUMPS "Use MUMPS to solve linear systems." OFF) option(GMGPOLAR_ENABLE_COVERAGE "Enable code coverage reporting (requires GCC/Clang)" OFF) if (${GMGPOLAR_USE_MUMPS}) + # MUMPS does not automatically provide Fortran libraries project(GMGPolar VERSION 2.0.0 LANGUAGES CXX Fortran) else() -project(GMGPolar VERSION 2.0.0 LANGUAGES CXX) + project(GMGPolar VERSION 2.0.0 LANGUAGES CXX) endif() set(CMAKE_CXX_STANDARD 20) From 1670731e42fbd83c669bc8fbaacce429f4679dd5 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:16:02 +0100 Subject: [PATCH 46/50] Try to fix artifact name --- .github/actions/test/action.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 6e01e2b8..ef91065a 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -20,7 +20,7 @@ runs: - name: Download build test directory uses: actions/download-artifact@v4 with: - name: ${{ inputs.build-artifact }} + name: ${{ inputs.build-artifact }}${{ inputs.use-mumps == 'true' && '-mumps' || ''}} - name: extract build archive shell: bash run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0bc75692..d4b5970f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/test with: - build-artifact: build-cpp-linux-gmgpolar${{ matrix.USE_MUMPS == 'true' && '-mumps' || ''}} + build-artifact: build-cpp-linux-gmgpolar use-mumps: ${{ matrix.USE_MUMPS }} codecov: From 6cb1271e0d83e3b505156d4ce94b739fce194e98 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:30:38 +0100 Subject: [PATCH 47/50] Get fortran --- .github/actions/test/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index ef91065a..556b0020 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -17,6 +17,10 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov + - name: Install MUMPS Dependencies + shell: bash + run: | + apt-get -qq -y install gfortran - name: Download build test directory uses: actions/download-artifact@v4 with: From fbdb20b0e4e262c11a886207891adcf2ab2f6918 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:45:34 +0100 Subject: [PATCH 48/50] Done testing --- .github/workflows/main.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d4b5970f..7f679fd5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,12 +11,11 @@ on : jobs: install-and-build: - #if: github.event.pull_request.draft == false + if: github.event.pull_request.draft == false runs-on: ubuntu-latest strategy: matrix: - #USE_MUMPS: [false, true] - USE_MUMPS: [true] + USE_MUMPS: [false, true] name: 'install-and-build (USE_MUMPS=${{matrix.USE_MUMPS}})' container: image: ghcr.io/gyselax/gyselalibxx_env:latest @@ -32,8 +31,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - #USE_MUMPS: [false, true] - USE_MUMPS: [true] + USE_MUMPS: [false, true] container: image: ghcr.io/gyselax/gyselalibxx_env:latest options: --user root From 115a8a146b350c87035131a26efe160c3bc3d4d8 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:46:03 +0100 Subject: [PATCH 49/50] Remove print --- .github/actions/build/action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 9b0da3db..a7d5bcb8 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -14,8 +14,6 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov - echo "${{ inputs.use-mumps }}" - echo "${{ inputs.use-mumps == 'true'}}" - name: Install MUMPS shell: bash if: inputs.use-mumps == 'true' From a2810d68e64cdf69e067006eea98587fae6d48e8 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 30 Oct 2025 14:46:42 +0100 Subject: [PATCH 50/50] Split for clean action --- .github/actions/build/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index a7d5bcb8..32147102 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -14,7 +14,7 @@ runs: run: | apt-get -qq update apt-get -qq -y install lcov - - name: Install MUMPS + - name: Install METIS shell: bash if: inputs.use-mumps == 'true' run: | @@ -27,8 +27,10 @@ runs: ls install/* echo "METIS_DIR=$(pwd)/install" >> $GITHUB_ENV echo "METIS_ROOT=$(pwd)/install" >> $GITHUB_ENV - export METIS_ROOT=$(pwd)/install - cd .. + - name: Install MUMPS + shell: bash + if: inputs.use-mumps == 'true' + run: | git clone -b v5.5.1.11 https://github.com/scivision/mumps.git cd mumps cmake -Bbuild -DBUILD_SINGLE=on -DBUILD_DOUBLE=on -Dmetis=on -Dopenmp=on -Dparallel=off -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DCMAKE_BUILD_TYPE=Release -S .