Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add su2 adapter tests and update reference results #521

Merged
merged 23 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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 elastic-tube-1d/reference-results/fluid-cpp_solid-cpp.tar.gz
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
18 changes: 10 additions & 8 deletions elastic-tube-1d/reference_results.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,30 @@ We also include some information on the machine used to generate them

| name | time | sha256 |
|------|------|-------|
| fluid-cpp_solid-cpp.tar.gz | 2024-03-21 09:41:34 | 8b00ccdcd8f2ddb4c1fc115dbaf9ee36bb03ba0f9fb98a3498dcc1d389acaf3b |
| fluid-cpp_solid-python.tar.gz | 2024-03-21 09:41:34 | 0fe449e0890c9906b7f132bc12c978621bedb2f12fc678f367e5b12823e2543e |
| fluid-python_solid-python.tar.gz | 2024-03-21 09:41:34 | 4ad401034b1d980c0584bbbb09dc17c8e2723ec195a1f041e4a246e41ded7092 |
| fluid-cpp_solid-cpp.tar.gz | 2024-04-13 12:00:34 | 501038f52ba09cea3e7d430f26ff8ca88b301e0aa38862ce894cabaf47237490 |
| fluid-python_solid-python.tar.gz | 2024-04-13 12:00:34 | 553e17167087ce036096c5319d41e322f28e9fbd9da32a63b28002e26ea023df |
| fluid-cpp_solid-python.tar.gz | 2024-04-13 12:00:34 | 0d2520075e8ecdcee88288cf91f8da7af2b805771241200168455ed117b13a6a |

## List of arguments used to generate the files

| name | value |
|------|------|
| PRECICE_REF | v3.0.0 |
| OPENFOAM_EXECUTABLE | openfoam2306 |
| PRECICE_REF | v3.1.1 |
| OPENFOAM_EXECUTABLE | openfoam2312 |
| OPENFOAM_ADAPTER_REF | v1.3.0 |
| PYTHON_BINDINGS_REF | v3.0.0.0 |
| PYTHON_BINDINGS_REF | v3.1.0 |
| FENICS_ADAPTER_REF | v2.1.0 |
| TUTORIALS_REF | 3f139d36f1708fb3ebfde2c48f14b1df94c9d70a |
| TUTORIALS_REF | 340b447 |
| PLATFORM | ubuntu_2204 |
| CALULIX_VERSION | 2.20 |
| CALULIX_ADAPTER_REF | v2.20.1 |
| SU2_VERSION | 7.5.1 |
| SU2_ADAPTER_REF | 64d4aff |
## Information about the machine

### uname -a

Linux precice-tests 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux precice-tests 5.15.0-101-generic #111-Ubuntu SMP Tue Mar 5 20:16:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux


### lscpu
Expand Down
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
18 changes: 10 additions & 8 deletions flow-over-heated-plate/reference_results.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,30 @@ We also include some information on the machine used to generate them

| name | time | sha256 |
|------|------|-------|
| fluid-openfoam_solid-openfoam.tar.gz | 2024-03-21 09:41:34 | ff95baa77b582eceb69d726b113df2ca340829fb2ca1c2c083c2f96f65908c10 |
| fluid-openfoam_solid-nutils.tar.gz | 2024-03-21 09:41:34 | 4cf68dae854f23fa773cea329b06f2046a5cb3c4ec5ba8b9f4c363010fd9613a |
| fluid-openfoam_solid-fenics.tar.gz | 2024-03-21 09:41:34 | efe8b31a945bed1aec706747dcac70acbf8fb5cc88a79e797e52ca86d403d78a |
| fluid-openfoam_solid-nutils.tar.gz | 2024-04-13 12:00:34 | 13557384af972d30f6b6d7fcf07429b2d99a463d1e9358d19ea72665fd06279e |
| fluid-openfoam_solid-openfoam.tar.gz | 2024-04-13 12:00:34 | da907862142542501da920b8dde9d81cc53e947bd72dc59a8df59dc8e3b28348 |
| fluid-openfoam_solid-fenics.tar.gz | 2024-04-13 12:00:34 | 656007eaa973f35c421a3b9ec340a06145fd065041e33f10efe023ab127a4552 |

## List of arguments used to generate the files

| name | value |
|------|------|
| PRECICE_REF | v3.0.0 |
| OPENFOAM_EXECUTABLE | openfoam2306 |
| PRECICE_REF | v3.1.1 |
| OPENFOAM_EXECUTABLE | openfoam2312 |
| OPENFOAM_ADAPTER_REF | v1.3.0 |
| PYTHON_BINDINGS_REF | v3.0.0.0 |
| PYTHON_BINDINGS_REF | v3.1.0 |
| FENICS_ADAPTER_REF | v2.1.0 |
| TUTORIALS_REF | 3f139d36f1708fb3ebfde2c48f14b1df94c9d70a |
| TUTORIALS_REF | 340b447 |
| PLATFORM | ubuntu_2204 |
| CALULIX_VERSION | 2.20 |
| CALULIX_ADAPTER_REF | v2.20.1 |
| SU2_VERSION | 7.5.1 |
| SU2_ADAPTER_REF | 64d4aff |
## Information about the machine

### uname -a

Linux precice-tests 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux precice-tests 5.15.0-101-generic #111-Ubuntu SMP Tue Mar 5 20:16:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux


### lscpu
Expand Down
10 changes: 5 additions & 5 deletions perpendicular-flap/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ cases:
run: ./run.sh
component: openfoam-adapter

# fluid-su2:
# participant: Fluid
# directory: ./fluid-su2
# run: ./run.sh
# component: su2-adapter
fluid-su2:
participant: Fluid
directory: ./fluid-su2
run: ./run.sh
component: su2-adapter

solid-calculix:
participant: Solid
Expand Down
Git LFS file not shown
Git LFS file not shown
15 changes: 9 additions & 6 deletions perpendicular-flap/reference_results.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,29 @@ We also include some information on the machine used to generate them

| name | time | sha256 |
|------|------|-------|
| fluid-openfoam_solid-calculix.tar.gz | 2024-03-21 09:41:34 | b974131b50bfb199f695d066f74100a75f633fba472020e78c3fc0d52b8ad36b |
| fluid-su2_solid-fenics.tar.gz | 2024-04-13 12:00:34 | d74d72729eb88049f067eb794768948d01f58e0b8f0db7e542c2d9da0643c7b5 |
| fluid-openfoam_solid-calculix.tar.gz | 2024-04-13 12:00:34 | 863c5078f8068135a983b24433d8d71120c2fdd67d6ab93b9dc1a4642ee595ba |

## List of arguments used to generate the files

| name | value |
|------|------|
| PRECICE_REF | v3.0.0 |
| OPENFOAM_EXECUTABLE | openfoam2306 |
| PRECICE_REF | v3.1.1 |
| OPENFOAM_EXECUTABLE | openfoam2312 |
| OPENFOAM_ADAPTER_REF | v1.3.0 |
| PYTHON_BINDINGS_REF | v3.0.0.0 |
| PYTHON_BINDINGS_REF | v3.1.0 |
| FENICS_ADAPTER_REF | v2.1.0 |
| TUTORIALS_REF | 3f139d36f1708fb3ebfde2c48f14b1df94c9d70a |
| TUTORIALS_REF | 340b447 |
| PLATFORM | ubuntu_2204 |
| CALULIX_VERSION | 2.20 |
| CALULIX_ADAPTER_REF | v2.20.1 |
| SU2_VERSION | 7.5.1 |
| SU2_ADAPTER_REF | 64d4aff |
## Information about the machine

### uname -a

Linux precice-tests 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux precice-tests 5.15.0-101-generic #111-Ubuntu SMP Tue Mar 5 20:16:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux


### lscpu
Expand Down
6 changes: 3 additions & 3 deletions tools/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Workflow for the preCICE v3 release testing:
3. Trigger the GitHub Actions Workflow. Until we merge the workflow to develop, this can only happen via the [GitHub CLI](https://cli.github.com/):

```bash
gh workflow run run_testsuite_manual.yml -f suites=release_test -f build_args="PRECICE_REF:150d4ee,OPENFOAM_ADAPTER_REF:a0e5263,PYTHON_BINDINGS_REF:49c2af0,FENICS_ADAPTER_REF:6f99859,TUTORIALS_REF:a1d46c4" --ref=develop
gh workflow run run_testsuite_manual.yml -f suites=release_test -f build_args="PRECICE_REF:v3.1.1,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0,SU2_VERSION:7.5.1,SU2_ADAPTER_REF:64d4aff,TUTORIALS_REF:340b447" --ref=develop
```

4. Go to the tutorials [Actions](https://github.com/precice/tutorials/actions) page and find the running workflow
Expand Down Expand Up @@ -61,7 +61,7 @@ gh workflow run run_testsuite_manual.yml -f suites=fenics_test --ref=develop
Another example, to use the latest releases and enable debug information of the tests:

```shell
gh workflow run run_testsuite_manual.yml -f suites=fenics_test -f build_args="PRECICE_REF:v3.1.1,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0" -f loglevel=DEBUG --ref=develop
gh workflow run run_testsuite_manual.yml -f suites=fenics_test -f build_args="PRECICE_REF:v3.1.1,OPENFOAM_ADAPTER_REF:v1.3.0,PYTHON_BINDINGS_REF:v3.1.0,FENICS_ADAPTER_REF:v2.1.0,SU2_VERSION:7.5.1,SU2_ADAPTER_REF:64d4aff,TUTORIALS_REF:340b447" -f loglevel=DEBUG --ref=develop
```

where the `*_REF` should be a specific [commit-ish](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefcommit-ishacommit-ishalsocommittish).
Expand Down Expand Up @@ -286,7 +286,7 @@ volumes:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee {{ case_folder }}.log 2>&1"
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
```

This template defines:
Expand Down
2 changes: 1 addition & 1 deletion tools/tests/component-templates/bare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ volumes:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee {{ case_folder }}.log 2>&1"
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
2 changes: 1 addition & 1 deletion tools/tests/component-templates/calculix-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ volumes:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee {{ case_folder }}.log 2>&1"
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
2 changes: 1 addition & 1 deletion tools/tests/component-templates/fenics-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ volumes:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee {{ case_folder }}.log 2>&1"
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
2 changes: 1 addition & 1 deletion tools/tests/component-templates/nutils-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ volumes:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee {{ case_folder }}.log 2>&1"
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
2 changes: 1 addition & 1 deletion tools/tests/component-templates/openfoam-adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ volumes:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
openfoam {{ run }} | tee {{ case_folder }}.log 2>&1"
openfoam {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
2 changes: 1 addition & 1 deletion tools/tests/component-templates/python-bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ volumes:
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
{{ run }} | tee {{ case_folder }}.log 2>&1"
{{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
16 changes: 16 additions & 0 deletions tools/tests/component-templates/su2-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: su2_adapter
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
SU2_RUN="/home/precice/SU2_RUN/bin" PYTHONPATH="/home/precice/SU2_RUN/bin:$PYTHONPATH" {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
20 changes: 20 additions & 0 deletions tools/tests/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,23 @@ calculix-adapter:
CALULIX_ADAPTER_REF:
description: Version of Calculix-Adapter to use
default: "master"

su2-adapter:
repository: https://github.com/precice/su2-adapter
template: component-templates/su2-adapter.yaml
build_arguments:
PRECICE_REF:
description: Version of preCICE to use
default: "main"
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2204"
TUTORIALS_REF:
description: Tutorial git reference to use
default: "master"
SU2_VERSION:
description: Version of SU2 to use
default: "7.5.1"
SU2_ADAPTER_REF:
description: Version of SU2-Adapter to use
default: "master"
28 changes: 28 additions & 0 deletions tools/tests/dockerfiles/ubuntu_2204/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,31 @@ RUN git clone https://github.com/precice/calculix-adapter.git && \
git checkout ${CALULIX_ADAPTER_REF} &&\
make CXX_VERSION=${CALULIX_VERSION} ADDITIONAL_FFLAGS="-fallow-argument-mismatch" -j $(nproc) && \
ln -s /home/precice/calculix-adapter/bin/ccx_preCICE /home/precice/.local/bin/ccx_preCICE

FROM python_bindings as su2_adapter
MakisH marked this conversation as resolved.
Show resolved Hide resolved
COPY --from=precice /home/precice/.local /home/precice/.local
USER root
RUN apt-get -qq update && \
apt-get -qq install swig
ARG SU2_VERSION
USER precice

# Download and build SU2 (We could also use pre-built binaries from the SU2 releases)
WORKDIR /home/precice
RUN wget https://github.com/su2code/SU2/archive/refs/tags/v${SU2_VERSION}.tar.gz && \
tar xvzf v${SU2_VERSION}.tar.gz && \
rm -fv v${SU2_VERSION}.tar.gz
RUN pip3 install --user mpi4py
ARG SU2_ADAPTER_REF
WORKDIR /home/precice
ENV SU2_RUN="/home/precice/SU2_RUN"
ENV SU2_HOME="/home/precice/SU2-${SU2_VERSION}"
ENV PATH="/home/precice/su2-adapter/run:$SU2_RUN:$PATH"
ENV PYTHONPATH="$SU2_RUN:$PYTHONPATH"
RUN git clone https://github.com/precice/su2-adapter.git && \
cd su2-adapter &&\
git checkout ${SU2_ADAPTER_REF} &&\
./su2AdapterInstall
RUN cd "${SU2_HOME}" &&\
./meson.py build -Denable-pywrapper=true --prefix=$SU2_RUN &&\
./ninja -C build install
2 changes: 2 additions & 0 deletions tools/tests/reference_versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ TUTORIALS_REF: "340b447" # April 12, 2024, just before v202404.0
PLATFORM: "ubuntu_2204"
CALULIX_VERSION: "2.20"
CALULIX_ADAPTER_REF: "v2.20.1"
SU2_VERSION: "7.5.1"
SU2_ADAPTER_REF: "64d4aff" # Distribution v2404
2 changes: 1 addition & 1 deletion tools/tests/systemtests/Systemtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os


GLOBAL_TIMEOUT = 360
GLOBAL_TIMEOUT = 600
SHORT_TIMEOUT = 10


Expand Down
17 changes: 17 additions & 0 deletions tools/tests/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ test_suites:
- fluid-openfoam
- solid-calculix
reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-calculix.tar.gz
su2_test:
tutorials:
- path: perpendicular-flap
case_combination:
- fluid-su2
- solid-fenics
reference_result: ./perpendicular-flap/reference-results/fluid-su2_solid-fenics.tar.gz
elastic_tube_1d_test:
tutorials:
- path: elastic-tube-1d
Expand Down Expand Up @@ -78,3 +85,13 @@ test_suites:
- fluid-openfoam
- solid-openfoam
reference_result: ./flow-over-heated-plate/reference-results/fluid-openfoam_solid-openfoam.tar.gz
- path: perpendicular-flap
case_combination:
- fluid-openfoam
- solid-calculix
reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-calculix.tar.gz
- path: perpendicular-flap
case_combination:
- fluid-su2
- solid-fenics
reference_result: ./perpendicular-flap/reference-results/fluid-su2_solid-fenics.tar.gz