[petsc-dev] Uninitialised variable

Pierre Jolivet pierre.jolivet at enseeiht.fr
Sun Dec 24 01:48:44 CST 2017


OK, thank you Barry.

> On 23 Dec 2017, at 6:44 PM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
> 
> 
>  Pierre,
> 
>    No, it is not necessary because PetscNew (and PetscNewLog()) always zero the memory they allocate.
> 
>  Barry
> 
> 
>> On Dec 23, 2017, at 7:43 AM, Pierre Jolivet <pierre.jolivet at enseeiht.fr> wrote:
>> 
>> Hello,
>> Shouldn’t to->sharedcnt be initialised to 0 before its first use here https://bitbucket.org/petsc/petsc/src/d209cd380f7aba331915877696c8ffe10e8df5ea/src/vec/vec/utils/vpscat.c?at=master&fileviewer=file-view-default#vpscat.c-2387, like from->sharedcnt is set to 0 there https://bitbucket.org/petsc/petsc/src/d209cd380f7aba331915877696c8ffe10e8df5ea/src/vec/vec/utils/vpscat.c?at=master&fileviewer=file-view-default#vpscat.c-2426 ?
>> 
>> Thanks,
>> Pierre
> 



More information about the petsc-dev mailing list