[petsc-users] Reducing cost of MatSetValues
John Fettig
john.fettig at gmail.com
Wed Jun 1 15:53:46 CDT 2011
Hi Jed,
On Wed, Jun 1, 2011 at 4:11 PM, Jed Brown <jed at 59a2.org> wrote:
> 2D or 3D? What kind of elements?
This is 3D with linear tets.
> The overhead of the profiling can be nontrivial for small elements. How does
> the run-time change if you deactivate that event?
> How much of the overall time is spent in matrix assembly (your code plus
> MatSetValues)?
I actually started off by profiling the application with HPCToolkit,
and only turned on the PETSc profiling as a sanity check and to send
to this list. The results are pretty consistent with the profiling
from HPCToolkit. I ran without -log_summary and it was about 8%
faster.
> It looks like the linear solve is around 18 iterations. For first order
> elements, that is probably too many for matrix-free with a lagged Jacobian
> to pay off. The trade-off is much more favorable for higher order elements,
> or if the preconditioner is better.
There are several linear solves, and some of them do pretty well with
just cg/jacobi. Perhaps we could move a few of the solves to
matrix-free.
Thanks,
John
More information about the petsc-users
mailing list