[petsc-users] Use kspsolve repeatly
Matthew Knepley
knepley at gmail.com
Thu Aug 1 14:45:33 CDT 2013
On Thu, Aug 1, 2013 at 9:29 PM, 丁老师 <ztdepyahoo at 163.com> wrote:
> I use the latest version PETSC, and the matrix has the same nonzero
> pattern during each outer iteration.
> I want to know does the kspsolve allocate memory for PC dring each call.
>
Its possible if you are asking for a refactorization every time. Without
the output of -ksp_view,
I have no idea what solver you are using. Its easy to check whether memory
is being leaked
using -malloc_dump.
Matt
>
>
> 在 2013-08-01 20:46:36,"Matthew Knepley" <knepley at gmail.com> 写道:
>
> On Thu, Aug 1, 2013 at 12:58 PM, 丁老师 <ztdepyahoo at 163.com> wrote:
>
>> I need to use the kspsolve(A,b,x) repeatly in my code in the following
>> style.
>> but i have noticed from the system load monitor that during the code
>> running, it allocate new memeory every step.
>>
>> I use the default setting for the PC.
>> Could you please told me how to resolve this problem.
>>
>
> 1) There is no enough here to give us an idea what you are doing
>
> 2) Are you using the latest release? If so, it prevents you from adding
> new nonzreos to the matrix, which is my first guess.
>
> Matt
>
>
>> for (int i=0;i<maxit;i++)
>> {
>> MatsetValues( )....
>> kspsolve(A,b,x)
>> }
>>
>>
>>
>>
>> < span title="neteasefooter">
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
>
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130802/3597cc28/attachment.html>
More information about the petsc-users
mailing list