petsc-users Digest, Vol 9, Issue 6

Barry Smith bsmith at mcs.anl.gov
Mon Sep 7 16:13:30 CDT 2009


    Move the PetscLogStageRegister() call out of the loop. Each time  
it is called it allocates a little memory to keep information about  
that stage.
Millions of iterations later, it runs out of memory.

    We will change the code in the future so it generates an error if  
the same stage is registered more than once to prevent this.


    Barry

On Sep 7, 2009, at 11:41 AM, xiaoyin ji wrote:

> Sorry for the description, here is the example code.
>
> Xiaoyin Ji
>
> On Mon, Sep 7, 2009 at 12:26 PM, xiaoyin ji<sapphire.jxy at gmail.com>  
> wrote:
>> Thanks Matt, very useful hint, I'll contact the administrator.
>>
>> Xiaoyin Ji
>>
>>>>
>>>
>>> 1) I cannot reproduce this bug. However, the description is not  
>>> that clear.
>>>
>>> 2) The Fortran and C++ interfaces are just wrappers. They do not  
>>> handle
>>>     memory allocation or calculation.
>>>
>>> 3) This must be something specific to your computer.
>>>
>>>  Matt
>>>
>>>
>>
> <ex2.c>



More information about the petsc-users mailing list