From d53c609c5874835ba0c13cbe7c0a17e34a2509ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kelemen?= <44344022+matekelemen@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:28:22 +0100 Subject: [PATCH 01/30] update upload-artifact --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38b4b91c..21f6a80f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,7 +114,7 @@ jobs: cd build ctest -T memcheck --output-on-failure - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: failure() with: name: "CTest Log Ubuntu C++ & C (${{ matrix.compiler }}-${{ matrix.mpi }})" From 4dbb4a19f417abe9ce73272eb57fb66604852c49 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 13:55:06 +0200 Subject: [PATCH 02/30] CI ubuntu 20 => 22 --- .../DockerFile | 4 ++-- .github/workflows/build_docker_images_for_ci.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename .github/docker_files/{docker_file_ci_ubuntu_20_04 => docker_file_ci_ubuntu_22_04}/DockerFile (96%) diff --git a/.github/docker_files/docker_file_ci_ubuntu_20_04/DockerFile b/.github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile similarity index 96% rename from .github/docker_files/docker_file_ci_ubuntu_20_04/DockerFile rename to .github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile index f7508c5a..9ab16301 100644 --- a/.github/docker_files/docker_file_ci_ubuntu_20_04/DockerFile +++ b/.github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM ubuntu:jammy ENV HOME /root @@ -15,7 +15,7 @@ RUN apt-get update -y && apt-get upgrade -y && \ apt-get -y update && \ apt-get install -y \ build-essential \ - clang-11 \ + clang \ cmake \ git \ intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic \ diff --git a/.github/workflows/build_docker_images_for_ci.yml b/.github/workflows/build_docker_images_for_ci.yml index 4d1b04fd..b9ce5c38 100644 --- a/.github/workflows/build_docker_images_for_ci.yml +++ b/.github/workflows/build_docker_images_for_ci.yml @@ -6,13 +6,13 @@ on: branches: - 'master' paths: - - '.github/docker_files/docker_file_ci_ubuntu_20_04/*' + - '.github/docker_files/docker_file_ci_ubuntu_22_04/*' - '.github/workflows/build_docker_images_for_ci.yml' pull_request: branches: - 'master' paths: - - '.github/docker_files/docker_file_ci_ubuntu_20_04/*' + - '.github/docker_files/docker_file_ci_ubuntu_22_04/*' - '.github/workflows/build_docker_images_for_ci.yml' jobs: @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Build the Docker image - run: docker build . --file .github/docker_files/docker_file_ci_ubuntu_20_04/DockerFile --tag kratosmultiphysics/co-sim-io-image-ci-ubuntu-20-04 + run: docker build . --file .github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile --tag kratosmultiphysics/co-sim-io-image-ci-ubuntu-22-04 - name: Docker Login uses: azure/docker-login@v1 with: @@ -31,4 +31,4 @@ jobs: - name: Publish the Docker image if: ${{ github.event_name == 'push'}} # only push the new image when the changes are merged to master - run: docker push kratosmultiphysics/co-sim-io-image-ci-ubuntu-20-04 + run: docker push kratosmultiphysics/co-sim-io-image-ci-ubuntu-22-04 From f80bdcbdd88df98981c8e1062bde432b7fda4c4e Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 13:55:31 +0200 Subject: [PATCH 03/30] bump oldest supported CMake in the CI to 3.15 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21f6a80f..be249ffd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -381,14 +381,14 @@ jobs: python3.8 run_python_tests.py - Ubuntu-old-CMake: + Ubuntu-minimum-CMake: runs-on: ubuntu-latest steps: - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v1.10 + uses: jwlawson/actions-setup-cmake@v2 with: - cmake-version: '2.8.x' + cmake-version: '3.15.x' - name: Use cmake run: cmake --version From ad467e710d7074ec70d9570858bcaefcb0b68d6d Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 13:56:15 +0200 Subject: [PATCH 04/30] CI Centos7 => Rocky8 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be249ffd..16ad1a38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -347,12 +347,12 @@ jobs: python run_python_tests.py - CentOS-7: + Rocky-8: runs-on: ubuntu-latest - name: CentOS 7 + name: Rocky 8 container: - image: kratosmultiphysics/kratos-image-ci-centos7:latest + image: kratosmultiphysics/kratos-image-ci-rocky8:latest steps: - uses: actions/checkout@v2 @@ -378,7 +378,7 @@ jobs: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin cd tests # TODO delete build dir to make sure the linking etc works correctly? (Needs to be done after running CTests) - python3.8 run_python_tests.py + python3 run_python_tests.py Ubuntu-minimum-CMake: From fe7fbaf50135689cddcf90365c64b89dae36f0ad Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 13:57:15 +0200 Subject: [PATCH 05/30] CI actions/setup-python 1 => 5 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16ad1a38..74d1b696 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,7 @@ jobs: sudo apt-get install libopenmpi-dev openmpi-bin - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -228,7 +228,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -304,7 +304,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -325,7 +325,7 @@ jobs: -G"Visual Studio 17 2022" ^ -H"." ^ -B"build" ^ - -DCO_SIM_IO_BUILD_PYTHON=ON ^ + -DCO_SIM_IO_BUILD_PYTHON=ON ^ -DCO_SIM_IO_STRICT_COMPILER=ON || goto :error cmake --build "build" --target install -- /p:Platform=x64 || goto :error From b5c50a1935895dc758ba7a5f4c99bdc54f3d2a21 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 13:57:57 +0200 Subject: [PATCH 06/30] drop pyrhon 3.8 in the CI and add 3.12 and 3.13 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74d1b696..19d9ead6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] compiler: [GCC, ICC] timeout-minutes: 15 @@ -221,7 +221,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] timeout-minutes: 15 steps: @@ -297,7 +297,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] timeout-minutes: 15 steps: From 388ea9f9716d7ea67f5fffd573a1ff550ef05c5b Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:00:29 +0200 Subject: [PATCH 07/30] replace clang-11 with the default pacman clang in the CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19d9ead6..8fcc59fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: sudo apt-get install \ valgrind \ - clang-11 + clang - name: Install legacy Intel compiler if: ${{ matrix.compiler == 'ICC' }} @@ -68,8 +68,8 @@ jobs: export CXX=/usr/bin/g++ export CC=/usr/bin/gcc elif [ ${{ matrix.compiler }} = CLANG ]; then - export CXX=/usr/bin/clang++-11 - export CC=/usr/bin/clang-11 + export CXX=/usr/bin/clang++ + export CC=/usr/bin/clang elif [ ${{ matrix.compiler }} = ICC ]; then export CXX=icpc export CC=icc From c4a56cfeee75613400af4c92713a82049986bcc9 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:04:07 +0200 Subject: [PATCH 08/30] explicit void argument --- co_sim_io/c/co_sim_io_c.h | 3 ++- co_sim_io/c/co_sim_io_c_info.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/co_sim_io/c/co_sim_io_c.h b/co_sim_io/c/co_sim_io_c.h index 221baea9..c570d746 100644 --- a/co_sim_io/c/co_sim_io_c.h +++ b/co_sim_io/c/co_sim_io_c.h @@ -35,7 +35,8 @@ enum CoSimIO_ConnectionStatus CoSimIO_DisconnectionError }; -CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Hello(); +CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Hello( + void); CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_Connect( const CoSimIO_Info I_Settings); diff --git a/co_sim_io/c/co_sim_io_c_info.h b/co_sim_io/c/co_sim_io_c_info.h index d9cfd770..98998bd2 100644 --- a/co_sim_io/c/co_sim_io_c_info.h +++ b/co_sim_io/c/co_sim_io_c_info.h @@ -22,7 +22,7 @@ typedef struct CoSimIO_Info } CoSimIO_Info; -CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CreateInfo(); +CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CreateInfo(void); CO_SIM_IO_NODISCARD CoSimIO_Info CoSimIO_CopyInfo(const CoSimIO_Info I_Info); From 6214c71c57c2ca23cd8150bc646b8602a6719add Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:08:14 +0200 Subject: [PATCH 09/30] add args to entry points --- tests/co_sim_io/c/info/test_info_bool.c | 2 +- tests/co_sim_io/c/info/test_info_clear.c | 2 +- tests/co_sim_io/c/info/test_info_copy.c | 2 +- tests/co_sim_io/c/info/test_info_double.c | 4 ++-- tests/co_sim_io/c/info/test_info_erase.c | 2 +- tests/co_sim_io/c/info/test_info_info.c | 2 +- tests/co_sim_io/c/info/test_info_int.c | 2 +- tests/co_sim_io/c/info/test_info_multiple_vals.c | 2 +- tests/co_sim_io/c/info/test_info_print.c | 2 +- tests/co_sim_io/c/info/test_info_size.c | 2 +- tests/co_sim_io/c/info/test_info_string.c | 2 +- tests/co_sim_io/c/model_part/test_model_part.c | 2 +- .../co_sim_io/c/model_part/test_model_part_create_multiple.c | 2 +- tests/co_sim_io/c/model_part/test_model_part_element.c | 2 +- tests/co_sim_io/c/model_part/test_model_part_ghost.c | 2 +- tests/co_sim_io/c/model_part/test_model_part_node.c | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/co_sim_io/c/info/test_info_bool.c b/tests/co_sim_io/c/info/test_info_bool.c index 31fd4f8b..d654a9f5 100644 --- a/tests/co_sim_io/c/info/test_info_bool.c +++ b/tests/co_sim_io/c/info/test_info_bool.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_clear.c b/tests/co_sim_io/c/info/test_info_clear.c index 04c31907..cfbae415 100644 --- a/tests/co_sim_io/c/info/test_info_clear.c +++ b/tests/co_sim_io/c/info/test_info_clear.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_copy.c b/tests/co_sim_io/c/info/test_info_copy.c index 25ce806a..b63e71dc 100644 --- a/tests/co_sim_io/c/info/test_info_copy.c +++ b/tests/co_sim_io/c/info/test_info_copy.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info, copied_info; diff --git a/tests/co_sim_io/c/info/test_info_double.c b/tests/co_sim_io/c/info/test_info_double.c index 6a3235ed..f73e50b9 100644 --- a/tests/co_sim_io/c/info/test_info_double.c +++ b/tests/co_sim_io/c/info/test_info_double.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; @@ -31,6 +31,6 @@ int main() COSIMIO_CHECK_DOUBLE_EQUAL(CoSimIO_Info_GetDouble(info, "tolerance"), 0.0086); CoSimIO_FreeInfo(info); - + return 0; } diff --git a/tests/co_sim_io/c/info/test_info_erase.c b/tests/co_sim_io/c/info/test_info_erase.c index 2d211b90..70e618f8 100644 --- a/tests/co_sim_io/c/info/test_info_erase.c +++ b/tests/co_sim_io/c/info/test_info_erase.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_info.c b/tests/co_sim_io/c/info/test_info_info.c index 94e77a80..566f10ed 100644 --- a/tests/co_sim_io/c/info/test_info_info.c +++ b/tests/co_sim_io/c/info/test_info_info.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_int.c b/tests/co_sim_io/c/info/test_info_int.c index 91ad7250..511dc658 100644 --- a/tests/co_sim_io/c/info/test_info_int.c +++ b/tests/co_sim_io/c/info/test_info_int.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_multiple_vals.c b/tests/co_sim_io/c/info/test_info_multiple_vals.c index 8f624f85..fb81ee85 100644 --- a/tests/co_sim_io/c/info/test_info_multiple_vals.c +++ b/tests/co_sim_io/c/info/test_info_multiple_vals.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_print.c b/tests/co_sim_io/c/info/test_info_print.c index a7dcebe6..3f23be90 100644 --- a/tests/co_sim_io/c/info/test_info_print.c +++ b/tests/co_sim_io/c/info/test_info_print.c @@ -16,7 +16,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_size.c b/tests/co_sim_io/c/info/test_info_size.c index 2a1b0d0c..d892b908 100644 --- a/tests/co_sim_io/c/info/test_info_size.c +++ b/tests/co_sim_io/c/info/test_info_size.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_string.c b/tests/co_sim_io/c/info/test_info_string.c index 6cefb226..5a9a7333 100644 --- a/tests/co_sim_io/c/info/test_info_string.c +++ b/tests/co_sim_io/c/info/test_info_string.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/model_part/test_model_part.c b/tests/co_sim_io/c/model_part/test_model_part.c index ff255fd9..66e842e2 100644 --- a/tests/co_sim_io/c/model_part/test_model_part.c +++ b/tests/co_sim_io/c/model_part/test_model_part.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c index 4306ee19..779951c6 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c +++ b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_element.c b/tests/co_sim_io/c/model_part/test_model_part_element.c index cf2578d4..f5631ed9 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_element.c +++ b/tests/co_sim_io/c/model_part/test_model_part_element.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_ghost.c b/tests/co_sim_io/c/model_part/test_model_part_ghost.c index 9a095b34..53e54e17 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_ghost.c +++ b/tests/co_sim_io/c/model_part/test_model_part_ghost.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_node.c b/tests/co_sim_io/c/model_part/test_model_part_node.c index 2039964e..5f4925ed 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_node.c +++ b/tests/co_sim_io/c/model_part/test_model_part_node.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i; From 66077dc3944a15901c4dc26de1779fb24ae74882 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:19:54 +0200 Subject: [PATCH 10/30] try handling C and C++ separately? --- tests/co_sim_io/c/checks.h | 12 ++++++++++++ tests/co_sim_io/c/info/test_info_bool.c | 2 +- tests/co_sim_io/c/info/test_info_clear.c | 2 +- tests/co_sim_io/c/info/test_info_copy.c | 2 +- tests/co_sim_io/c/info/test_info_double.c | 2 +- tests/co_sim_io/c/info/test_info_erase.c | 2 +- tests/co_sim_io/c/info/test_info_info.c | 2 +- tests/co_sim_io/c/info/test_info_int.c | 2 +- tests/co_sim_io/c/info/test_info_multiple_vals.c | 2 +- tests/co_sim_io/c/info/test_info_print.c | 2 +- tests/co_sim_io/c/info/test_info_size.c | 2 +- tests/co_sim_io/c/info/test_info_string.c | 2 +- tests/co_sim_io/c/model_part/test_model_part.c | 2 +- .../c/model_part/test_model_part_create_multiple.c | 2 +- .../co_sim_io/c/model_part/test_model_part_element.c | 2 +- tests/co_sim_io/c/model_part/test_model_part_ghost.c | 2 +- tests/co_sim_io/c/model_part/test_model_part_node.c | 2 +- 17 files changed, 28 insertions(+), 16 deletions(-) diff --git a/tests/co_sim_io/c/checks.h b/tests/co_sim_io/c/checks.h index 3f44e989..b0841fe7 100644 --- a/tests/co_sim_io/c/checks.h +++ b/tests/co_sim_io/c/checks.h @@ -17,6 +17,18 @@ #include #include +// Before the 23 standard, C and C++ handled unused arguments differently. +// C does not allow variable names to be omitted, but does not complain if +// the variable is unused. On the other hand, C++ allows variable names to +// be omitted, but will complain if it is not used when named. +// The "[[maybe_unused]]" attribute is a C23 extension, so it's not applicable +// here until support for earlier standards is dropped. +#ifndef __cplusplus + #define COSIMIO_MAYBE_UNUSED(variable_name) variable_name +#else + #define COSIMIO_MAYBE_UNUSED(variable_name) +#endif + #define COSIMIO_CHECK_INT_EQUAL(a, b) \ if (a != b) { \ printf("in line %d: %d is not equal to %d", __LINE__, a, b); \ diff --git a/tests/co_sim_io/c/info/test_info_bool.c b/tests/co_sim_io/c/info/test_info_bool.c index d654a9f5..97e369fe 100644 --- a/tests/co_sim_io/c/info/test_info_bool.c +++ b/tests/co_sim_io/c/info/test_info_bool.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_clear.c b/tests/co_sim_io/c/info/test_info_clear.c index cfbae415..e76035ff 100644 --- a/tests/co_sim_io/c/info/test_info_clear.c +++ b/tests/co_sim_io/c/info/test_info_clear.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_copy.c b/tests/co_sim_io/c/info/test_info_copy.c index b63e71dc..9fcec8bc 100644 --- a/tests/co_sim_io/c/info/test_info_copy.c +++ b/tests/co_sim_io/c/info/test_info_copy.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info, copied_info; diff --git a/tests/co_sim_io/c/info/test_info_double.c b/tests/co_sim_io/c/info/test_info_double.c index f73e50b9..6a8703b2 100644 --- a/tests/co_sim_io/c/info/test_info_double.c +++ b/tests/co_sim_io/c/info/test_info_double.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_erase.c b/tests/co_sim_io/c/info/test_info_erase.c index 70e618f8..4fb25be4 100644 --- a/tests/co_sim_io/c/info/test_info_erase.c +++ b/tests/co_sim_io/c/info/test_info_erase.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_info.c b/tests/co_sim_io/c/info/test_info_info.c index 566f10ed..6d755863 100644 --- a/tests/co_sim_io/c/info/test_info_info.c +++ b/tests/co_sim_io/c/info/test_info_info.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_int.c b/tests/co_sim_io/c/info/test_info_int.c index 511dc658..57bc0237 100644 --- a/tests/co_sim_io/c/info/test_info_int.c +++ b/tests/co_sim_io/c/info/test_info_int.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_multiple_vals.c b/tests/co_sim_io/c/info/test_info_multiple_vals.c index fb81ee85..456859ff 100644 --- a/tests/co_sim_io/c/info/test_info_multiple_vals.c +++ b/tests/co_sim_io/c/info/test_info_multiple_vals.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_print.c b/tests/co_sim_io/c/info/test_info_print.c index 3f23be90..29f45e6e 100644 --- a/tests/co_sim_io/c/info/test_info_print.c +++ b/tests/co_sim_io/c/info/test_info_print.c @@ -16,7 +16,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_size.c b/tests/co_sim_io/c/info/test_info_size.c index d892b908..fe2ea410 100644 --- a/tests/co_sim_io/c/info/test_info_size.c +++ b/tests/co_sim_io/c/info/test_info_size.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_string.c b/tests/co_sim_io/c/info/test_info_string.c index 5a9a7333..5dd56abd 100644 --- a/tests/co_sim_io/c/info/test_info_string.c +++ b/tests/co_sim_io/c/info/test_info_string.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/model_part/test_model_part.c b/tests/co_sim_io/c/model_part/test_model_part.c index 66e842e2..6a099db3 100644 --- a/tests/co_sim_io/c/model_part/test_model_part.c +++ b/tests/co_sim_io/c/model_part/test_model_part.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c index 779951c6..2e8f782a 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c +++ b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_element.c b/tests/co_sim_io/c/model_part/test_model_part_element.c index f5631ed9..89b1148f 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_element.c +++ b/tests/co_sim_io/c/model_part/test_model_part_element.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_ghost.c b/tests/co_sim_io/c/model_part/test_model_part_ghost.c index 53e54e17..fb61b774 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_ghost.c +++ b/tests/co_sim_io/c/model_part/test_model_part_ghost.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ int i; diff --git a/tests/co_sim_io/c/model_part/test_model_part_node.c b/tests/co_sim_io/c/model_part/test_model_part_node.c index 5f4925ed..7117c1ab 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_node.c +++ b/tests/co_sim_io/c/model_part/test_model_part_node.c @@ -15,7 +15,7 @@ #include "../checks.h" -int main(int argc, const char** argv) +int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) { /* declaring variables */ int i; From b596c8f2e3f14bdd0e7b145907ac8e6e41a7fd3b Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:26:37 +0200 Subject: [PATCH 11/30] remove support for the legacy intel compiler --- .github/workflows/ci.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fcc59fc..3230e9fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [GCC, CLANG, ICC, ICX] + compiler: [GCC, CLANG, ICX, ICPX] mpi: [OpenMPI, IntelMPI] exclude: # CLANG is not properly supported by Intel, better use LLVMIntel in the future @@ -46,12 +46,8 @@ jobs: valgrind \ clang - - name: Install legacy Intel compiler - if: ${{ matrix.compiler == 'ICC' }} - run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic - - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICX' }} + if: ${{ matrix.compiler == 'ICPX' }} run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp - name: Install MPI @@ -70,18 +66,18 @@ jobs: elif [ ${{ matrix.compiler }} = CLANG ]; then export CXX=/usr/bin/clang++ export CC=/usr/bin/clang - elif [ ${{ matrix.compiler }} = ICC ]; then - export CXX=icpc - export CC=icc elif [ ${{ matrix.compiler }} = ICX ]; then export CXX=icpx export CC=icx + elif [ ${{ matrix.compiler }} = ICPX ]; then + export CXX=icpx + export CC=icx else echo 'Unsupported compiler: ${{ matrix.compiler }}' exit 1 fi - if [ ${{ matrix.compiler }} = ICC ] || [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then source /opt/intel/oneapi/setvars.sh fi @@ -107,7 +103,7 @@ jobs: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin export PATH=${PATH}:${GITHUB_WORKSPACE}/bin # required for IntelMPI export PATH=${PATH}:${GITHUB_WORKSPACE}/bin/tests_c_mpi # required for IntelMPI - if [ ${{ matrix.compiler }} = ICC ] || [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then source /opt/intel/oneapi/setvars.sh fi @@ -128,14 +124,14 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - compiler: [GCC, ICC] + compiler: [GCC, ICX] timeout-minutes: 15 steps: - uses: actions/checkout@v2 - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICC' }} + if: ${{ matrix.compiler == 'ICX' }} run: | # see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable cd /tmp @@ -145,7 +141,7 @@ jobs: sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" sudo apt-get update - sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic + sudo apt-get install intel-oneapi-compiler-dpcpp-cpp - name: Install MPI run: | @@ -170,7 +166,7 @@ jobs: - name: Running tests run: | - if [ ${{ matrix.compiler }} = ICC ]; then + if [ ${{ matrix.compiler }} = ICX ]; then source /opt/intel/oneapi/setvars.sh fi export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin @@ -181,7 +177,7 @@ jobs: - name: Running MPI tests run: | - if [ ${{ matrix.compiler }} = ICC ]; then + if [ ${{ matrix.compiler }} = ICX ]; then source /opt/intel/oneapi/setvars.sh fi export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin From 95fbeb98807eea67049874e372f49761243fd358 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:42:12 +0200 Subject: [PATCH 12/30] ancient C-style comments --- tests/co_sim_io/c/checks.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/co_sim_io/c/checks.h b/tests/co_sim_io/c/checks.h index b0841fe7..dd2a8856 100644 --- a/tests/co_sim_io/c/checks.h +++ b/tests/co_sim_io/c/checks.h @@ -17,12 +17,14 @@ #include #include -// Before the 23 standard, C and C++ handled unused arguments differently. -// C does not allow variable names to be omitted, but does not complain if -// the variable is unused. On the other hand, C++ allows variable names to -// be omitted, but will complain if it is not used when named. -// The "[[maybe_unused]]" attribute is a C23 extension, so it's not applicable -// here until support for earlier standards is dropped. +/* + Before the 23 standard, C and C++ handled unused arguments differently. + C does not allow variable names to be omitted, but does not complain if + the variable is unused. On the other hand, C++ allows variable names to + be omitted, but will complain if it is not used when named. + The "[[maybe_unused]]" attribute is a C23 extension, so it's not applicable + here until support for earlier standards is dropped. +*/ #ifndef __cplusplus #define COSIMIO_MAYBE_UNUSED(variable_name) variable_name #else From fd02e975e3f3de0d7fefff37b95c0a96dc239ffa Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:42:33 +0200 Subject: [PATCH 13/30] fix intel installation --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3230e9fe..c04f395d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,7 +131,7 @@ jobs: - uses: actions/checkout@v2 - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICX' }} + if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} run: | # see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable cd /tmp @@ -166,7 +166,7 @@ jobs: - name: Running tests run: | - if [ ${{ matrix.compiler }} = ICX ]; then + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then source /opt/intel/oneapi/setvars.sh fi export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin @@ -177,7 +177,7 @@ jobs: - name: Running MPI tests run: | - if [ ${{ matrix.compiler }} = ICX ]; then + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then source /opt/intel/oneapi/setvars.sh fi export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin From a170127512615d2454b97d70e155d49a13985438 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 14:48:54 +0200 Subject: [PATCH 14/30] Can I omit unused argument names? - No, you can't. - Fine, but then you won't complain if I don't use them, right? - Oh you bet I will. --- tests/co_sim_io/c/checks.h | 15 ++------------- tests/co_sim_io/c/info/test_info_bool.c | 5 ++++- tests/co_sim_io/c/info/test_info_clear.c | 5 ++++- tests/co_sim_io/c/info/test_info_copy.c | 5 ++++- tests/co_sim_io/c/info/test_info_double.c | 5 ++++- tests/co_sim_io/c/info/test_info_erase.c | 5 ++++- tests/co_sim_io/c/info/test_info_info.c | 5 ++++- tests/co_sim_io/c/info/test_info_int.c | 5 ++++- tests/co_sim_io/c/info/test_info_multiple_vals.c | 5 ++++- tests/co_sim_io/c/info/test_info_print.c | 5 ++++- tests/co_sim_io/c/info/test_info_size.c | 5 ++++- tests/co_sim_io/c/info/test_info_string.c | 5 ++++- tests/co_sim_io/c/model_part/test_model_part.c | 5 ++++- .../model_part/test_model_part_create_multiple.c | 5 ++++- .../c/model_part/test_model_part_element.c | 5 ++++- .../c/model_part/test_model_part_ghost.c | 5 ++++- .../co_sim_io/c/model_part/test_model_part_node.c | 5 ++++- 17 files changed, 66 insertions(+), 29 deletions(-) diff --git a/tests/co_sim_io/c/checks.h b/tests/co_sim_io/c/checks.h index dd2a8856..71622f20 100644 --- a/tests/co_sim_io/c/checks.h +++ b/tests/co_sim_io/c/checks.h @@ -17,19 +17,8 @@ #include #include -/* - Before the 23 standard, C and C++ handled unused arguments differently. - C does not allow variable names to be omitted, but does not complain if - the variable is unused. On the other hand, C++ allows variable names to - be omitted, but will complain if it is not used when named. - The "[[maybe_unused]]" attribute is a C23 extension, so it's not applicable - here until support for earlier standards is dropped. -*/ -#ifndef __cplusplus - #define COSIMIO_MAYBE_UNUSED(variable_name) variable_name -#else - #define COSIMIO_MAYBE_UNUSED(variable_name) -#endif + +#define COSIMIO_UNUSED(variable_name) (void)(variable_name) #define COSIMIO_CHECK_INT_EQUAL(a, b) \ if (a != b) { \ diff --git a/tests/co_sim_io/c/info/test_info_bool.c b/tests/co_sim_io/c/info/test_info_bool.c index 97e369fe..64e96cad 100644 --- a/tests/co_sim_io/c/info/test_info_bool.c +++ b/tests/co_sim_io/c/info/test_info_bool.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_clear.c b/tests/co_sim_io/c/info/test_info_clear.c index e76035ff..7d050e48 100644 --- a/tests/co_sim_io/c/info/test_info_clear.c +++ b/tests/co_sim_io/c/info/test_info_clear.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_copy.c b/tests/co_sim_io/c/info/test_info_copy.c index 9fcec8bc..d450f998 100644 --- a/tests/co_sim_io/c/info/test_info_copy.c +++ b/tests/co_sim_io/c/info/test_info_copy.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info, copied_info; diff --git a/tests/co_sim_io/c/info/test_info_double.c b/tests/co_sim_io/c/info/test_info_double.c index 6a8703b2..24aa189d 100644 --- a/tests/co_sim_io/c/info/test_info_double.c +++ b/tests/co_sim_io/c/info/test_info_double.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_erase.c b/tests/co_sim_io/c/info/test_info_erase.c index 4fb25be4..ecbfa91e 100644 --- a/tests/co_sim_io/c/info/test_info_erase.c +++ b/tests/co_sim_io/c/info/test_info_erase.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_info.c b/tests/co_sim_io/c/info/test_info_info.c index 6d755863..2f7f5df6 100644 --- a/tests/co_sim_io/c/info/test_info_info.c +++ b/tests/co_sim_io/c/info/test_info_info.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; CoSimIO_Info sub_info; diff --git a/tests/co_sim_io/c/info/test_info_int.c b/tests/co_sim_io/c/info/test_info_int.c index 57bc0237..5e1b7d6d 100644 --- a/tests/co_sim_io/c/info/test_info_int.c +++ b/tests/co_sim_io/c/info/test_info_int.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_multiple_vals.c b/tests/co_sim_io/c/info/test_info_multiple_vals.c index 456859ff..ccfc9b61 100644 --- a/tests/co_sim_io/c/info/test_info_multiple_vals.c +++ b/tests/co_sim_io/c/info/test_info_multiple_vals.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_print.c b/tests/co_sim_io/c/info/test_info_print.c index 29f45e6e..2b38c534 100644 --- a/tests/co_sim_io/c/info/test_info_print.c +++ b/tests/co_sim_io/c/info/test_info_print.c @@ -16,8 +16,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; char buffer[BUFSIZ]; diff --git a/tests/co_sim_io/c/info/test_info_size.c b/tests/co_sim_io/c/info/test_info_size.c index fe2ea410..b84879b1 100644 --- a/tests/co_sim_io/c/info/test_info_size.c +++ b/tests/co_sim_io/c/info/test_info_size.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/info/test_info_string.c b/tests/co_sim_io/c/info/test_info_string.c index 5dd56abd..dcc1d455 100644 --- a/tests/co_sim_io/c/info/test_info_string.c +++ b/tests/co_sim_io/c/info/test_info_string.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ CoSimIO_Info info; diff --git a/tests/co_sim_io/c/model_part/test_model_part.c b/tests/co_sim_io/c/model_part/test_model_part.c index 6a099db3..9f112b50 100644 --- a/tests/co_sim_io/c/model_part/test_model_part.c +++ b/tests/co_sim_io/c/model_part/test_model_part.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ int i; int connectivity[2]; diff --git a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c index 2e8f782a..62af7d46 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c +++ b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ int i; int j; diff --git a/tests/co_sim_io/c/model_part/test_model_part_element.c b/tests/co_sim_io/c/model_part/test_model_part_element.c index 89b1148f..88d755e3 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_element.c +++ b/tests/co_sim_io/c/model_part/test_model_part_element.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ int i; int connectivity[3]; diff --git a/tests/co_sim_io/c/model_part/test_model_part_ghost.c b/tests/co_sim_io/c/model_part/test_model_part_ghost.c index fb61b774..3bb7facb 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_ghost.c +++ b/tests/co_sim_io/c/model_part/test_model_part_ghost.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ int i; int connectivity[2]; diff --git a/tests/co_sim_io/c/model_part/test_model_part_node.c b/tests/co_sim_io/c/model_part/test_model_part_node.c index 7117c1ab..940a15f1 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_node.c +++ b/tests/co_sim_io/c/model_part/test_model_part_node.c @@ -15,8 +15,11 @@ #include "../checks.h" -int main(int COSIMIO_MAYBE_UNUSED(argc), const char** COSIMIO_MAYBE_UNUSED(argv)) +int main(int argc, const char** argv) { + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + /* declaring variables */ int i; CoSimIO_ModelPart model_part; From e53ad06380d86c529f7b3c11613d6c190cd40ee4 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 15:07:31 +0200 Subject: [PATCH 15/30] fix intel installation - round 2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c04f395d..08e72e16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: clang - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICPX' }} + if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp - name: Install MPI From 7ec0a234ddd78e6e0c0831242c2e1ccb2b493155 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 15:07:58 +0200 Subject: [PATCH 16/30] S T R I C T compiler --- co_sim_io/sources/communication/base_socket_communication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/co_sim_io/sources/communication/base_socket_communication.cpp b/co_sim_io/sources/communication/base_socket_communication.cpp index a5fb6806..8f71c4c1 100644 --- a/co_sim_io/sources/communication/base_socket_communication.cpp +++ b/co_sim_io/sources/communication/base_socket_communication.cpp @@ -19,7 +19,7 @@ namespace CoSimIO { namespace Internals { template -BaseSocketCommunication::~BaseSocketCommunication() +BaseSocketCommunication::~BaseSocketCommunication() { CO_SIM_IO_TRY From ff44966bc939ac8c9d6e498186ed4ccd9b3e8fd8 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 15:08:31 +0200 Subject: [PATCH 17/30] =?UTF-8?q?=E3=81=B0=E3=82=93=E3=81=95=E3=81=8F?= =?UTF-8?q?=E3=81=A4=E3=81=8D=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/co_sim_io/c/info/test_info_bool.c | 6 +++--- tests/co_sim_io/c/info/test_info_clear.c | 6 +++--- tests/co_sim_io/c/info/test_info_copy.c | 6 +++--- tests/co_sim_io/c/info/test_info_double.c | 6 +++--- tests/co_sim_io/c/info/test_info_erase.c | 6 +++--- tests/co_sim_io/c/info/test_info_info.c | 6 +++--- tests/co_sim_io/c/info/test_info_int.c | 6 +++--- tests/co_sim_io/c/info/test_info_multiple_vals.c | 6 +++--- tests/co_sim_io/c/info/test_info_print.c | 6 +++--- tests/co_sim_io/c/info/test_info_size.c | 6 +++--- tests/co_sim_io/c/info/test_info_string.c | 6 +++--- tests/co_sim_io/c/model_part/test_model_part.c | 6 +++--- .../c/model_part/test_model_part_create_multiple.c | 6 +++--- tests/co_sim_io/c/model_part/test_model_part_element.c | 8 ++++---- tests/co_sim_io/c/model_part/test_model_part_ghost.c | 6 +++--- tests/co_sim_io/c/model_part/test_model_part_node.c | 6 +++--- 16 files changed, 49 insertions(+), 49 deletions(-) diff --git a/tests/co_sim_io/c/info/test_info_bool.c b/tests/co_sim_io/c/info/test_info_bool.c index 64e96cad..e7d1c726 100644 --- a/tests/co_sim_io/c/info/test_info_bool.c +++ b/tests/co_sim_io/c/info/test_info_bool.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_FALSE(CoSimIO_Info_Has(info, "is_converged")); diff --git a/tests/co_sim_io/c/info/test_info_clear.c b/tests/co_sim_io/c/info/test_info_clear.c index 7d050e48..a0ed4e34 100644 --- a/tests/co_sim_io/c/info/test_info_clear.c +++ b/tests/co_sim_io/c/info/test_info_clear.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0); diff --git a/tests/co_sim_io/c/info/test_info_copy.c b/tests/co_sim_io/c/info/test_info_copy.c index d450f998..43fd19e0 100644 --- a/tests/co_sim_io/c/info/test_info_copy.c +++ b/tests/co_sim_io/c/info/test_info_copy.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info, copied_info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0); diff --git a/tests/co_sim_io/c/info/test_info_double.c b/tests/co_sim_io/c/info/test_info_double.c index 24aa189d..cc840c6d 100644 --- a/tests/co_sim_io/c/info/test_info_double.c +++ b/tests/co_sim_io/c/info/test_info_double.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_FALSE(CoSimIO_Info_Has(info, "tolerance")); diff --git a/tests/co_sim_io/c/info/test_info_erase.c b/tests/co_sim_io/c/info/test_info_erase.c index ecbfa91e..e4568b09 100644 --- a/tests/co_sim_io/c/info/test_info_erase.c +++ b/tests/co_sim_io/c/info/test_info_erase.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0); diff --git a/tests/co_sim_io/c/info/test_info_info.c b/tests/co_sim_io/c/info/test_info_info.c index 2f7f5df6..d1478335 100644 --- a/tests/co_sim_io/c/info/test_info_info.c +++ b/tests/co_sim_io/c/info/test_info_info.c @@ -17,14 +17,14 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; CoSimIO_Info sub_info; CoSimIO_Info retrieved_sub_info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); sub_info = CoSimIO_CreateInfo(); diff --git a/tests/co_sim_io/c/info/test_info_int.c b/tests/co_sim_io/c/info/test_info_int.c index 5e1b7d6d..1af2a373 100644 --- a/tests/co_sim_io/c/info/test_info_int.c +++ b/tests/co_sim_io/c/info/test_info_int.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_FALSE(CoSimIO_Info_Has(info, "echo_level")); diff --git a/tests/co_sim_io/c/info/test_info_multiple_vals.c b/tests/co_sim_io/c/info/test_info_multiple_vals.c index ccfc9b61..4750741f 100644 --- a/tests/co_sim_io/c/info/test_info_multiple_vals.c +++ b/tests/co_sim_io/c/info/test_info_multiple_vals.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0); diff --git a/tests/co_sim_io/c/info/test_info_print.c b/tests/co_sim_io/c/info/test_info_print.c index 2b38c534..ce7fe2b9 100644 --- a/tests/co_sim_io/c/info/test_info_print.c +++ b/tests/co_sim_io/c/info/test_info_print.c @@ -18,13 +18,13 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; char buffer[BUFSIZ]; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); CoSimIO_Info_SetInt(info, "echo_level", 6); diff --git a/tests/co_sim_io/c/info/test_info_size.c b/tests/co_sim_io/c/info/test_info_size.c index b84879b1..1d3df0d7 100644 --- a/tests/co_sim_io/c/info/test_info_size.c +++ b/tests/co_sim_io/c/info/test_info_size.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_INT_EQUAL(CoSimIO_Info_Size(info), 0); diff --git a/tests/co_sim_io/c/info/test_info_string.c b/tests/co_sim_io/c/info/test_info_string.c index dcc1d455..c8e0e1d2 100644 --- a/tests/co_sim_io/c/info/test_info_string.c +++ b/tests/co_sim_io/c/info/test_info_string.c @@ -17,12 +17,12 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ CoSimIO_Info info; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + info = CoSimIO_CreateInfo(); COSIMIO_CHECK_FALSE(CoSimIO_Info_Has(info, "identifier")); diff --git a/tests/co_sim_io/c/model_part/test_model_part.c b/tests/co_sim_io/c/model_part/test_model_part.c index 9f112b50..ef524cf4 100644 --- a/tests/co_sim_io/c/model_part/test_model_part.c +++ b/tests/co_sim_io/c/model_part/test_model_part.c @@ -17,9 +17,6 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ int i; int connectivity[2]; @@ -27,6 +24,9 @@ int main(int argc, const char** argv) CoSimIO_Element elem; CoSimIO_ModelPart model_part; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + model_part = CoSimIO_CreateModelPart("my_model_part"); COSIMIO_CHECK_STRING_EQUAL(CoSimIO_ModelPart_Name(model_part), "my_model_part"); diff --git a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c index 62af7d46..da0fcb1d 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c +++ b/tests/co_sim_io/c/model_part/test_model_part_create_multiple.c @@ -17,9 +17,6 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ int i; int j; @@ -40,6 +37,9 @@ int main(int argc, const char** argv) CoSimIO_Node node; CoSimIO_Element elem; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + model_part = CoSimIO_CreateModelPart("my_model_part"); COSIMIO_CHECK_INT_EQUAL(CoSimIO_ModelPart_NumberOfNodes(model_part), 0); diff --git a/tests/co_sim_io/c/model_part/test_model_part_element.c b/tests/co_sim_io/c/model_part/test_model_part_element.c index 88d755e3..8369c783 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_element.c +++ b/tests/co_sim_io/c/model_part/test_model_part_element.c @@ -17,17 +17,17 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ int i; int connectivity[3]; CoSimIO_Element elem_tri, elem_line, elem_point, elem_tri_by_index, elem_line_by_index, elem_point_by_index, elem_tri_by_id, elem_line_by_id, elem_point_by_id; CoSimIO_ModelPart model_part; - model_part = CoSimIO_CreateModelPart("my_model_part"); + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + for (i=0; i<5; ++i) { + model_part = CoSimIO_CreateModelPart("my_model_part"); CoSimIO_ModelPart_CreateNewNode( model_part, i+1, diff --git a/tests/co_sim_io/c/model_part/test_model_part_ghost.c b/tests/co_sim_io/c/model_part/test_model_part_ghost.c index 3bb7facb..2f2dd84d 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_ghost.c +++ b/tests/co_sim_io/c/model_part/test_model_part_ghost.c @@ -17,9 +17,6 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ int i; int connectivity[2]; @@ -27,6 +24,9 @@ int main(int argc, const char** argv) CoSimIO_Element elem; CoSimIO_ModelPart model_part; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + model_part = CoSimIO_CreateModelPart("my_model_part"); COSIMIO_CHECK_STRING_EQUAL(CoSimIO_ModelPart_Name(model_part), "my_model_part"); diff --git a/tests/co_sim_io/c/model_part/test_model_part_node.c b/tests/co_sim_io/c/model_part/test_model_part_node.c index 940a15f1..929ad84f 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_node.c +++ b/tests/co_sim_io/c/model_part/test_model_part_node.c @@ -17,9 +17,6 @@ int main(int argc, const char** argv) { - COSIMIO_UNUSED(argc); - COSIMIO_UNUSED(argv); - /* declaring variables */ int i; CoSimIO_ModelPart model_part; @@ -31,6 +28,9 @@ int main(int argc, const char** argv) double coords_2[] = {-1.0, -2.8, 0.0}; double coords_3[] = {0.0, 3.7, 39.44}; + COSIMIO_UNUSED(argc); + COSIMIO_UNUSED(argv); + model_part = CoSimIO_CreateModelPart("my_model_part"); /* the memory of the node is managed on the C++ side */ From 2f1fb0421210955204212ee929b0eb7c800cd0ae Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 15:17:13 +0200 Subject: [PATCH 18/30] more unused arguments --- tests/integration_tutorials/cpp/connect_disconnect_a.cpp | 5 ++++- tests/integration_tutorials/cpp/connect_disconnect_b.cpp | 5 ++++- tests/integration_tutorials/cpp/data_exchange.cpp | 5 ++++- tests/integration_tutorials/cpp/export_data.cpp | 5 ++++- tests/integration_tutorials/cpp/export_info.cpp | 5 ++++- tests/integration_tutorials/cpp/export_mesh.cpp | 5 ++++- tests/integration_tutorials/cpp/hello.cpp | 5 ++++- tests/integration_tutorials/cpp/import_data.cpp | 5 ++++- tests/integration_tutorials/cpp/import_info.cpp | 5 ++++- tests/integration_tutorials/cpp/import_mesh.cpp | 5 ++++- tests/integration_tutorials/cpp/mesh_exchange.cpp | 5 ++++- tests/integration_tutorials/cpp/run.cpp | 5 ++++- tests/integration_tutorials/cpp/runner.cpp | 5 ++++- 13 files changed, 52 insertions(+), 13 deletions(-) diff --git a/tests/integration_tutorials/cpp/connect_disconnect_a.cpp b/tests/integration_tutorials/cpp/connect_disconnect_a.cpp index 78410d2e..aaaea42f 100644 --- a/tests/integration_tutorials/cpp/connect_disconnect_a.cpp +++ b/tests/integration_tutorials/cpp/connect_disconnect_a.cpp @@ -20,7 +20,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_connect_disconnect_a"); @@ -29,6 +29,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/connect_disconnect_b.cpp b/tests/integration_tutorials/cpp/connect_disconnect_b.cpp index 88563d52..5b21006f 100644 --- a/tests/integration_tutorials/cpp/connect_disconnect_b.cpp +++ b/tests/integration_tutorials/cpp/connect_disconnect_b.cpp @@ -20,7 +20,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_connect_disconnect_b"); @@ -29,6 +29,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/data_exchange.cpp b/tests/integration_tutorials/cpp/data_exchange.cpp index e0f7360a..f4d48a17 100644 --- a/tests/integration_tutorials/cpp/data_exchange.cpp +++ b/tests/integration_tutorials/cpp/data_exchange.cpp @@ -23,13 +23,16 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "my_code"); settings.Set("connect_to", "Kratos"); settings.Set("echo_level", 1); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/export_data.cpp b/tests/integration_tutorials/cpp/export_data.cpp index 442b500a..5ddb63c5 100644 --- a/tests/integration_tutorials/cpp/export_data.cpp +++ b/tests/integration_tutorials/cpp/export_data.cpp @@ -20,7 +20,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_export_solver"); @@ -28,6 +28,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/export_info.cpp b/tests/integration_tutorials/cpp/export_info.cpp index 4e1f97ac..e9f3dd64 100644 --- a/tests/integration_tutorials/cpp/export_info.cpp +++ b/tests/integration_tutorials/cpp/export_info.cpp @@ -20,7 +20,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_export_info_solver"); @@ -28,6 +28,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/export_mesh.cpp b/tests/integration_tutorials/cpp/export_mesh.cpp index d683059d..3cedbf19 100644 --- a/tests/integration_tutorials/cpp/export_mesh.cpp +++ b/tests/integration_tutorials/cpp/export_mesh.cpp @@ -24,7 +24,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_mesh_export_solver"); @@ -32,6 +32,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/hello.cpp b/tests/integration_tutorials/cpp/hello.cpp index 39d091ec..83cc4013 100644 --- a/tests/integration_tutorials/cpp/hello.cpp +++ b/tests/integration_tutorials/cpp/hello.cpp @@ -20,10 +20,13 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { auto info = CoSimIO::Hello(); + (void)(argc); + (void)(argv); + std::cout << info << std::endl; int major_version = info.Get("major_version"); diff --git a/tests/integration_tutorials/cpp/import_data.cpp b/tests/integration_tutorials/cpp/import_data.cpp index be0e1159..1771ecf0 100644 --- a/tests/integration_tutorials/cpp/import_data.cpp +++ b/tests/integration_tutorials/cpp/import_data.cpp @@ -20,7 +20,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_import_solver"); @@ -28,6 +28,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/import_info.cpp b/tests/integration_tutorials/cpp/import_info.cpp index fe64abb8..62bb4694 100644 --- a/tests/integration_tutorials/cpp/import_info.cpp +++ b/tests/integration_tutorials/cpp/import_info.cpp @@ -20,7 +20,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_import_info_solver"); @@ -28,6 +28,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/import_mesh.cpp b/tests/integration_tutorials/cpp/import_mesh.cpp index 213941a5..5b979665 100644 --- a/tests/integration_tutorials/cpp/import_mesh.cpp +++ b/tests/integration_tutorials/cpp/import_mesh.cpp @@ -24,7 +24,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_mesh_import_solver"); @@ -32,6 +32,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/mesh_exchange.cpp b/tests/integration_tutorials/cpp/mesh_exchange.cpp index cb88b73a..4ae7822a 100644 --- a/tests/integration_tutorials/cpp/mesh_exchange.cpp +++ b/tests/integration_tutorials/cpp/mesh_exchange.cpp @@ -23,13 +23,16 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "my_code"); settings.Set("connect_to", "Kratos"); settings.Set("echo_level", 1); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); const std::string connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/run.cpp b/tests/integration_tutorials/cpp/run.cpp index ee6e2d04..6bbcd11f 100644 --- a/tests/integration_tutorials/cpp/run.cpp +++ b/tests/integration_tutorials/cpp/run.cpp @@ -135,7 +135,7 @@ CoSimIO::Info ExportMesh(const CoSimIO::Info& I_Info) } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_run"); @@ -143,6 +143,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_EQUAL(info.Get("connection_status"), CoSimIO::ConnectionStatus::Connected); s_connection_name = info.Get("connection_name"); diff --git a/tests/integration_tutorials/cpp/runner.cpp b/tests/integration_tutorials/cpp/runner.cpp index d57df6a0..f85a9ce7 100644 --- a/tests/integration_tutorials/cpp/runner.cpp +++ b/tests/integration_tutorials/cpp/runner.cpp @@ -67,7 +67,7 @@ bool ControlOtherCode(const std::string& I_FunctionName) return check_info.Get("name_for_check") == I_FunctionName; } -int main() +int main(int argc, const char** argv) { CoSimIO::Info settings; settings.Set("my_name", "cpp_runner"); @@ -75,6 +75,9 @@ int main() settings.Set("echo_level", 1); settings.Set("version", "1.25"); + (void)(argc); + (void)(argv); + auto info = CoSimIO::Connect(settings); COSIMIO_CHECK_TRUE(info.Get("connection_status") == CoSimIO::ConnectionStatus::Connected); s_connection_name = info.Get("connection_name"); From c9a66f2a26300d605c917413c7d5b52898f9e062 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 15:17:28 +0200 Subject: [PATCH 19/30] install python on rocky --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08e72e16..1f652bae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -353,6 +353,11 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - name: Build CoSimIO run: | cmake -H"." -B"build" \ From b13c60b8c14ff3d1d15a4441eda50d61c2d6357c Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 15:21:59 +0200 Subject: [PATCH 20/30] more unused arguments --- tests/integration_tutorials/c/connect_disconnect_a.c | 5 ++++- tests/integration_tutorials/c/connect_disconnect_b.c | 5 ++++- tests/integration_tutorials/c/data_exchange.c | 5 ++++- tests/integration_tutorials/c/export_data.c | 5 ++++- tests/integration_tutorials/c/export_info.c | 5 ++++- tests/integration_tutorials/c/export_mesh.c | 5 ++++- tests/integration_tutorials/c/hello.c | 5 ++++- tests/integration_tutorials/c/import_data.c | 5 ++++- tests/integration_tutorials/c/import_info.c | 5 ++++- tests/integration_tutorials/c/import_mesh.c | 5 ++++- tests/integration_tutorials/c/mesh_exchange.c | 5 ++++- 11 files changed, 44 insertions(+), 11 deletions(-) diff --git a/tests/integration_tutorials/c/connect_disconnect_a.c b/tests/integration_tutorials/c/connect_disconnect_a.c index 8f0f62ae..c5df5bcb 100644 --- a/tests/integration_tutorials/c/connect_disconnect_a.c +++ b/tests/integration_tutorials/c/connect_disconnect_a.c @@ -19,12 +19,15 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info settings, connect_info, disconnect_settings, disconnect_info; const char* connection_name; + (void)(argc); + (void)(argv); + settings = CoSimIO_CreateInfo(); CoSimIO_Info_SetString(settings, "my_name", "c_connect_disconnect_a"); CoSimIO_Info_SetString(settings, "connect_to", "c_connect_disconnect_b"); diff --git a/tests/integration_tutorials/c/connect_disconnect_b.c b/tests/integration_tutorials/c/connect_disconnect_b.c index 457ce77a..4bcad722 100644 --- a/tests/integration_tutorials/c/connect_disconnect_b.c +++ b/tests/integration_tutorials/c/connect_disconnect_b.c @@ -19,12 +19,15 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info settings, connect_info, disconnect_settings, disconnect_info; const char* connection_name; + (void)(argc); + (void)(argv); + settings = CoSimIO_CreateInfo(); CoSimIO_Info_SetString(settings, "my_name", "c_connect_disconnect_b"); CoSimIO_Info_SetString(settings, "connect_to", "c_connect_disconnect_a"); diff --git a/tests/integration_tutorials/c/data_exchange.c b/tests/integration_tutorials/c/data_exchange.c index 1934a182..f2d5a3e7 100644 --- a/tests/integration_tutorials/c/data_exchange.c +++ b/tests/integration_tutorials/c/data_exchange.c @@ -19,7 +19,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info connection_settings, connect_info, export_settings, import_settings, export_info, import_info, disconnect_settings, disconnect_info; @@ -29,6 +29,9 @@ int main() double* imported_data; int data_allocated_size = 0; + (void)(argc); + (void)(argv); + /* Creating the connection settings */ connection_settings = CoSimIO_CreateInfo(); CoSimIO_Info_SetString(connection_settings, "my_name", "c_export_data"); diff --git a/tests/integration_tutorials/c/export_data.c b/tests/integration_tutorials/c/export_data.c index b5202f98..4504b8c4 100644 --- a/tests/integration_tutorials/c/export_data.c +++ b/tests/integration_tutorials/c/export_data.c @@ -19,7 +19,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info connection_settings, connect_info, export_settings, export_info, disconnect_settings, disconnect_info; @@ -27,6 +27,9 @@ int main() int data_size = 4; double data_to_send[] = {3.14, 3.14, 3.14, 3.14}; + (void)(argc); + (void)(argv); + /* Creating the connection settings */ connection_settings = CoSimIO_CreateInfo(); CoSimIO_Info_SetString(connection_settings, "my_name", "c_export_data"); diff --git a/tests/integration_tutorials/c/export_info.c b/tests/integration_tutorials/c/export_info.c index 8a4f64e0..1db8d33b 100644 --- a/tests/integration_tutorials/c/export_info.c +++ b/tests/integration_tutorials/c/export_info.c @@ -19,12 +19,15 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info connection_settings, connect_info, info_to_export, export_info, disconnect_settings, disconnect_info; const char* connection_name; + (void)(argc); + (void)(argv); + /* Creating the connection settings */ connection_settings=CoSimIO_CreateInfo(); CoSimIO_Info_SetString(connection_settings, "my_name", "c_export_info"); diff --git a/tests/integration_tutorials/c/export_mesh.c b/tests/integration_tutorials/c/export_mesh.c index fd97e4ba..e44c14be 100644 --- a/tests/integration_tutorials/c/export_mesh.c +++ b/tests/integration_tutorials/c/export_mesh.c @@ -19,7 +19,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i,j; @@ -54,6 +54,9 @@ int main() CoSimIO_Info_SetInt(connection_settings, "echo_level", 1); CoSimIO_Info_SetString(connection_settings, "version", "1.25"); + (void)(argc); + (void)(argv); + /* Connecting using the connection settings */ connect_info = CoSimIO_Connect(connection_settings); COSIMIO_CHECK_EQUAL(CoSimIO_Info_GetInt(connect_info, "connection_status"), CoSimIO_Connected); diff --git a/tests/integration_tutorials/c/hello.c b/tests/integration_tutorials/c/hello.c index 7c45ba74..1b32cbac 100644 --- a/tests/integration_tutorials/c/hello.c +++ b/tests/integration_tutorials/c/hello.c @@ -23,12 +23,15 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info hello_info; int major_version, minor_version; + (void)(argc); + (void)(argv); + hello_info = CoSimIO_Hello(); CoSimIO_PrintInfo(stdout, hello_info); diff --git a/tests/integration_tutorials/c/import_data.c b/tests/integration_tutorials/c/import_data.c index 6eada851..6eb9373c 100644 --- a/tests/integration_tutorials/c/import_data.c +++ b/tests/integration_tutorials/c/import_data.c @@ -19,7 +19,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info connection_settings, connect_info, import_settings, import_info, disconnect_settings, disconnect_info; @@ -27,6 +27,9 @@ int main() double* data; int data_allocated_size = 0; + (void)(argc); + (void)(argv); + /* Creating the connection settings */ connection_settings=CoSimIO_CreateInfo(); CoSimIO_Info_SetString(connection_settings, "my_name", "c_import_data"); diff --git a/tests/integration_tutorials/c/import_info.c b/tests/integration_tutorials/c/import_info.c index 479cc383..408fd009 100644 --- a/tests/integration_tutorials/c/import_info.c +++ b/tests/integration_tutorials/c/import_info.c @@ -36,12 +36,15 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ CoSimIO_Info connection_settings, connect_info, export_info, imported_info, disconnect_settings, disconnect_info; const char* connection_name; + (void)(argc); + (void)(argv); + /* Creating the connection settings */ connection_settings=CoSimIO_CreateInfo(); CoSimIO_Info_SetString(connection_settings, "my_name", "c_import_info"); diff --git a/tests/integration_tutorials/c/import_mesh.c b/tests/integration_tutorials/c/import_mesh.c index c04dac95..26895036 100644 --- a/tests/integration_tutorials/c/import_mesh.c +++ b/tests/integration_tutorials/c/import_mesh.c @@ -25,7 +25,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i, j; @@ -53,6 +53,9 @@ int main() int expected_number_of_elements = 4; + (void)(argc); + (void)(argv); + /* Creating the connection settings */ connection_settings=CoSimIO_CreateInfo(); CoSimIO_Info_SetString(connection_settings, "my_name", "c_import_mesh"); diff --git a/tests/integration_tutorials/c/mesh_exchange.c b/tests/integration_tutorials/c/mesh_exchange.c index a196f0de..3647679d 100644 --- a/tests/integration_tutorials/c/mesh_exchange.c +++ b/tests/integration_tutorials/c/mesh_exchange.c @@ -25,7 +25,7 @@ return 1; \ } -int main() +int main(int argc, const char** argv) { /* declaring variables */ int i,j; @@ -63,6 +63,9 @@ int main() CoSimIO_Info_SetInt(connection_settings, "echo_level", 1); CoSimIO_Info_SetString(connection_settings, "version", "1.25"); + (void)(argc); + (void)(argv); + /* Connecting using the connection settings */ connect_info = CoSimIO_Connect(connection_settings); COSIMIO_CHECK_EQUAL_INT(CoSimIO_Info_GetInt(connect_info, "connection_status"), CoSimIO_Connected); From 5d44e2227984fed1f6e2dc10ba327005d6012e8c Mon Sep 17 00:00:00 2001 From: matekelemen Date: Mon, 14 Apr 2025 20:01:54 +0200 Subject: [PATCH 21/30] revert line move by mistake --- tests/co_sim_io/c/model_part/test_model_part_element.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/co_sim_io/c/model_part/test_model_part_element.c b/tests/co_sim_io/c/model_part/test_model_part_element.c index 8369c783..55b861c3 100644 --- a/tests/co_sim_io/c/model_part/test_model_part_element.c +++ b/tests/co_sim_io/c/model_part/test_model_part_element.c @@ -26,8 +26,8 @@ int main(int argc, const char** argv) COSIMIO_UNUSED(argc); COSIMIO_UNUSED(argv); - for (i=0; i<5; ++i) { model_part = CoSimIO_CreateModelPart("my_model_part"); + for (i=0; i<5; ++i) { CoSimIO_ModelPart_CreateNewNode( model_part, i+1, From 678abb5bc3351c07c9fabb1f5909929851cf8e9d Mon Sep 17 00:00:00 2001 From: matekelemen Date: Tue, 15 Apr 2025 00:21:27 +0200 Subject: [PATCH 22/30] don't install python on rocky, it should be included in the image --- .github/workflows/ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f652bae..48b77eeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -349,14 +349,10 @@ jobs: container: image: kratosmultiphysics/kratos-image-ci-rocky8:latest + options: --user 1001 steps: - - uses: actions/checkout@v2 - - - name: Set up Python 3.9 - uses: actions/setup-python@v5 - with: - python-version: '3.9' + - uses: actions/checkout@v4 - name: Build CoSimIO run: | From 2897bc302890d08e8637d5969e888362e1df42e0 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Tue, 15 Apr 2025 00:21:56 +0200 Subject: [PATCH 23/30] actions/checkout@v2 => actions/checkout@v4 --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48b77eeb..ce8ad7ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 30 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install dependencies run: | @@ -128,7 +128,7 @@ jobs: timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install Intel compiler if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} @@ -194,7 +194,7 @@ jobs: timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build CoSimIO run: | @@ -221,7 +221,7 @@ jobs: timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -253,7 +253,7 @@ jobs: timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build CoSimIO shell: cmd @@ -297,7 +297,7 @@ jobs: timeout-minutes: 15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -395,7 +395,7 @@ jobs: sudo apt-get update sudo apt-get install libopenmpi-dev openmpi-bin - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build CoSimIO run: | From 1c95afc4b2c8712f116526fb56e0aef911d8abce Mon Sep 17 00:00:00 2001 From: matekelemen Date: Wed, 23 Apr 2025 13:26:15 +0200 Subject: [PATCH 24/30] pick specific python version in rocky --- .github/workflows/ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce8ad7ca..d94f082b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -356,11 +356,12 @@ jobs: - name: Build CoSimIO run: | - cmake -H"." -B"build" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCO_SIM_IO_BUILD_C=ON \ - -DCO_SIM_IO_BUILD_PYTHON=ON \ - -DCO_SIM_IO_STRICT_COMPILER=ON + cmake -H"." -B"build" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCO_SIM_IO_BUILD_C=ON \ + -DCO_SIM_IO_BUILD_PYTHON=ON \ + -DCO_SIM_IO_STRICT_COMPILER=ON \ + -DPYTHON_EXECUTABLE=$(which python3.8) cmake --build "build" --target install -- -j2 From 9420d941597d5ab2f4625bebd65342ed66526cda Mon Sep 17 00:00:00 2001 From: matekelemen Date: Wed, 23 Apr 2025 13:51:42 +0200 Subject: [PATCH 25/30] rocky rocky in the CI, y u don't find version 3.8 of py? --- .github/workflows/ci.yml | 383 +-------------------------------------- 1 file changed, 1 insertion(+), 382 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d94f082b..9f2f1266 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,335 +14,6 @@ concurrency: cancel-in-progress: true jobs: - Ubuntu-Cpp-C: - runs-on: ubuntu-latest - name: "Ubuntu C++ & C (${{ matrix.compiler }} / ${{ matrix.mpi }})" - strategy: - fail-fast: false - matrix: - compiler: [GCC, CLANG, ICX, ICPX] - mpi: [OpenMPI, IntelMPI] - exclude: - # CLANG is not properly supported by Intel, better use LLVMIntel in the future - - compiler: CLANG - mpi: IntelMPI - timeout-minutes: 30 - - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - # see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable - cd /tmp - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" - - sudo apt-get update - - sudo apt-get install \ - valgrind \ - clang - - - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} - run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp - - - name: Install MPI - run: | - if [ ${{ matrix.mpi }} = OpenMPI ]; then - sudo apt-get install libopenmpi-dev openmpi-bin - else - sudo apt-get install intel-oneapi-mpi-devel - fi - - - name: Build CoSimIO - run: | - if [ ${{ matrix.compiler }} = GCC ]; then - export CXX=/usr/bin/g++ - export CC=/usr/bin/gcc - elif [ ${{ matrix.compiler }} = CLANG ]; then - export CXX=/usr/bin/clang++ - export CC=/usr/bin/clang - elif [ ${{ matrix.compiler }} = ICX ]; then - export CXX=icpx - export CC=icx - elif [ ${{ matrix.compiler }} = ICPX ]; then - export CXX=icpx - export CC=icx - else - echo 'Unsupported compiler: ${{ matrix.compiler }}' - exit 1 - fi - - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then - source /opt/intel/oneapi/setvars.sh - fi - - build_mpi_comm=OFF - if [ ${{ matrix.mpi }} = IntelMPI ]; then - build_mpi_comm=ON - fi - - cmake -H"." -B"build" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCO_SIM_IO_BUILD_C=ON \ - -DCO_SIM_IO_BUILD_FORTRAN=OFF \ - -DCO_SIM_IO_BUILD_MPI=ON \ - -DCO_SIM_IO_BUILD_MPI_COMMUNICATION=$build_mpi_comm \ - -DCO_SIM_IO_STRICT_COMPILER=ON - - cmake --build "build" --target install -- -j2 - - - name: Running tests - env: - OMPI_MCA_rmaps_base_oversubscribe: 1 # Allow oversubscription for MPI (needed for OpenMPI >= 3.0) - run: | - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin - export PATH=${PATH}:${GITHUB_WORKSPACE}/bin # required for IntelMPI - export PATH=${PATH}:${GITHUB_WORKSPACE}/bin/tests_c_mpi # required for IntelMPI - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then - source /opt/intel/oneapi/setvars.sh - fi - - cd build - ctest -T memcheck --output-on-failure - - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: "CTest Log Ubuntu C++ & C (${{ matrix.compiler }}-${{ matrix.mpi }})" - path: ${{ github.workspace }}/build/Testing/ - - - Ubuntu-Python: - runs-on: ubuntu-latest - name: Ubuntu Python ${{ matrix.python-version }} (${{ matrix.compiler }}) - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - compiler: [GCC, ICX] - timeout-minutes: 15 - - steps: - - uses: actions/checkout@v4 - - - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} - run: | - # see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable - cd /tmp - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB - sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" - - sudo apt-get update - sudo apt-get install intel-oneapi-compiler-dpcpp-cpp - - - name: Install MPI - run: | - sudo apt-get update - sudo apt-get install libopenmpi-dev openmpi-bin - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Build CoSimIO - run: | - cmake -H"." -B"build" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCO_SIM_IO_BUILD_PYTHON=ON \ - -DCO_SIM_IO_BUILD_MPI=ON \ - -DPYBIND11_PYTHON_VERSION=${{ matrix.python-version }} \ - -DCO_SIM_IO_STRICT_COMPILER=ON - - cmake --build "build" --target install -- -j2 - - - name: Running tests - run: | - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then - source /opt/intel/oneapi/setvars.sh - fi - export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin - cd tests - # TODO delete build dir to make sure the linking etc works correctly? - python run_python_tests.py - - - name: Running MPI tests - run: | - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then - source /opt/intel/oneapi/setvars.sh - fi - export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin - cd tests - #TODO run the tests... - # TODO delete build dir to make sure the linking etc works correctly? - # python run_python_tests.py - - - MacOS-Cpp-C: - runs-on: macOS-latest - name: MacOS C++ & C - timeout-minutes: 15 - - steps: - - uses: actions/checkout@v4 - - - name: Build CoSimIO - run: | - cmake -H"." -B"build" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCO_SIM_IO_BUILD_C=ON \ - -DCO_SIM_IO_STRICT_COMPILER=ON - - cmake --build "build" --target install -- -j3 - - - name: Running tests - run: | - cd build - ctest --output-on-failure - - - MacOS-Python: - runs-on: macOS-latest - name: MacOS Python ${{ matrix.python-version }} - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - timeout-minutes: 15 - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Build CoSimIO - run: | - cmake -H"." -B"build" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCO_SIM_IO_BUILD_PYTHON=ON \ - -DPYBIND11_PYTHON_VERSION=${{ matrix.python-version }} \ - -DCO_SIM_IO_STRICT_COMPILER=ON - - cmake --build "build" --target install -- -j3 - - - name: Running tests - run: | - export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin - export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin - cd tests - # TODO delete build dir to make sure the linking etc works correctly? - python run_python_tests.py - - - Windows-Cpp-C: - runs-on: windows-latest - name: Windows C++ & C - timeout-minutes: 15 - - steps: - - uses: actions/checkout@v4 - - - name: Build CoSimIO - shell: cmd - run: | - call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 || goto :error - - set CC=cl.exe - set CXX=cl.exe - - cmake ^ - -G"Visual Studio 17 2022" ^ - -H"." ^ - -B"build" ^ - -DCMAKE_BUILD_TYPE="Debug" ^ - -DCO_SIM_IO_BUILD_C=ON ^ - -DCO_SIM_IO_STRICT_COMPILER=ON || goto :error - - cmake --build "build" --target install -- /p:Platform=x64 || goto :error - - goto :EOF - - :error - echo Failed with error #%errorlevel%. - exit /b %errorlevel% - - - name: Running tests - shell: cmd - run: | - set PATH=%PATH%;%GITHUB_WORKSPACE%/bin - cd build - ctest -C Debug --output-on-failure - - - Windows-Python: - runs-on: windows-latest - name: Windows Python ${{ matrix.python-version }} - strategy: - fail-fast: false - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - timeout-minutes: 15 - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Installing dependencies - shell: cmd - run: | - pip install numpy - - - name: Build CoSimIO - shell: cmd - run: | - call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 || goto :error - - set CC=cl.exe - set CXX=cl.exe - - cmake ^ - -G"Visual Studio 17 2022" ^ - -H"." ^ - -B"build" ^ - -DCO_SIM_IO_BUILD_PYTHON=ON ^ - -DCO_SIM_IO_STRICT_COMPILER=ON || goto :error - - cmake --build "build" --target install -- /p:Platform=x64 || goto :error - - goto :EOF - - :error - echo Failed with error #%errorlevel%. - exit /b %errorlevel% - - - name: Running tests - env: - PYTHON_CMD: python # for the tests (subprocess) - shell: cmd - run: | - set PYTHONPATH=%PYTHONPATH%;%GITHUB_WORKSPACE%/bin - cd tests - rem TODO delete build dir to make sure the linking etc works correctly? - python run_python_tests.py - - Rocky-8: runs-on: ubuntu-latest name: Rocky 8 @@ -355,57 +26,5 @@ jobs: - uses: actions/checkout@v4 - name: Build CoSimIO - run: | - cmake -H"." -B"build" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCO_SIM_IO_BUILD_C=ON \ - -DCO_SIM_IO_BUILD_PYTHON=ON \ - -DCO_SIM_IO_STRICT_COMPILER=ON \ - -DPYTHON_EXECUTABLE=$(which python3.8) - - cmake --build "build" --target install -- -j2 - - - name: Running tests (Ctest) - run: | - cd build - ctest --output-on-failure - - - name: Running tests (Python) - run: | - export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin - cd tests - # TODO delete build dir to make sure the linking etc works correctly? (Needs to be done after running CTests) - python3 run_python_tests.py - - - Ubuntu-minimum-CMake: - runs-on: ubuntu-latest - - steps: - - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v2 - with: - cmake-version: '3.15.x' - - - name: Use cmake - run: cmake --version - - - name: Install MPI - run: | - sudo apt-get update - sudo apt-get install libopenmpi-dev openmpi-bin - - - uses: actions/checkout@v4 - - - name: Build CoSimIO - run: | - cmake -H"." -B"build" \ - -DCMAKE_BUILD_TYPE="Debug" \ - -DCO_SIM_IO_BUILD_C=ON \ - -DCO_SIM_IO_BUILD_PYTHON=OFF \ - -DCO_SIM_IO_BUILD_TESTING=OFF \ - -DCO_SIM_IO_BUILD_MPI=ON \ - -DCO_SIM_IO_STRICT_COMPILER=ON + run: which python3.8 - cmake --build "build" --target install -- -j2 From 2123450ce1412c2203d34cdf7b0edfcecc0ff689 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Wed, 23 Apr 2025 13:54:33 +0200 Subject: [PATCH 26/30] Revert "rocky rocky in the CI, y u don't find version 3.8 of py?" This reverts commit 9420d941597d5ab2f4625bebd65342ed66526cda. --- .github/workflows/ci.yml | 383 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 382 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f2f1266..d94f082b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,335 @@ concurrency: cancel-in-progress: true jobs: + Ubuntu-Cpp-C: + runs-on: ubuntu-latest + name: "Ubuntu C++ & C (${{ matrix.compiler }} / ${{ matrix.mpi }})" + strategy: + fail-fast: false + matrix: + compiler: [GCC, CLANG, ICX, ICPX] + mpi: [OpenMPI, IntelMPI] + exclude: + # CLANG is not properly supported by Intel, better use LLVMIntel in the future + - compiler: CLANG + mpi: IntelMPI + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + # see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable + cd /tmp + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" + + sudo apt-get update + + sudo apt-get install \ + valgrind \ + clang + + - name: Install Intel compiler + if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} + run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp + + - name: Install MPI + run: | + if [ ${{ matrix.mpi }} = OpenMPI ]; then + sudo apt-get install libopenmpi-dev openmpi-bin + else + sudo apt-get install intel-oneapi-mpi-devel + fi + + - name: Build CoSimIO + run: | + if [ ${{ matrix.compiler }} = GCC ]; then + export CXX=/usr/bin/g++ + export CC=/usr/bin/gcc + elif [ ${{ matrix.compiler }} = CLANG ]; then + export CXX=/usr/bin/clang++ + export CC=/usr/bin/clang + elif [ ${{ matrix.compiler }} = ICX ]; then + export CXX=icpx + export CC=icx + elif [ ${{ matrix.compiler }} = ICPX ]; then + export CXX=icpx + export CC=icx + else + echo 'Unsupported compiler: ${{ matrix.compiler }}' + exit 1 + fi + + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then + source /opt/intel/oneapi/setvars.sh + fi + + build_mpi_comm=OFF + if [ ${{ matrix.mpi }} = IntelMPI ]; then + build_mpi_comm=ON + fi + + cmake -H"." -B"build" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCO_SIM_IO_BUILD_C=ON \ + -DCO_SIM_IO_BUILD_FORTRAN=OFF \ + -DCO_SIM_IO_BUILD_MPI=ON \ + -DCO_SIM_IO_BUILD_MPI_COMMUNICATION=$build_mpi_comm \ + -DCO_SIM_IO_STRICT_COMPILER=ON + + cmake --build "build" --target install -- -j2 + + - name: Running tests + env: + OMPI_MCA_rmaps_base_oversubscribe: 1 # Allow oversubscription for MPI (needed for OpenMPI >= 3.0) + run: | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin + export PATH=${PATH}:${GITHUB_WORKSPACE}/bin # required for IntelMPI + export PATH=${PATH}:${GITHUB_WORKSPACE}/bin/tests_c_mpi # required for IntelMPI + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then + source /opt/intel/oneapi/setvars.sh + fi + + cd build + ctest -T memcheck --output-on-failure + + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: "CTest Log Ubuntu C++ & C (${{ matrix.compiler }}-${{ matrix.mpi }})" + path: ${{ github.workspace }}/build/Testing/ + + + Ubuntu-Python: + runs-on: ubuntu-latest + name: Ubuntu Python ${{ matrix.python-version }} (${{ matrix.compiler }}) + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + compiler: [GCC, ICX] + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v4 + + - name: Install Intel compiler + if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} + run: | + # see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable + cd /tmp + wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB + sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" + + sudo apt-get update + sudo apt-get install intel-oneapi-compiler-dpcpp-cpp + + - name: Install MPI + run: | + sudo apt-get update + sudo apt-get install libopenmpi-dev openmpi-bin + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Build CoSimIO + run: | + cmake -H"." -B"build" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCO_SIM_IO_BUILD_PYTHON=ON \ + -DCO_SIM_IO_BUILD_MPI=ON \ + -DPYBIND11_PYTHON_VERSION=${{ matrix.python-version }} \ + -DCO_SIM_IO_STRICT_COMPILER=ON + + cmake --build "build" --target install -- -j2 + + - name: Running tests + run: | + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then + source /opt/intel/oneapi/setvars.sh + fi + export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin + cd tests + # TODO delete build dir to make sure the linking etc works correctly? + python run_python_tests.py + + - name: Running MPI tests + run: | + if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then + source /opt/intel/oneapi/setvars.sh + fi + export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin + cd tests + #TODO run the tests... + # TODO delete build dir to make sure the linking etc works correctly? + # python run_python_tests.py + + + MacOS-Cpp-C: + runs-on: macOS-latest + name: MacOS C++ & C + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v4 + + - name: Build CoSimIO + run: | + cmake -H"." -B"build" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCO_SIM_IO_BUILD_C=ON \ + -DCO_SIM_IO_STRICT_COMPILER=ON + + cmake --build "build" --target install -- -j3 + + - name: Running tests + run: | + cd build + ctest --output-on-failure + + + MacOS-Python: + runs-on: macOS-latest + name: MacOS Python ${{ matrix.python-version }} + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Build CoSimIO + run: | + cmake -H"." -B"build" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCO_SIM_IO_BUILD_PYTHON=ON \ + -DPYBIND11_PYTHON_VERSION=${{ matrix.python-version }} \ + -DCO_SIM_IO_STRICT_COMPILER=ON + + cmake --build "build" --target install -- -j3 + + - name: Running tests + run: | + export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin + export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin + cd tests + # TODO delete build dir to make sure the linking etc works correctly? + python run_python_tests.py + + + Windows-Cpp-C: + runs-on: windows-latest + name: Windows C++ & C + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v4 + + - name: Build CoSimIO + shell: cmd + run: | + call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 || goto :error + + set CC=cl.exe + set CXX=cl.exe + + cmake ^ + -G"Visual Studio 17 2022" ^ + -H"." ^ + -B"build" ^ + -DCMAKE_BUILD_TYPE="Debug" ^ + -DCO_SIM_IO_BUILD_C=ON ^ + -DCO_SIM_IO_STRICT_COMPILER=ON || goto :error + + cmake --build "build" --target install -- /p:Platform=x64 || goto :error + + goto :EOF + + :error + echo Failed with error #%errorlevel%. + exit /b %errorlevel% + + - name: Running tests + shell: cmd + run: | + set PATH=%PATH%;%GITHUB_WORKSPACE%/bin + cd build + ctest -C Debug --output-on-failure + + + Windows-Python: + runs-on: windows-latest + name: Windows Python ${{ matrix.python-version }} + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + timeout-minutes: 15 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Installing dependencies + shell: cmd + run: | + pip install numpy + + - name: Build CoSimIO + shell: cmd + run: | + call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 || goto :error + + set CC=cl.exe + set CXX=cl.exe + + cmake ^ + -G"Visual Studio 17 2022" ^ + -H"." ^ + -B"build" ^ + -DCO_SIM_IO_BUILD_PYTHON=ON ^ + -DCO_SIM_IO_STRICT_COMPILER=ON || goto :error + + cmake --build "build" --target install -- /p:Platform=x64 || goto :error + + goto :EOF + + :error + echo Failed with error #%errorlevel%. + exit /b %errorlevel% + + - name: Running tests + env: + PYTHON_CMD: python # for the tests (subprocess) + shell: cmd + run: | + set PYTHONPATH=%PYTHONPATH%;%GITHUB_WORKSPACE%/bin + cd tests + rem TODO delete build dir to make sure the linking etc works correctly? + python run_python_tests.py + + Rocky-8: runs-on: ubuntu-latest name: Rocky 8 @@ -26,5 +355,57 @@ jobs: - uses: actions/checkout@v4 - name: Build CoSimIO - run: which python3.8 + run: | + cmake -H"." -B"build" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCO_SIM_IO_BUILD_C=ON \ + -DCO_SIM_IO_BUILD_PYTHON=ON \ + -DCO_SIM_IO_STRICT_COMPILER=ON \ + -DPYTHON_EXECUTABLE=$(which python3.8) + + cmake --build "build" --target install -- -j2 + + - name: Running tests (Ctest) + run: | + cd build + ctest --output-on-failure + + - name: Running tests (Python) + run: | + export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin + cd tests + # TODO delete build dir to make sure the linking etc works correctly? (Needs to be done after running CTests) + python3 run_python_tests.py + + + Ubuntu-minimum-CMake: + runs-on: ubuntu-latest + + steps: + - name: Setup cmake + uses: jwlawson/actions-setup-cmake@v2 + with: + cmake-version: '3.15.x' + + - name: Use cmake + run: cmake --version + + - name: Install MPI + run: | + sudo apt-get update + sudo apt-get install libopenmpi-dev openmpi-bin + + - uses: actions/checkout@v4 + + - name: Build CoSimIO + run: | + cmake -H"." -B"build" \ + -DCMAKE_BUILD_TYPE="Debug" \ + -DCO_SIM_IO_BUILD_C=ON \ + -DCO_SIM_IO_BUILD_PYTHON=OFF \ + -DCO_SIM_IO_BUILD_TESTING=OFF \ + -DCO_SIM_IO_BUILD_MPI=ON \ + -DCO_SIM_IO_STRICT_COMPILER=ON + cmake --build "build" --target install -- -j2 From 01fb0867ac6e226c5373a28e37855fc8cd2fbb96 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Wed, 23 Apr 2025 13:55:06 +0200 Subject: [PATCH 27/30] avoid using 'which' in rocky --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d94f082b..7b7b5bce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -361,7 +361,7 @@ jobs: -DCO_SIM_IO_BUILD_C=ON \ -DCO_SIM_IO_BUILD_PYTHON=ON \ -DCO_SIM_IO_STRICT_COMPILER=ON \ - -DPYTHON_EXECUTABLE=$(which python3.8) + -DPYTHON_EXECUTABLE=/usr/local/bin/python3.8 cmake --build "build" --target install -- -j2 From c9068e8d4aa07ab95209cf46f41eec9b1e471e16 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Wed, 23 Apr 2025 14:07:14 +0200 Subject: [PATCH 28/30] invoke the correct python interpreter on rocky --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b7b5bce..1dc4df6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -376,7 +376,7 @@ jobs: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin cd tests # TODO delete build dir to make sure the linking etc works correctly? (Needs to be done after running CTests) - python3 run_python_tests.py + python3.8 run_python_tests.py Ubuntu-minimum-CMake: From 6cb3d9c95304cc13213a72b577b119b9958e09ee Mon Sep 17 00:00:00 2001 From: matekelemen Date: Wed, 23 Apr 2025 14:09:16 +0200 Subject: [PATCH 29/30] move to ubuntu-latest --- .github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile b/.github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile index 9ab16301..cbc9b932 100644 --- a/.github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile +++ b/.github/docker_files/docker_file_ci_ubuntu_22_04/DockerFile @@ -1,4 +1,4 @@ -FROM ubuntu:jammy +FROM ubuntu:latest ENV HOME /root From 646425cdfcb6202dc8808519c8b4bebe3904fa74 Mon Sep 17 00:00:00 2001 From: matekelemen Date: Wed, 23 Apr 2025 14:11:56 +0200 Subject: [PATCH 30/30] drop icx --- .github/workflows/ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dc4df6b..b05271de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: [GCC, CLANG, ICX, ICPX] + compiler: [GCC, CLANG, ICPX] mpi: [OpenMPI, IntelMPI] exclude: # CLANG is not properly supported by Intel, better use LLVMIntel in the future @@ -47,7 +47,7 @@ jobs: clang - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} + if: ${{ matrix.compiler == 'ICPX' }} run: sudo apt-get install intel-oneapi-compiler-dpcpp-cpp - name: Install MPI @@ -66,9 +66,6 @@ jobs: elif [ ${{ matrix.compiler }} = CLANG ]; then export CXX=/usr/bin/clang++ export CC=/usr/bin/clang - elif [ ${{ matrix.compiler }} = ICX ]; then - export CXX=icpx - export CC=icx elif [ ${{ matrix.compiler }} = ICPX ]; then export CXX=icpx export CC=icx @@ -77,7 +74,7 @@ jobs: exit 1 fi - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then + if [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then source /opt/intel/oneapi/setvars.sh fi @@ -103,7 +100,7 @@ jobs: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${GITHUB_WORKSPACE}/bin export PATH=${PATH}:${GITHUB_WORKSPACE}/bin # required for IntelMPI export PATH=${PATH}:${GITHUB_WORKSPACE}/bin/tests_c_mpi # required for IntelMPI - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then + if [ ${{ matrix.compiler }} = ICPX ] || [ ${{ matrix.mpi }} = IntelMPI ]; then source /opt/intel/oneapi/setvars.sh fi @@ -124,14 +121,14 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - compiler: [GCC, ICX] + compiler: [GCC, ICPX] timeout-minutes: 15 steps: - uses: actions/checkout@v4 - name: Install Intel compiler - if: ${{ matrix.compiler == 'ICX' || matrix.compiler == 'ICPX' }} + if: ${{ matrix.compiler == 'ICPX' }} run: | # see https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html#pkgtable cd /tmp @@ -166,7 +163,7 @@ jobs: - name: Running tests run: | - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then + if [ ${{ matrix.compiler }} = ICPX ]; then source /opt/intel/oneapi/setvars.sh fi export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin @@ -177,7 +174,7 @@ jobs: - name: Running MPI tests run: | - if [ ${{ matrix.compiler }} = ICX ] || [ ${{ matrix.compiler }} = ICPX ]; then + if [ ${{ matrix.compiler }} = ICPX ]; then source /opt/intel/oneapi/setvars.sh fi export PYTHONPATH=${PYTHONPATH}:${GITHUB_WORKSPACE}/bin