From 8ff89648e94dfeda025ba20828cdc1fcfe716574 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 13:44:41 -0500 Subject: [PATCH 01/16] Update cmake.yml --- .github/workflows/cmake.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8ed3d04ce..4673ffcbb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -13,6 +13,7 @@ jobs: compiler: [g++, clang++] kokkos: [on, off] mempool: [on, off] + mpi: [on, off] exclude: - kokkos: off mempool: on @@ -49,7 +50,7 @@ jobs: -Bbuild -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_VERBOSE_MAKEFILE=on - -DOmega_h_USE_MPI=off + -DOmega_h_USE_MPI=${{ matrix.mpi }} -DOmega_h_USE_Kokkos=${{ matrix.kokkos }} -DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install -DBUILD_TESTING=ON @@ -68,4 +69,4 @@ jobs: - name: Print if: always() - run: cat ${{github.workspace}}/omega_h/build/Testing/Temporary/LastTest.log \ No newline at end of file + run: cat ${{github.workspace}}/omega_h/build/Testing/Temporary/LastTest.log From 6444f09cd4403cbb5e881ab690e7698002bf3487 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 14:11:17 -0500 Subject: [PATCH 02/16] install mpich, set compilers --- .github/workflows/cmake.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4673ffcbb..0066243a5 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -29,6 +29,23 @@ jobs: repository: kokkos/kokkos path: kokkos + - name: install mpich + if: ${{ matrix.mpi == 'on' }} + run: | + sudo apt update + sudo apt install mpich + + - name: set mpi compiler wrapper + if: ${{ matrix.mpi == 'on' }} + run: | + echo "CXX=mpicxx" >> "$GITHUB_ENV" + echo "MPICH_CXX=${{matrix.compiler.CXX}}" >> "$GITHUB_ENV" + + - name: set base compiler + if: ${{ matrix.mpi == 'off' }} + run: | + echo "CXX=${{matrix.compiler.CXX}}" >> "$GITHUB_ENV" + - name: Configure Kokkos if: ${{ matrix.kokkos == 'on' }} shell: bash @@ -48,7 +65,7 @@ jobs: working-directory: ${{github.workspace}}/omega_h run: cmake . -Bbuild - -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} + -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_VERBOSE_MAKEFILE=on -DOmega_h_USE_MPI=${{ matrix.mpi }} -DOmega_h_USE_Kokkos=${{ matrix.kokkos }} From 0676e0432bcaef126fbcc9fd06181ed96c34373f Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 14:22:21 -0500 Subject: [PATCH 03/16] brackets? --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 0066243a5..381887e7f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -65,7 +65,7 @@ jobs: working-directory: ${{github.workspace}}/omega_h run: cmake . -Bbuild - -DCMAKE_CXX_COMPILER=$CXX + -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_VERBOSE_MAKEFILE=on -DOmega_h_USE_MPI=${{ matrix.mpi }} -DOmega_h_USE_Kokkos=${{ matrix.kokkos }} From 4f9379339c9e1f36a3598151b1fc6104509e8593 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 14:25:22 -0500 Subject: [PATCH 04/16] check env var --- .github/workflows/cmake.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 381887e7f..a3eec8e76 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -60,6 +60,10 @@ jobs: shell: bash run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install + - name: check env + run: + printf 'CXX = %s\n' "$CXX" + - name: Configure CMake shell: bash working-directory: ${{github.workspace}}/omega_h From 4e9b5a8ff426a8b170ab51fdbcea7a64ab2e8f23 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 14:28:48 -0500 Subject: [PATCH 05/16] add context --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a3eec8e76..deb3dde33 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -61,8 +61,8 @@ jobs: run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install - name: check env - run: - printf 'CXX = %s\n' "$CXX" + run: | + printf 'CXX = %s\n' "${{env.CXX}}" - name: Configure CMake shell: bash From aee42d730be35a7a2d30ee23e0523765ebc7521c Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 14:33:02 -0500 Subject: [PATCH 06/16] define job env var --- .github/workflows/cmake.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index deb3dde33..4152f292f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -18,6 +18,10 @@ jobs: - kokkos: off mempool: on + env: + CXX: ${{matrix.compiler.CXX}} + MPICH_CXX: ${{matrix.compiler.CXX}} + steps: - uses: actions/checkout@v4 with: @@ -38,13 +42,9 @@ jobs: - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | + echo "0.1 CXX = ${{env.CXX}}" echo "CXX=mpicxx" >> "$GITHUB_ENV" - echo "MPICH_CXX=${{matrix.compiler.CXX}}" >> "$GITHUB_ENV" - - - name: set base compiler - if: ${{ matrix.mpi == 'off' }} - run: | - echo "CXX=${{matrix.compiler.CXX}}" >> "$GITHUB_ENV" + echo "0.2 CXX = ${{env.CXX}}" - name: Configure Kokkos if: ${{ matrix.kokkos == 'on' }} @@ -59,11 +59,7 @@ jobs: if: ${{ matrix.kokkos == 'on' }} shell: bash run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install - - - name: check env - run: | - printf 'CXX = %s\n' "${{env.CXX}}" - + - name: Configure CMake shell: bash working-directory: ${{github.workspace}}/omega_h From 2055535803d40cdabcfcc8d0ab5154c242e98996 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 14:35:54 -0500 Subject: [PATCH 07/16] print --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4152f292f..b464b8b50 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -42,9 +42,9 @@ jobs: - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | - echo "0.1 CXX = ${{env.CXX}}" + printf "0.1 %s\n" "${{env.CXX}}" echo "CXX=mpicxx" >> "$GITHUB_ENV" - echo "0.2 CXX = ${{env.CXX}}" + printf "0.2 %s\n" "${{env.CXX}}" - name: Configure Kokkos if: ${{ matrix.kokkos == 'on' }} From d83b53d5736bd45c84df318795b7d9d7fb429c4c Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 14:40:31 -0500 Subject: [PATCH 08/16] simplify for debugging --- .github/workflows/cmake.yml | 58 ------------------------------------- 1 file changed, 58 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index b464b8b50..f72b511ab 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -23,67 +23,9 @@ jobs: MPICH_CXX: ${{matrix.compiler.CXX}} steps: - - uses: actions/checkout@v4 - with: - path: omega_h - - - uses: actions/checkout@v4 - if: ${{ matrix.kokkos == 'on' }} - with: - repository: kokkos/kokkos - path: kokkos - - - name: install mpich - if: ${{ matrix.mpi == 'on' }} - run: | - sudo apt update - sudo apt install mpich - - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | printf "0.1 %s\n" "${{env.CXX}}" echo "CXX=mpicxx" >> "$GITHUB_ENV" printf "0.2 %s\n" "${{env.CXX}}" - - - name: Configure Kokkos - if: ${{ matrix.kokkos == 'on' }} - shell: bash - working-directory: ${{github.workspace}}/kokkos - run: cmake . - -Bbuild - -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} - -DCMAKE_INSTALL_PREFIX=build/install - - - name: Build Kokkos - if: ${{ matrix.kokkos == 'on' }} - shell: bash - run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install - - - name: Configure CMake - shell: bash - working-directory: ${{github.workspace}}/omega_h - run: cmake . - -Bbuild - -DCMAKE_CXX_COMPILER=${CXX} - -DCMAKE_VERBOSE_MAKEFILE=on - -DOmega_h_USE_MPI=${{ matrix.mpi }} - -DOmega_h_USE_Kokkos=${{ matrix.kokkos }} - -DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install - -DBUILD_TESTING=ON - -DBUILD_SHARED_LIBS=OFF - -DENABLE_CTEST_MEMPOOL=${{ matrix.mempool }} - - - name: Build - working-directory: ${{github.workspace}}/omega_h/build - shell: bash - run: cmake --build . -j2 - - - name: Test - working-directory: ${{github.workspace}}/omega_h/build - shell: bash - run: ctest - - - name: Print - if: always() - run: cat ${{github.workspace}}/omega_h/build/Testing/Temporary/LastTest.log From a7d3d40f75bff7c3185270b4783a46bc8468b02d Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 15:24:42 -0500 Subject: [PATCH 09/16] debug --- .github/workflows/cmake.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f72b511ab..805a5a556 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,12 +11,7 @@ jobs: strategy: matrix: compiler: [g++, clang++] - kokkos: [on, off] - mempool: [on, off] mpi: [on, off] - exclude: - - kokkos: off - mempool: on env: CXX: ${{matrix.compiler.CXX}} @@ -26,6 +21,8 @@ jobs: - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | - printf "0.1 %s\n" "${{env.CXX}}" + env + printf "0.1 %s\n" "$CXX" echo "CXX=mpicxx" >> "$GITHUB_ENV" - printf "0.2 %s\n" "${{env.CXX}}" + printf "0.2 %s\n" "$CXX" + env From 3b43bece8fb8586b6d1dc826fe582170831ea915 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 15:33:08 -0500 Subject: [PATCH 10/16] debug --- .github/workflows/cmake.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 805a5a556..dc2dd069d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -14,6 +14,7 @@ jobs: mpi: [on, off] env: + compiler: foobar CXX: ${{matrix.compiler.CXX}} MPICH_CXX: ${{matrix.compiler.CXX}} @@ -22,7 +23,7 @@ jobs: if: ${{ matrix.mpi == 'on' }} run: | env - printf "0.1 %s\n" "$CXX" + printf "0.1 %s %s\n" "$CXX" "$compiler" echo "CXX=mpicxx" >> "$GITHUB_ENV" printf "0.2 %s\n" "$CXX" env From 63f2066526c14ba172dbf943153834f8276abcbc Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 15:36:56 -0500 Subject: [PATCH 11/16] matrix.compiler.cxx does not exist --- .github/workflows/cmake.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index dc2dd069d..85c231be0 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -14,16 +14,15 @@ jobs: mpi: [on, off] env: - compiler: foobar - CXX: ${{matrix.compiler.CXX}} - MPICH_CXX: ${{matrix.compiler.CXX}} + CXX: ${{matrix.compiler}} + MPICH_CXX: ${{matrix.compiler}} steps: - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | env - printf "0.1 %s %s\n" "$CXX" "$compiler" + printf "0.1 %s\n" "$CXX" echo "CXX=mpicxx" >> "$GITHUB_ENV" printf "0.2 %s\n" "$CXX" env From a51e47333a601baa7e6fb412da56a928ac6e8f68 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 15:39:00 -0500 Subject: [PATCH 12/16] try export --- .github/workflows/cmake.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 85c231be0..f245735d5 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -23,6 +23,11 @@ jobs: run: | env printf "0.1 %s\n" "$CXX" - echo "CXX=mpicxx" >> "$GITHUB_ENV" + export CXX=mpicxx printf "0.2 %s\n" "$CXX" env + + - name: check env + run: | + env + printf "0.3 %s\n" "$CXX" From fc22892cbf117cf6de301a183737d60debc83948 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 15:45:30 -0500 Subject: [PATCH 13/16] no quotes on GITHUB_ENV --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f245735d5..92ce0dff2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -23,7 +23,7 @@ jobs: run: | env printf "0.1 %s\n" "$CXX" - export CXX=mpicxx + echo "CXX=mpicxx" >> $GITHUB_ENV printf "0.2 %s\n" "$CXX" env From 4434f33a8553f2719c87e525d7e28edeeed23109 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 15:50:32 -0500 Subject: [PATCH 14/16] restore yaml --- .github/workflows/cmake.yml | 63 ++++++++++++++++++++++++++++++++----- 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 92ce0dff2..19b08ec41 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,23 +11,72 @@ jobs: strategy: matrix: compiler: [g++, clang++] - mpi: [on, off] + kokkos: [on, off] + mempool: [on, off] + exclude: + - kokkos: off + mempool: on env: CXX: ${{matrix.compiler}} MPICH_CXX: ${{matrix.compiler}} steps: + - uses: actions/checkout@v4 + with: + path: omega_h + + - uses: actions/checkout@v4 + if: ${{ matrix.kokkos == 'on' }} + with: + repository: kokkos/kokkos + path: kokkos + - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | - env printf "0.1 %s\n" "$CXX" echo "CXX=mpicxx" >> $GITHUB_ENV printf "0.2 %s\n" "$CXX" - env - - name: check env - run: | - env - printf "0.3 %s\n" "$CXX" + - name: Configure Kokkos + if: ${{ matrix.kokkos == 'on' }} + shell: bash + working-directory: ${{github.workspace}}/kokkos + run: cmake . + -Bbuild + -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} + -DCMAKE_INSTALL_PREFIX=build/install + + - name: Build Kokkos + if: ${{ matrix.kokkos == 'on' }} + shell: bash + run: cmake --build $GITHUB_WORKSPACE/kokkos/build --target install + + - name: Configure CMake + shell: bash + working-directory: ${{github.workspace}}/omega_h + run: cmake . + -Bbuild + -DCMAKE_CXX_COMPILER=$CXX + -DCMAKE_VERBOSE_MAKEFILE=on + -DOmega_h_USE_MPI=${{ matrix.mpi }} + -DOmega_h_USE_Kokkos=${{ matrix.kokkos }} + -DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install + -DBUILD_TESTING=ON + -DBUILD_SHARED_LIBS=OFF + -DENABLE_CTEST_MEMPOOL=${{ matrix.mempool }} + + - name: Build + working-directory: ${{github.workspace}}/omega_h/build + shell: bash + run: cmake --build . -j2 + + - name: Test + working-directory: ${{github.workspace}}/omega_h/build + shell: bash + run: ctest + + - name: Print + if: always() + run: cat ${{github.workspace}}/omega_h/build/Testing/Temporary/LastTest.log From adb5e8402c52d9bf8011f524428f9f4150fe4115 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 16:12:56 -0500 Subject: [PATCH 15/16] install mpich, mpi matrix --- .github/workflows/cmake.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 19b08ec41..dbfb43eba 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: compiler: [g++, clang++] + mpi: [on, off] kokkos: [on, off] mempool: [on, off] exclude: @@ -32,6 +33,12 @@ jobs: repository: kokkos/kokkos path: kokkos + - name: install mpich + if: ${{ matrix.mpi == 'on' }} + run: | + sudo apt update + sudo apt install mpich + - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | From 50268e505ce95c0fab11a96ef147021fbf140194 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 16:20:45 -0500 Subject: [PATCH 16/16] remove debug prints --- .github/workflows/cmake.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index dbfb43eba..51055e631 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -42,9 +42,7 @@ jobs: - name: set mpi compiler wrapper if: ${{ matrix.mpi == 'on' }} run: | - printf "0.1 %s\n" "$CXX" echo "CXX=mpicxx" >> $GITHUB_ENV - printf "0.2 %s\n" "$CXX" - name: Configure Kokkos if: ${{ matrix.kokkos == 'on' }}