Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/add_release_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
# This step is necessary to get the newest package data
- name: checkout
if: ${{ env.MINOR_RELEASE == 'true' }}
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: t8code
fetch-tags: true
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
# upload documentation
- name: Checkout t8code-website repo
if: ${{ env.MINOR_RELEASE == 'true' }}
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
repository: DLR-AMR/t8code-website
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_cmake_tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
#
# Setup and bootstrap
#
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-tags: true # required to get version tags
fetch-depth: 0 # required to get all history, especially the version tags
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
timeout-minutes: 90
steps:
- name: Download tarball
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: tarballs
path: tarballs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_indentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-tags: true # required to get version tags
fetch-depth: 0 # required to get all history, especially the version tags
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
# Setup
#
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: SC_P4EST_MPI_${{ inputs.MPI }}
- name: untar artifact
Expand Down Expand Up @@ -91,7 +91,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} -DT8CODE_CODE_COVERAGE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=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} -DT8CODE_CODE_COVERAGE=ON -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DT8CODE_BUILD_FORTRAN_INTERFACE=ON -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake -DT8CODE_BUILD_BENCHMARKS=OFF -DT8CODE_BUILD_DOCUMENTATION=OFF -DT8CODE_BUILD_EXAMPLES=OFF -DT8CODE_BUILD_TUTORIALS=OFF"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
# cmake
- name: echo cmake line
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/move_card.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ jobs:

evaluate_pr:
runs-on: ubuntu-latest
# Don't run in parallel on the same PR. Otherwise multiple issues might be created for the same PR.
concurrency:
group: pr-move-card-${{ github.event.pull_request.id }}
outputs:
NUMBER_IS_SET: ${{ steps.get_pr_issue_link.outputs.NUMBER_IS_SET }}
CLEAN_ISSUE_NUMBER: ${{ steps.get_pr_issue_link.outputs.CLEAN_ISSUE_NUMBER }}
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/quick_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ jobs:
outputs:
ISSUE_NUMBER: ${{ steps.create_issue_and_output_number.outputs.ISSUE_NUMBER }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
repository: ${{ github.event.repository.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: "Set up environment"
run: echo "GITHUB_TOKEN=${{ secrets.PAT }}" >> $GITHUB_ENV
run: echo "GH_TOKEN=${{ secrets.PAT }}" >> $GITHUB_ENV

- name: "Create Issue"
id: create_issue_and_output_number
Expand All @@ -69,12 +67,21 @@ jobs:
# Create the new issue. Use the DEFAULT_PROJECT to directly add it to the project.
# Letting GH add the Issue to the project by automatization can lead to a delay,
# and the following worfkflows will try to move a card that doesn't exist yet.
new_issue_url=$(gh issue create \
--title "$TITLE" \
--assignee "$AUTHOR" \
--body "$ISSUE_BODY" \
--project "${{ inputs.DEFAULT_PROJECT }}"
)
# Only assign the issue if the author is not a bot
if [[ "$AUTHOR" == *"[bot]"* ]]; then
new_issue_url=$(gh issue create \
--title "$TITLE" \
--body "$ISSUE_BODY" \
--project "${{ inputs.DEFAULT_PROJECT }}"
)
else
new_issue_url=$(gh issue create \
--title "$TITLE" \
--assignee "$AUTHOR" \
--body "$ISSUE_BODY" \
--project "${{ inputs.DEFAULT_PROJECT }}"
)
fi
echo "new_issue_url=$new_issue_url"
# Extract the issue number from the URL.
# The URL is in the format https://github.com/orga-name/repo-name/issues/issues_number
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Check spelling
uses: crate-ci/typos@master
- name: check macros
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_preparation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
#
# Setup
#
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Update packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_sc_p4est.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
# Setup
#
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: SC_P4EST_MPI_${{ inputs.MPI }}
- name: untar artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Setup
#
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: SC_P4EST_MPI_${{ inputs.MPI }}
- name: untar artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Setup
#
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: SC_P4EST_MPI_${{ inputs.MPI }}
- name: untar artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code_linkage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Setup
#
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: SC_P4EST_MPI_${{ inputs.MPI }}
- name: untar artifact
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
#
# Setup
#
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Update packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_testsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
outputs:
run_ci: ${{ steps.set_run_ci.outputs.RUN_CI }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_cmake_valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
# Setup
#
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
name: SC_P4EST_MPI_${{ inputs.MPI }}
- name: untar artifact
Expand Down Expand Up @@ -86,7 +86,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 -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=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 -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake -DT8CODE_BUILD_FORTRAN_INTERFACE=ON"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
# cmake
- name: echo cmake line
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
#
# Setup and bootstrap
#
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-tags: true # required to get version tags
fetch-depth: 0 # required to get all history, especially the version tags
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

# upload documentation
- name: Checkout t8code-website repo
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
ref: ${{ github.head_ref }}
repository: DLR-AMR/t8code-website
Expand Down
65 changes: 65 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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.

# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
apt_packages:
- cmake
jobs:
post_checkout:
# Fetch all tags to ensure we can build documentation for any version
# The tags are needed to determine the version number of the documentation
- git fetch --unshallow --tags || true
post_install:
- bash ./scripts/configure_for_rtd.sh

# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "doc/" directory with Sphinx
sphinx:
configuration: doc/source/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: doc/requirements.txt
47 changes: 42 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ elseif(T8CODE_TEST_LEVEL STREQUAL "T8_TEST_LEVEL_MEDIUM" )
set(T8_TEST_LEVEL_INT 1)
elseif(T8CODE_TEST_LEVEL STREQUAL "T8_TEST_LEVEL_FULL" )
set(T8_TEST_LEVEL_INT 0)
else()
else()
message( FATAL_ERROR "Invalid string for T8CODE_TEST_LEVEL: ${T8CODE_TEST_LEVEL}. Valid options are T8_TEST_LEVEL_FULL, T8_TEST_LEVEL_MEDIUM, or T8_TEST_LEVEL_BASIC.")
endif()

Expand Down Expand Up @@ -131,11 +131,11 @@ if( T8CODE_ENABLE_OCC )
endif( T8CODE_ENABLE_OCC )

if( T8CODE_ENABLE_NETCDF )
find_package( netCDF REQUIRED )
if(netCDF_FOUND)
message("Found netCDF")
find_package( NetCDF REQUIRED )
if(NetCDF_FOUND)
message("Found NetCDF")
include(cmake/CheckNetCDFPar.cmake)
endif (netCDF_FOUND)
endif (NetCDF_FOUND)
endif( T8CODE_ENABLE_NETCDF )

# Override default for this libsc option
Expand All @@ -162,7 +162,10 @@ else()

# Capture the list of variables before adding the subdirectory to mark the added ones as advanced.
get_cmake_property(_vars_before_sc VARIABLES )
list( APPEND CMAKE_MESSAGE_CONTEXT "sc" )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/sc )
list( POP_BACK CMAKE_MESSAGE_CONTEXT )
add_library(SC INTERFACE)
# Capture the list of variables after adding the subdirectory
get_cmake_property(_vars_after_sc VARIABLES )
# Compute the difference (new variables added by the subdirectory)
Expand All @@ -175,6 +178,38 @@ else()

# Mark the new variables as advanced
mark_as_advanced( FORCE ${_new_sc_vars} )

########################## Fix for OpenMPI ############################################
# OpenMPI sometimes has a mismatch between their C and CXX interface which produces a warning in SC.
# The warning makes t8codes build fail when Werror is activated. This fix checks if t8code
# is linked against OpenMPI and then suppresses that Werror treats this warning as error.
# The warning is still displayed while compiling.
# We compile a test program mich checks if a OpenMPI specific macro is defined and then apply the fix.

include(CheckIncludeFile)

# Check if mpi.h is available
check_include_file("mpi.h" MPI_HEADER_FOUND)

if(MPI_HEADER_FOUND)
# Create a temporary C++ source file to check for OpenMPI-specific macros
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <mpi.h>
#ifndef OPEN_MPI
#error 'Not OpenMPI'
#endif
int main() { return 0; }" HAS_OPENMPI)

if(HAS_OPENMPI)
message(STATUS "OpenMPI detected via mpi.h")
# Suppress warning
target_compile_options(SC::SC INTERFACE -Wno-error=cast-function-type)
endif()
else()
message(WARNING "mpi.h not found!")
endif()
########################## End of fix for OpenMPI ############################################
endif()

if ( T8CODE_USE_SYSTEM_P4EST )
Expand All @@ -185,7 +220,9 @@ else()

# Capture the list of variables before adding the subdirectory to mark the added ones as advanced.
get_cmake_property( _vars_before_p4est VARIABLES )
list( APPEND CMAKE_MESSAGE_CONTEXT "p4est" )
add_subdirectory( ${CMAKE_CURRENT_LIST_DIR}/p4est )
list( POP_BACK CMAKE_MESSAGE_CONTEXT )
# Capture the list of variables after adding the subdirectory
get_cmake_property( _vars_after_p4est VARIABLES )
# Compute the difference (new variables added by the subdirectory)
Expand Down
Loading
Loading