Skip to content
Snippets Groups Projects

[python,parallel] improve compatibility of Dune::Communication<...> and mpi4py

1 unresolved thread
  • add MPI_Comm wrapper
  • add conversion from mpi4py.MPI.Comm to MPI_Comm wrapper
  • allow to construct dune.common.Communication from mpi4py.MPI.Comm
  • additional tests
  • possibly move to a submodule parallel (discussion postponed)
Edited by Christian Engwer

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

  • added 1 commit

    • f8246a46 - [python,parallel] add support for No_Comm

    Compare with previous version

  • Christian Engwer added 5 commits

    added 5 commits

    • f07cdf7c - [python,parallel] improve compatibility of Dune::Communication<...> and mpi4py
    • d0491e32 - add missing CMakeLists.txt entry for new python file
    • d39b7c7b - [python,parallel] add additional test for Communication bindings
    • 6361b863 - cleanup
    • afd68328 - [python,parallel] add support for No_Comm

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Christian Engwer added 3 commits

    added 3 commits

    • b2782f4d - [python,parallel] improve compatibility of Dune::Communication<...> and mpi4py
    • 9326a5e9 - [python,parallel] add support for No_Comm
    • 2c3639b2 - [python,parallel] add additional test for Communication bindings

    Compare with previous version

  • Christian Engwer marked this merge request as ready

    marked this merge request as ready

  • From a functional point of view this MR is now now ready to merge.

    One question would be whether or not to move the parallel infrastructure to dune.common.parallel. IMHO this would be preferable, but I guess there might be other opinions. In any case ... if we want to introduce such a move, we can still do this in an other MR.

  • Christian Engwer changed the description

    changed the description

  • Christian Engwer resolved all threads

    resolved all threads

  • Christian Engwer resolved all threads

    resolved all threads

  • mentioned in commit 4eee0b3a

    • This introduces a new dependency on mpi4py in the C++ part. HAVE_MPI true doesn’t mean that the header mpi4py.hh is available. There should be separate CMake stuff for that I think. At last the Dumux CI breaks with this change.

      Edited by Timo Koch
    • As far as @andreas.dedner explained it to me, the python bindings have hard dependency on mpi4py if MPI is used. This code is only part of the python bindings, so I don't see how we can make this optional, but perhaps there is something that needs to be fixed in the handling of python dependencies?

    • @tkoch @andreas.dedner @samuel.burbulla can you python gurus please explain how to handle this properly. We have a dependency, but apparently this is now checked at a suitable place and then breaks dumux some strange way. Either we have to adapt our pipelines such that we catch similar errors early, or we have to state clearly how to use dune. In any case it is a problem that I'm currently not able to solve as I don't have sufficient understanding of the whole dune/python/venv magic and I currently don't have sufficient time to dig myself into this.

    • See discussion in !1235 (merged). I think there needs to be a CMake feature check to catch this dependency.

      As far as @andreas.dedner explained it to me, the python bindings have hard dependency on mpi4py if MPI is used.

      This is currently only checked at runtime. In order to make it a hard dependency at compile time there needs to be a feature check at configure time.

    • @christi Concerning the CI: I think this is currently very impracticable and makes Dune difficult to maintain, but there is a secret Repo on Github which runs different Python setups. There you also see that a lot of configurations failed with this MR merged:

      https://github.com/dune-project/dune-testpypi/actions/runs/4288731090

      Basically, this means no changes affecting Python (and that maybe means no changes) can be merged anymore just based on the Dune CI alone. But in addition, one has to manually trigger an action in GitHub.

      I don't know how it got to this double CI situation. I ran in the same issue a week ago. Everything passes in the Dune pipelines, I merge, but it turns out the additional tests in dune-testpypi failed. Reverted. Not really a good developer situation right now...

      Edited by Timo Koch
    • IMHO this means that our current python setup is so broken (or over-engineered) that people like me can't contribute.

    • Please register or sign in to reply
  • Timo Koch mentioned in commit 5b178b08

    mentioned in commit 5b178b08

  • Timo Koch mentioned in merge request !1235 (merged)

    mentioned in merge request !1235 (merged)

  • Timo Koch mentioned in merge request dune-grid!699 (merged)

    mentioned in merge request dune-grid!699 (merged)

  • Please register or sign in to reply
    Loading