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.)

Attachment: try.c
Description: try.c

Reply via email to