Skip to content

test if __finalizeFemModule__ at Python exit is needed

Andreas Dedner requested to merge bugfix/findMPIIssueWithPetsc into master

solvers.py fails on github (and for me locally) if the finalize of the MPIManager is included in the atexit function of dune/fem/__init__.py. The failure only occurs if petsc spaces are used (actually only if a petsc discrete function is constructed).

It works fine without that explicit finalize (as do all other scripts). Possibly this is not needed anymore (and is harmful) but there might be other cases or mpi implementations were removing this will cause errors.

Tests

Using petsc 3.18.1 petsc4py 3.18.1

Edited by Andreas Dedner

Merge request reports