[Trilinos-Users] [EXTERNAL] 2x2 blocks: Epetra_CrsMatrix vs. Epetra_VbrMatrix vs. Epetra_*Matrix: fill time, scalability?

Heroux, Michael A maherou at sandia.gov
Thu Dec 8 13:22:31 MST 2011


Hi Nico,

I have sometimes used standard map containers to facilitate this process,
using a few containers to catch the incoming entries, then passing them
into the matrix as a larger batch.

Regarding Epetra_VbrMatrix (or Epetra_FEVbrMatrix), performance for the
2x2 case was not good the last time I used it (which was some time ago).

If you have a simple test driver, I am interested in looking at this issue.

Thanks.

Mike

On 12/8/11 12:31 PM, "Nico Schlömer" <nico.schloemer at gmail.com> wrote:

>Hi all,
>
>I have this linear problem involving a 2x2-block matrix which I fill
>and then solve. Luckily, I have a good preconditioner for the problem
>which results in the matrix construction taking 50% of the runtime.
>I'd like to improve this, tried this and that, but I'm running out of
>ideas.
>
>Basically, I loop over a set of FEM elements and insert for each edge
>of the element a 4x4 submatrix, using
>
>// fill v
>TEUCHOS_ASSERT_EQUALITY( 0, myMatrix->SumIntoMyValues(
>localRowIndices[0], 4, v, localColIndices ) );
>// fill v
>TEUCHOS_ASSERT_EQUALITY( 0, myMatrix->SumIntoMyValues(
>localRowIndices[1], 4, v, localColIndices ) );
>// fill v
>TEUCHOS_ASSERT_EQUALITY( 0, myMatrix->SumIntoMyValues(
>localRowIndices[2], 4, v, localColIndices ) );
>// fill v
>TEUCHOS_ASSERT_EQUALITY( 0, myMatrix->SumIntoMyValues(
>localRowIndices[3], 4, v, localColIndices ) );
>
>I've tried FECrsMatrix where those reduce to one single call, but I've
>the four calls to be somewhat faster.
>
>The matrix contains 2x2 blocks, so local{Row,Col}Indices always
>contain subsequent indices (as in [24,25,56,57]). I thought about
>using Epetra_VbrMatrix which would save me some tinkering with maps
>and I imagine it would also help to reduce the load of the matrix
>construction by filling in 2x2 blocks at once.
>If I remember correctly, there could be performance (scalability?)
>issues with Vbr_Matrices and small block sizes. Is that still true at
>all?
>
>Well, I'd be happy for any other suggestion.
>
>Cheers,
>Nico
>
>_______________________________________________
>Trilinos-Users mailing list
>Trilinos-Users at software.sandia.gov
>http://software.sandia.gov/mailman/listinfo/trilinos-users




More information about the Trilinos-Users mailing list