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
8 changes: 5 additions & 3 deletions .github/workflows/system-tests-latest-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:

jobs:
gather-refs:
name: Map Git branches to latest refs
Expand Down Expand Up @@ -140,6 +140,8 @@ jobs:
OPENFOAM_ADAPTER_REF:${{ needs.gather-refs.outputs.ref-openfoam-adapter }},\
SU2_VERSION:7.5.1,\
SU2_ADAPTER_REF:${{ needs.gather-refs.outputs.ref-su2-adapter }},\
TUTORIALS_REF:${{ needs.gather-refs.outputs.ref-tutorials }}"
TUTORIALS_REF:${{ needs.gather-refs.outputs.ref-tutorials }},\
DUNE_VERSION:2.9,\
DUMUX_VERSION:3.7"
system_tests_branch: develop
log_level: "INFO"
log_level: "INFO"
21 changes: 21 additions & 0 deletions free-flow-over-porous-media/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Free flow over porous media
path: free-flow-over-porous-media
url: https://precice.org/tutorials-free-flow-over-porous-media.html

participants:
- Free-Flow
- Porous-Media

cases:
free-flow-dumux:
participant: Free-Flow
directory: ./free-flow-dumux
run: ./run.sh
component: dumux-adapter

porous-media-dumux:
participant: Porous-Media
directory: ./porous-media-dumux
run: ./run.sh
component: dumux-adapter

15 changes: 10 additions & 5 deletions tools/tests/build_docker_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def main():
args = parser.parse_args()

# Configure logging based on the provided log level
logging.basicConfig(level=args.log_level, format='%(levelname)s: %(message)s')
logging.basicConfig(level=args.log_level,
format='%(levelname)s: %(message)s')

print(f"Using log-level: {args.log_level}")

Expand All @@ -48,7 +49,8 @@ def main():
test_suite_found = available_testsuites.get_by_name(
test_suite_requested)
if not test_suite_found:
logging.error(f"Did not find the testsuite with name {test_suite_requested}")
logging.error(
f"Did not find the testsuite with name {test_suite_requested}")
else:
test_suites_to_execute.append(test_suite_found)
if not test_suites_to_execute:
Expand All @@ -66,15 +68,18 @@ def main():
if not systemtests_to_run:
raise RuntimeError("Did not find any Systemtests to execute.")

logging.info(f"About to build the images for the following systemtests:\n {systemtests_to_run}")
logging.info(
f"About to build the images for the following systemtests:\n {systemtests_to_run}")

results = []
for number, systemtest in enumerate(systemtests_to_run):
logging.info(f"Started building {systemtest}, {number}/{len(systemtests_to_run)}")
logging.info(
f"Started building {systemtest}, {number}/{len(systemtests_to_run)}")
t = time.perf_counter()
result = systemtest.run_only_build(run_directory)
elapsed_time = time.perf_counter() - t
logging.info(f"Building image for {systemtest} took {elapsed_time:^.1f} seconds")
logging.info(
f"Building image for {systemtest} took {elapsed_time:^.1f} seconds")
results.append(result)

build_docker_success = True
Expand Down
16 changes: 16 additions & 0 deletions tools/tests/component-templates/dumux-adapter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build:
context: {{ dockerfile_context }}
args:
{% for key, value in build_arguments.items() %}
- {{key}}={{value}}
{% endfor %}
target: dumux_adapter
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
23 changes: 22 additions & 1 deletion tools/tests/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,25 @@ dealii-adapter:
default: "master"
DEALII_ADAPTER_REF:
description: Version of deal.ii-adapter to use
default: "master"
default: "master"

dumux-adapter:
repository: https://github.com/precice/dumux-adapter
template: component-templates/dumux-adapter.yaml
build_arguments:
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2404"
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PRECICE_PRESET:
description: CMake preset of preCICE
default: "production-audit"
TUTORIALS_REF:
description: Tutorial git reference to use
default: "master"
DUMUX_ADAPTER_REF:
semnantic: Git ref of the dumux adapter to use
default: "main"

72 changes: 52 additions & 20 deletions tools/tests/dockerfiles/ubuntu_2404/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@ USER root
# Installing necessary dependecies for preCICE
RUN apt-get -qq update && \
apt-get -qq -y install \
build-essential \
software-properties-common \
cmake \
curl \
g++ \
gfortran \
git \
libbenchmark-dev \
libboost-all-dev \
libeigen3-dev \
libxml2-dev \
lsb-release \
petsc-dev \
python3-dev \
python3-numpy \
python3-pip \
python3-venv \
pkg-config \
wget
build-essential \
software-properties-common \
cmake \
curl \
g++ \
gfortran \
git \
libbenchmark-dev \
libboost-all-dev \
libeigen3-dev \
libxml2-dev \
lsb-release \
petsc-dev \
python3-dev \
python3-numpy \
python3-pip \
python3-venv \
pkg-config \
wget
USER precice

FROM precice_dependecies AS precice
Expand Down Expand Up @@ -187,4 +187,36 @@ RUN git clone https://github.com/precice/dealii-adapter.git &&\
if [ -n "${DEALII_ADAPTER_PR}" ]; then git fetch origin pull/${DEALII_ADAPTER_PR}/head; fi && \
git checkout ${DEALII_ADAPTER_REF} && \
cmake . && \
make -j $(nproc)
make -j $(nproc)

FROM precice_dependecies AS dumux
USER root
RUN apt-get update
USER precice
COPY --from=precice /home/precice/.local/ /home/precice/.local/
ARG DUNE_VERSION
ARG DUMUX_VERSION
RUN mkdir dumux&&\
cd dumux&&\
git clone --depth 1 https://gitlab.dune-project.org/core/dune-common.git -b releases/$DUNE_VERSION &&\
git clone --depth 1 https://gitlab.dune-project.org/core/dune-geometry.git -b releases/$DUNE_VERSION &&\
git clone --depth 1 https://gitlab.dune-project.org/core/dune-grid.git -b releases/$DUNE_VERSION &&\
git clone --depth 1 https://gitlab.dune-project.org/core/dune-istl.git -b releases/$DUNE_VERSION &&\
git clone --depth 1 https://gitlab.dune-project.org/extensions/dune-subgrid.git -b releases/$DUNE_VERSION &&\
git clone --depth 1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git -b releases/$DUMUX_VERSION &&\
git clone -b cell_problems https://git.iws.uni-stuttgart.de/dumux-appl/dumux-phasefield.git &&\
git clone --depth 1 https://gitlab.dune-project.org/extensions/dune-SPGrid.git -b releases/$DUNE_VERSION
USER precice
WORKDIR /home/precice/dumux
ENV PATH ${WORKDIR}/dune-common/bin:${PATH}
# build core DUNE, DuMuX and the adapter
RUN dunecontrol --opts=cmake-test.opts all
ENV DUNE_CONTROL_PATH=${WORKDIR}/dune-common/dune.module:${WORKDIR}/dune-geometry/dune.module:${WORKDIR}/dune-grid/dune.module:${WORKDIR}/dune-localfunctions/dune.module:${WORKDIR}/dune-istl/dune.module:${WORKDIR}/dune-subgrid/dune.module:${WORKDIR}/dumux/dune.module
ARG DUMUX_ADAPTER_PR
ARG DUMUX_ADAPTER_REF
RUN git clone --depth 1 https://github.com/precice/dumux-adapter.git &&\
cd dumux-adapter && \
if [ -n "${DUMUX_ADAPTER_PR}" ]; then git fetch origin pull/${DUMUX_ADAPTER_PR}/head; fi && \
git checkout ${DUMUX_ADAPTER_REF} && \
cd .. &&\
dunecontrol --opts=cmake-test.opts --only=dumux-adapter all
18 changes: 15 additions & 3 deletions tools/tests/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ test_suites:
tutorials:
- path: flow-over-heated-plate
case_combination:
- fluid-openfoam
- solid-fenics
- fluid-openfoam
- solid-fenics
reference_result: ./flow-over-heated-plate/reference-results/fluid-openfoam_solid-fenics.tar.gz
nutils_test:
tutorials:
Expand All @@ -39,6 +39,18 @@ test_suites:
- fluid-openfoam
- solid-calculix
reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-calculix.tar.gz
dumux_test:
tutorials:
# - path: free-flow-over-porous-media
# case_combination:
# - free-flow-dumux
# - porous-media-dumux
# reference_result: ./free-flow-over-porous-media/reference-results/free-flow-dumux_porous-media-dumux.tar.gz
- path: two-scale-heat-conduction
case_combination:
- macro-dumux
- micro-dumux
reference_result: ./two-scale-heat-conduction/reference-results/macro-dumux_micro-dumux.tar.gz
su2_test:
tutorials:
- path: perpendicular-flap
Expand Down Expand Up @@ -128,4 +140,4 @@ test_suites:
- fluid-openfoam
- solid-upstream-dealii
- solid-downstream-dealii
reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii.tar.gz
reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-upstream-dealii_solid-downstream-dealii.tar.gz
20 changes: 20 additions & 0 deletions two-scale-heat-conduction/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Two-scale heat conduction
path: two-scale-heat-conduction
url: https://precice.org/tutorials-two-scale-heat-conduction.html

participants:
- macro-heat
- Micro-Manager

cases:
macro-dumux:
participant: macro-heat
directory: ./macro-dumux
run: ./run.sh
component: dumux-adapter

micro-dumux:
participant: Micro-Manager
directory: ./micro-dumux
run: ./run.sh
component: dumux-adapter