From 786f212aa653a1f9cb538dca647bcf4b49905d3b Mon Sep 17 00:00:00 2001 From: Lena Ploetzke Date: Wed, 19 Aug 2026 12:48:00 +0200 Subject: [PATCH 1/2] Add mesh handle config to correct workflows --- .github/workflows/test_t8code.yml | 10 ++++++++-- .github/workflows/test_t8code_api.yml | 2 +- .github/workflows/test_t8code_w_shipped_submodules.yml | 8 ++++++-- .github/workflows/testsuite.yml | 2 +- test/mesh_handle/competences/t8_gtest_handle_data.cxx | 5 ----- test/mesh_handle/t8_gtest_ghost.cxx | 8 ++------ 6 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test_t8code.yml b/.github/workflows/test_t8code.yml index 05f4cd8402..a27bb9df2d 100644 --- a/.github/workflows/test_t8code.yml +++ b/.github/workflows/test_t8code.yml @@ -82,8 +82,14 @@ jobs: run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" - && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV + run: | + export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} \ + -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON \ + -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON \ + -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ + -DT8CODE_BUILD_MESH_HANDLE=ON -DSC_DIR=$SC_PATH/install/cmake \ + -DP4EST_DIR=$P4EST_PATH/install/cmake" + echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV # cmake and test - name: Printing MPI compiler info run: mpicc --version && mpirun --version diff --git a/.github/workflows/test_t8code_api.yml b/.github/workflows/test_t8code_api.yml index 0a83e82c19..48b08af9d6 100644 --- a/.github/workflows/test_t8code_api.yml +++ b/.github/workflows/test_t8code_api.yml @@ -84,7 +84,7 @@ jobs: run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_FORTRAN_INTERFACE=ON -DT8CODE_BUILD_MESH_HANDLE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" + run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_FORTRAN_INTERFACE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake" && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV # cmake and test with api options - name: echo cmake line diff --git a/.github/workflows/test_t8code_w_shipped_submodules.yml b/.github/workflows/test_t8code_w_shipped_submodules.yml index 228268beaf..769c11d064 100644 --- a/.github/workflows/test_t8code_w_shipped_submodules.yml +++ b/.github/workflows/test_t8code_w_shipped_submodules.yml @@ -75,8 +75,12 @@ jobs: run: export TEST_LEVEL_FLAG="-DT8CODE_TEST_LEVEL=${{ inputs.TEST_LEVEL }}" && echo TEST_LEVEL_FLAG="$TEST_LEVEL_FLAG" >> $GITHUB_ENV - name: build config variables - run: export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE" - && echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV + run: | + export CONFIG_OPTIONS="${TEST_LEVEL_FLAG} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} \ + -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_MESH_HANDLE=ON -DT8CODE_BUILD_PEDANTIC=ON \ + -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI \ + -DCMAKE_BUILD_TYPE=$BUILD_TYPE" + echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV # cmake and test - name: Printing MPI compiler info run: mpicc --version && mpirun --version diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 92c72c8853..8a98d09b69 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -171,7 +171,7 @@ jobs: BUILD_TYPE: ${{ matrix.BUILD_TYPE }} TEST_LEVEL: ${{ github.event_name == 'pull_request' && 'T8_TEST_LEVEL_MEDIUM' || 'T8_TEST_LEVEL_FULL' }} # Set TEST_LEVEL to medium if the event is a PR, otherwise full. - # Run t8code linkage tests with and without MPI and in serial and debug mode + # Run t8code api tests only with MPI and in serial and debug mode t8code_api_tests: needs: preparation uses: ./.github/workflows/test_t8code_api.yml diff --git a/test/mesh_handle/competences/t8_gtest_handle_data.cxx b/test/mesh_handle/competences/t8_gtest_handle_data.cxx index cfb8b60b44..f25243ce5b 100644 --- a/test/mesh_handle/competences/t8_gtest_handle_data.cxx +++ b/test/mesh_handle/competences/t8_gtest_handle_data.cxx @@ -52,11 +52,6 @@ TEST (t8_gtest_handle_data, set_and_get_element_data) auto mesh = t8_mesh_handle::handle_hypercube_hybrid_uniform_default (level, sc_MPI_COMM_WORLD, true, false); - if ((mesh->get_dimension () > 1) && (mesh->get_num_local_elements () > 1)) { - // Ensure that we actually test with ghost elements. - EXPECT_GT (mesh->get_num_ghosts (), 0); - } - // Create element data for all local mesh elements. std::vector element_data; for (const auto &elem : *mesh) { diff --git a/test/mesh_handle/t8_gtest_ghost.cxx b/test/mesh_handle/t8_gtest_ghost.cxx index f75c61cdbf..53c7e24fcb 100644 --- a/test/mesh_handle/t8_gtest_ghost.cxx +++ b/test/mesh_handle/t8_gtest_ghost.cxx @@ -67,12 +67,8 @@ TEST_P (t8_mesh_ghost_test, check_ghosts) mesh->set_ghost (); mesh->commit (); EXPECT_EQ (mesh->get_num_ghosts (), t8_forest_get_num_ghosts (mesh->get_forest ())); - if ((mesh->get_dimension () > 1) && (mesh->get_num_local_elements () > 1)) { - // Ensure that we actually have ghost elements in this test. - EXPECT_GT (mesh->get_num_ghosts (), 0); - } - else { - GTEST_SKIP () << "Skipping test as no ghost elements are created for 1D or single element meshes."; + if (!(mesh->get_num_ghosts () > 0)) { + GTEST_SKIP () << "Skipping test as no ghost elements are created."; } // Check functions for ghost elements. From 480e1f2220296a2dd3eaff0002eb247a95db7bd5 Mon Sep 17 00:00:00 2001 From: Lena Ploetzke Date: Wed, 19 Aug 2026 14:25:20 +0200 Subject: [PATCH 2/2] Remove assertion for ghosts --- test/mesh_handle/competences/t8_gtest_dg_competences.cxx | 6 +++--- test/mesh_handle/t8_gtest_ghost.cxx | 4 ---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/test/mesh_handle/competences/t8_gtest_dg_competences.cxx b/test/mesh_handle/competences/t8_gtest_dg_competences.cxx index 3a9c3a73b3..1556a20f9d 100644 --- a/test/mesh_handle/competences/t8_gtest_dg_competences.cxx +++ b/test/mesh_handle/competences/t8_gtest_dg_competences.cxx @@ -77,9 +77,9 @@ TEST (t8_gtest_dg_competences, remote_ranks) const t8_locidx_t num_local = mesh->get_num_local_elements (); const t8_locidx_t num_ghosts = mesh->get_num_ghosts (); - if ((mesh->get_dimension () > 1) && (num_local > 1)) { - // Ensure that we actually test with ghost elements. - ASSERT_GT (num_ghosts, 0); + // Test does not make sense without ghosts. + if (!(num_ghosts > 0)) { + GTEST_SKIP () << "Skipping test as no ghost elements are created."; } int mpirank; diff --git a/test/mesh_handle/t8_gtest_ghost.cxx b/test/mesh_handle/t8_gtest_ghost.cxx index 53c7e24fcb..1d35f5cfdb 100644 --- a/test/mesh_handle/t8_gtest_ghost.cxx +++ b/test/mesh_handle/t8_gtest_ghost.cxx @@ -117,10 +117,6 @@ TEST_P (t8_mesh_ghost_test, compare_neighbors_to_forest) const t8_mesh_handle::mesh<> mesh (forest); EXPECT_EQ (mesh.get_num_ghosts (), t8_forest_get_num_ghosts (forest)); - if ((mesh.get_dimension () > 1) && (mesh.get_num_local_elements () > 1)) { - // Ensure that we have ghost elements in this test. - EXPECT_GT (mesh.get_num_ghosts (), 0); - } // Iterate over the elements of the forest and of the mesh handle simultaneously and compare results. auto mesh_iterator = mesh.cbegin ();