[petsc-dev] threadcomm memory leak

Shri abhyshr at mcs.anl.gov
Tue Jul 17 22:28:40 CDT 2012

On Jul 17, 2012, at 10:10 PM, Barry Smith wrote:

> On Jul 17, 2012, at 10:07 PM, Jed Brown wrote:
>> On Tue, Jul 17, 2012 at 10:06 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> Ok, then the destructor called by the MPI_Comm_del() would decrease the reference count by one and if it gets to zero then does the delete as usual.
>> This is exactly what is done, but PETSC_COMM_WORLD and PETSC_COMM_SELF outlive PetscFinalize, so we remove one more reference count for each of those so that it actually gets collected.
>   But Shri indicated there is a possible problem, what is that problem? Or is there none?
   There is no problem. I was just trying to put across a generalized way of handling MPI attributes in the PETSc code so that specific implementations, e.g threadcomm and others, can use a common code rather than having specific implementations.

>   Barry

More information about the petsc-dev mailing list