ikarus-project / ikarus

Ikarus is a C++-based library that uses DUNE modules to solve partial differential equations with the finite element method and more.
https://ikarus-project.github.io/
Other
5 stars 3 forks source link

Fix building Python bindings with Clang #320

Closed henrij22 closed 2 weeks ago

henrij22 commented 3 weeks ago

There are two points that need to be adressed in the docker container for this to work

  1. https://github.com/henrij22/ikarus-docker-container/blob/5fe56de3ec7f26a2ee50470d0b6140ad6a7779d4/DuneBase/Dockerfile#L18 ENV DUNE_CMAKE_FLAGS=-DCMAKE_C_COMPILER=${ccompiler} -DCMAKE_CXX_COMPILER=${cppcompiler} has to be set. That tells the dune-py environment which compiler to use

  2. the dune modules have to be compiled with the same compiler as ikarus this can be enforced by setting https://github.com/henrij22/ikarus-docker-container/blob/5fe56de3ec7f26a2ee50470d0b6140ad6a7779d4/DevelopContainer/Dockerfile#L2 ARG compiler "gcc"

Currently our container always use the gcc version (see ARG COMPILER="gcc" and https://github.com/ikarus-project/ikarus-docker-container/blob/54a36ff1319960b1af165695927d65fdd6586c80/.github/workflows/build_docker_image_debian.yml#L21 in the action)

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.96%. Comparing base (c595e88) to head (21072e1). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #320 +/- ## ======================================= Coverage 80.96% 80.96% ======================================= Files 68 68 Lines 2291 2291 ======================================= Hits 1855 1855 Misses 436 436 ``` | [Flag](https://app.codecov.io/gh/ikarus-project/ikarus/pull/320/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project) | Coverage Δ | | |---|---|---| | [tests](https://app.codecov.io/gh/ikarus-project/ikarus/pull/320/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project) | `80.96% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ikarus-project#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

henrij22 commented 2 weeks ago

@rath3t this should be ready then, I also fixed the test to use Release build for the JIT compiler. Interesting enough i notices that the python-clang tests are slower (in compilation) in release than in debug