Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
12a4c7a
First test towards CLANG ci workflow
spenke91 Dec 18, 2025
1ef437e
Try again
spenke91 Dec 18, 2025
d8dfa80
Try again
spenke91 Dec 18, 2025
1d12859
Trigger [run ci]
spenke91 Dec 18, 2025
5aebc56
Trigger [run ci]
spenke91 Dec 18, 2025
bb6d163
Trigger [run ci]
spenke91 Dec 18, 2025
3c903b9
Trigger [run ci]
spenke91 Dec 18, 2025
d2c2c9a
Trigger [run ci]
spenke91 Dec 18, 2025
e017db6
Trigger [run ci]
spenke91 Dec 18, 2025
2c3e723
Trigger [run ci]
spenke91 Dec 18, 2025
70c9fce
Trigger [run ci]
spenke91 Dec 18, 2025
99017c3
Trigger [run ci]
spenke91 Dec 18, 2025
f185834
Trigger [run ci]
spenke91 Dec 18, 2025
14abfd8
Trigger [run ci]
spenke91 Dec 18, 2025
44c369e
Trigger [run ci]
spenke91 Dec 18, 2025
461ceea
Trigger [run ci]
spenke91 Dec 18, 2025
87da1e4
Trigger [run ci]
spenke91 Dec 18, 2025
5a76005
Trigger [run ci]
spenke91 Dec 18, 2025
9305ce5
Trigger [run ci]
spenke91 Dec 18, 2025
d8a3d3b
Trigger [run ci]
spenke91 Dec 18, 2025
12acf57
Trigger [run ci]
spenke91 Dec 18, 2025
d2ca2d3
Trigger [run ci]
spenke91 Dec 18, 2025
a82a9f2
Trigger [run ci]
spenke91 Dec 18, 2025
4d853ac
Trigger [run ci]
spenke91 Dec 18, 2025
58fde70
Trigger [run ci]
spenke91 Dec 18, 2025
762b6a5
Trigger [run ci]
spenke91 Dec 18, 2025
3f4daba
Trigger [run ci]
spenke91 Dec 18, 2025
08f9fc1
Trigger [run ci]
spenke91 Dec 18, 2025
f2d002d
Trigger [run ci]
spenke91 Dec 18, 2025
55a103b
Trigger [run ci]
spenke91 Dec 18, 2025
4224c50
Trigger [run ci]
spenke91 Dec 18, 2025
fa1f9bb
Trigger [run ci]
spenke91 Dec 18, 2025
5da01e0
Trigger [run ci]
spenke91 Dec 18, 2025
8f42823
Trigger [run ci]
spenke91 Dec 18, 2025
14f0231
Trigger [run ci]
spenke91 Dec 18, 2025
9dfbe5f
Trigger [run ci]
spenke91 Dec 18, 2025
4a6fea1
Trigger [run ci]
spenke91 Dec 18, 2025
04976c2
Trigger [run ci]
spenke91 Dec 18, 2025
80afe9f
Trigger [run ci]
spenke91 Dec 18, 2025
d6475a1
Trigger [run ci]
spenke91 Dec 18, 2025
99a2ee6
Trigger [run ci]
spenke91 Dec 18, 2025
2b0520b
Trigger [run ci]
spenke91 Dec 19, 2025
50b91b9
Trigger [run ci]
spenke91 Dec 19, 2025
cef4719
Trigger [run ci]
spenke91 Dec 19, 2025
4545ac5
Merge remote-tracking branch 'origin/main' into ft_github_clang
spenke91 Jan 5, 2026
8e17415
Try fixing stalling MPI issue
spenke91 Jan 5, 2026
b943593
Trigger [run ci]
spenke91 Jan 5, 2026
782f170
Use new docker image t8-clang-dependencies [run ci]
spenke91 Jan 5, 2026
202a2c3
Add self-compiled openmpi version to PATH [run ci]
spenke91 Jan 5, 2026
2cdcf1f
Install cmake [run ci]
spenke91 Jan 5, 2026
2fec6f7
Install ninja-build [run ci]
spenke91 Jan 5, 2026
6ceba13
Some cleanup [run ci]
spenke91 Jan 5, 2026
2d27ec9
Added some documentation [run ci]
spenke91 Jan 6, 2026
a3a4067
Merge remote-tracking branch 'origin/main' into ft_github_clang
spenke91 Jan 6, 2026
40f72cb
Adjusted to new workflow names
spenke91 Jan 6, 2026
2deb920
Trigger CI [run ci]
spenke91 Jan 6, 2026
7956f38
Introduced some sanity checks [run ci]
spenke91 Jan 6, 2026
7b5d55c
Fix mpi paths in cmake command [run ci]
spenke91 Jan 6, 2026
c25cac8
Add openmpi to path [run ci]
spenke91 Jan 6, 2026
5d62e2c
Test more stuff [run ci]
spenke91 Jan 6, 2026
2c838fc
Use updated docker image [run ci]
spenke91 Jan 6, 2026
653c9c6
Try exporting paths [run ci]
spenke91 Jan 6, 2026
e188a83
Install ggc between build and testing to make gtests work (hopefully)…
spenke91 Jan 6, 2026
f19b8af
Adjust to latest version of docker image [run ci]
spenke91 Jan 6, 2026
1e4593c
Reactivate other CI workflows
spenke91 Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions .github/workflows/test_t8code_w_clang_and_ompi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: CMake tests t8code with Clang compiler and OpenMPI


# This file is part of t8code.
# t8code is a C library to manage a collection (a forest) of multiple
# connected adaptive space-trees of general element types in parallel.
#
# Copyright (C) 2025 the developers
#
# t8code is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# t8code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with t8code; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# This workflow checks whether building and testing works with the Clang compiler
# and openmpi. It was added because all of t8code's remaining CI workflows rely
# on gcc and mpich, hence missing Clang- or openmpi-specific issues.
# To reduce runtime, (for now) only Debug mode with MPI is tested; also, no external
# libraries like VTK, OpenCASCADE etc. are covered.

env:
DEBUG_CONFIG: "-O1"

on:
workflow_call:
# Note: To simplify adding more configurations of this workflow later, the MPI mode and the BUILD_TYPE
# are passed as input.
inputs:
MAKEFLAGS:
required: true
type: string
description: 'Make flags to use for compilation (like -j4)'
MPI:
required: true
type: string
description: 'Use MPI for compilation (ON/OFF)'
BUILD_TYPE:
required: true
type: string
description: 'Build type (Release/Debug)'
TEST_LEVEL:
required: true
type: string
description: 'Test level used for configuring (T8_TEST_LEVEL_FULL, T8_TEST_LEVEL_MEDIUM, or T8_TEST_LEVEL_BASIC)'
default: 'T8_TEST_LEVEL_FULL'

jobs:
t8code_cmake_tests:
#
# Container setup: To avoid unwanted side effects of gcc or mpich, an own Clang version of the
# t8-dependencies Docker image is used. Aside from some basic packages, it contains a manually built
# Clang version of OpenMPI.
timeout-minutes: 60
runs-on: ubuntu-latest
container: dlramr/t8code-ubuntu:t8-clang-dependencies
steps:
#
# Part 1: Preparation and sanity checks
# -------------------------------------
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Update packages
run: apt-get update && apt-get upgrade -y
- name: Show Clang version
run: clang --version
- name: Make sure MPI was built with CLANG
# Note: If "clang" is not found (or "gcc" is), the workflow is exited due to fail-early mode
run: |
mpicc --version > mpi_version_output
cat mpi_version_output
grep -i "clang" mpi_version_output
! grep -i "gcc" mpi_version_output
rm mpi_version_output
echo "CHECKED: MPI was built with Clang."
- name: Assert correct MPI paths
run: |
mpicc --showme:compile | grep "${OMPI_INSTALL_PATH}"
mpicc --showme:link | grep "${OMPI_INSTALL_PATH}"
mpicxx --showme:compile | grep "${OMPI_INSTALL_PATH}"
mpicxx --showme:link | grep "${OMPI_INSTALL_PATH}"
echo "CHECKED: mpicc and mpicxx point to correct path"
# This seems to be necessary because of the docker container
- name: disable ownership checks
run: git config --global --add safe.directory '*'
- name: init submodules
run: git submodule init
- name: update submodules
run: git submodule update
- name: Get input vars
run: export MAKEFLAGS="${{ inputs.MAKEFLAGS }}"
&& export MPI="${{ inputs.MPI }}"
&& export BUILD_TYPE="${{ inputs.BUILD_TYPE }}"
&& echo MAKEFLAGS="$MAKEFLAGS" >> $GITHUB_ENV
&& echo MPI="$MPI" >> $GITHUB_ENV
&& echo BUILD_TYPE="$BUILD_TYPE" >> $GITHUB_ENV
#
# Part 2: Build t8code
# --------------------
# Define build config
- name: Set test level
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="-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx ${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=OFF -DT8CODE_BUILD_WEXTRA=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
# Run cmake
- name: echo cmake line
run: echo cmake ../ $CONFIG_OPTIONS
- name: cmake
run: mkdir build && cd build && cmake ../ $CONFIG_OPTIONS
# On failure, upload logs
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v5
with:
name: cmake_w_clang_and_ompi_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}.log
path: build/CMakeFiles/CMakeOutput.log
# Build with ninja
- name: ninja
run: cd build && ninja $MAKEFLAGS
- name: ninja install
run: cd build && ninja install $MAKEFLAGS
#
# Part 3: Run t8code tests
# ------------------------
- name: serial tests (if MPI is enabled)
run: cd build && ctest $MAKEFLAGS -R _serial
if: ${{ inputs.MPI == 'ON' }}
- name: parallel tests (if MPI is enabled)
run: cd build && ctest -R _parallel
env:
# Note: These openmpi options are required to ensure stable runs in github workflows and avoid stalling.
# In particular, they activate oversubscription and define the communication channels, here tcp (and self).
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_rmaps_base_oversubscribe: 1
OMPI_MCA_btl: self,tcp
OMPI_MCA_pml: ob1
if: ${{ inputs.MPI == 'ON' }}
- name: tests (if MPI is disabled)
run: cd build && ctest $MAKEFLAGS
if: ${{ inputs.MPI == 'OFF' }}
# On failure, upload logs
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v5
with:
name: test-suite_w_clang_and_ompi_${{ inputs.BUILD_TYPE }}_MPI_${{ inputs.MPI }}.log
path: build/Testing/Temporary/LastTest.log
22 changes: 22 additions & 0 deletions .github/workflows/testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,28 @@ jobs:
BUILD_TYPE: Debug
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.

# Check t8code building and testing with the Clang compiler and openmpi.
# Note: This workflow is meant to detect Clang- or openmpi-specific issues missed by the remaining (gcc- and mpich-based) workflows.
# To reduce its runtime, it currently only used Debug mode with MPI on and does not link to external libraries like VTK or OpenCASCADE.
t8code_w_clang_and_ompi_tests:
needs: fine_grained_trigger
secrets: inherit
if: ${{ needs.fine_grained_trigger.outputs.run_ci == 'true' }}
uses: ./.github/workflows/test_t8code_w_clang_and_ompi.yml
strategy:
fail-fast: false
matrix:
MPI: [ON]
BUILD_TYPE: [Debug]
include:
- MAKEFLAGS: -j4
with:
MAKEFLAGS: ${{ matrix.MAKEFLAGS }}
MPI: ${{ matrix.MPI }}
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.

# Build doxygen documentation and check for errors / warnings.
t8code_doxygen_check:
uses: ./.github/workflows/check_doxygen.yml

Expand Down