[Trilinos-Users] Tpetra_CrsMatrix, {replace, insert}LocalValues slow/overkill?
Heroux, Michael A
maherou at sandia.gov
Thu May 20 10:20:03 MDT 2010
Nico,
This is too much time in the fill. What compiler and level of compiler optimization are you using? Sometimes template expressions are not optimized fully, leading to these kinds of hotspots.
Mike
On 5/20/10 7:45 AM, "Nico Schlömer" <nico.schloemer at ua.ac.be> wrote:
Hi all,
I have this nonlinear problem here for which I need to compute the
complex<double>-valued Jacobian in each Newton step. To store the data
of a Jacobian I use a Tpetra_CrsMatrix<complex<double> >, but to
actually make use of it, I have to transform the whole thing to an
Epetra system: Some packages I use just don't support Tpetra as well
yet. For transformation I use my own Komplex class which essentially
does the same as Trilinos::Komplex except that it digests
Tpetra_CrsMatrices.
Anyway, I just profiled my code and I noticed that the bare filling
process of the Tpetra_CrsMatrix, i.e., all the
if ( A_->isFillComplete() )
A_->replaceLocalValues( localRow, columnIndices, values );
else
A_->insertLocalValues( localRow, columnIndices, values );
calls take about 20% of the total calculation time which I find way too
much for the mere bookkeeping it's used for. I now wonder if there's any
smarter way to handle the situation.
Of course I could just abandon the whole Tpetra_CrsMatrix idea as a
whole, just store all (localRow, columnIndices, values) triples raw, and
feed those into the my Komplex constructor, but that feels somewhat
un-Trilinos-ish.
Comments?
Cheers,
Nico
_______________________________________________
Trilinos-Users mailing list
Trilinos-Users at software.sandia.gov
http://software.sandia.gov/mailman/listinfo/trilinos-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20100520/e6ea4857/attachment.html
More information about the Trilinos-Users
mailing list