[petsc-users] Does petsc duplicate the users communicator?

Kozdon, Jeremy (CIV) jekozdon at nps.edu
Thu Jul 8 22:17:11 CDT 2021

Sorry if this is clearly stated somewhere in the docs, I'm still getting familiar with the petsc codebase and was also unable to find the answer searching (nor could I determine where this would be done in the source).

Does petsc duplicate MPI communicators? Or does the users program need to make sure that the communicator remains valid for the life of a petsc object?

The attached little test code seems to suggest that there is some duplication of MPI communicators behind the scenes.

This came up when working on Julia wrappers for petsc. (Julia has a garbage collector so we need to make sure that references are properly kept if needed.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: try.c
Type: application/octet-stream
Size: 2075 bytes
Desc: try.c
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210709/946f97fb/attachment-0001.obj>

More information about the petsc-users mailing list