[petsc-users] Profile a matrix-free solver.

Barry Smith bsmith at mcs.anl.gov
Fri Jan 15 14:38:43 CST 2016


> On Jan 15, 2016, at 2:34 PM, Song Gao <song.gao2 at mail.mcgill.ca> wrote:
> 
> Thanks. I'll try to improve "my code" 

  Here you can benefit from Instruments since it can show line by line and loop level hotspots in your compute rhs

  Barry

> 
> 2016-01-15 14:56 GMT-05:00 Jed Brown <jed at jedbrown.org>:
> Matthew Knepley <knepley at gmail.com> writes:
> > The way I read this, you are taking about 23 iterates/solve, and most of
> > your work is residual computation which should
> > be highly parallelizable/vectorizable. This seems great to me.
> 
> This in the sense that it's up to you to determine whether your
> matrix-free residual and preconditioning code is fast.  This profile
> merely says that almost all of the run-time is in *your code*.  If your
> code is fast, then this is good performance.  If you can use a different
> algorithm to converge in fewer iterations, or a different representation
> to apply the operator faster, then you could do better.
> 



More information about the petsc-users mailing list