[petsc-users] KSPSolve takes more in each iteration

Barry Smith bsmith at mcs.anl.gov
Mon Jul 20 21:20:04 CDT 2015


  Is the matrix changing in the for loop? 

  Are the number of iterations increasing for each KSP? run with -ksp_monitor 



> On Jul 20, 2015, at 8:01 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> It sounds like you are allocating memory each time. You can check using -malloc_dump
> after a few iterates.
> 
>    Matt
> 
> On Mon, Jul 20, 2015 at 7:35 PM, Orxan Shibliyev <orxan.shibli at gmail.com> wrote:
> I am solving a non-linear problem. Basically I do the following:
> 
> ... Allocate A, x, b, ksp ...
> 
> for_loop
>     ... call myFunction ...
> 
> where,
> 
> myFunction:
>     ...
>     startTime
>     KSPSolve
>     stopTime
>     ....
> 
> I record time for KSPSolve. It takes more each time until it becomes impossible to wait. I put the code on a cluster with (14 x 1) processors. Any idea?
> 
> 
> 
> -- 
> 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



More information about the petsc-users mailing list