OK, thank you Barry.

> On 23 Dec 2017, at 6:44 PM, Smith, Barry F. <[email protected]> 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 <[email protected]> 
>> 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
> 

Reply via email to