-
-
Notifications
You must be signed in to change notification settings - Fork 217
Description
Hi there,
I know this issue has already been discussed in several threads, but I would like to understand better the rationale behind using MPI_Comm_dup
when wrapping the MPI comm in dolfinx.
With a student of mine, we are finally (it was overdue) porting hIPPYlib (https://hippylib.github.io/) to dolfinx
, and we are quickly facing the Too many communicators issue.
Our code does not store any long list of dlx.fem.Function
but we do create quite a lot of temporary dlx.fem.Function
and dlx.fem.form
instances in our code. All of these should be destroyed when the function returns, but it seems that is not the case for us.
While this may be a problem of the garbage collection in python, it is still an issue that affects the usability of the library.
So my questions are:
- Is duplication of the MPI Comm truly needed?
- Could an option of not to duplicate the communicator be exposed to the final user, without having to recompile the library?
Originally posted by @uvilla in #2308 (comment)