[Trilinos-Users] Tpetra CRS matrix repeated fill - howto

Hoemmen, Mark mhoemme at sandia.gov
Mon Nov 24 14:20:27 MST 2014


On 11/24/14, 12:00 PM, "trilinos-users-request at software.sandia.gov"
<trilinos-users-request at software.sandia.gov> wrote:
>
>Message: 1
>Date: Mon, 24 Nov 2014 11:21:42 +0100
>From: Martin Vymazal <martin.vymazal at vki.ac.be>
>To: "'trilinos-users at software.sandia.gov'"
>	<trilinos-users at software.sandia.gov>
>Subject: [Trilinos-Users] Tpetra CRS matrix repated fill - howto
>Message-ID: <4870639.qbSfTX3zYp at tinlaptop>
>Content-Type: text/plain; charset="us-ascii"
>
>Hello,
>
> I'm a bit confused about the proper order of steps to fill Tpetra CRS
>matrix 
>(which is allocated dynamically with a size hint). I need to fill the
>matrix 
>repeatedly in an iterative procedure. The structure of the matrix will be
>preserved, only its entries will have different values.
>
>Currently I do this:
>1) Perform a fake assembly loop over the system and call
>'insertGlobalValues'
>to create corresponding row entries
>2) Do the real assembly in each iteration and call 'sumIntoGlobalValues'
>
>The documentation says that 'insertGlobalValues' inserts corresponding
>row 
>values and 'If that entry already exists, add the new value to the old
>value.' 
>I thought that this means that I could skip step 1) above and just call
>'insertGlobalValues' every time I assemble my matrix.

It is more efficient to use sumIntoGlobalValues (or even
sumIntoLocalValues if you can) for the assembly loop (repeated instances
of Step 2 above).

> This is what I got instead:
>
>Tpetra::CrsMatrix<double, int, int,
>KokkosClassic::SerialNode>::insertGlobalValues: new indices exceed
>statically 
>allocated graph structure.
>
>Could you please tell me what is the correct procedure to initialize the
>entries in Tpetra CRS matrix and then fill it repeatedly?

This is a known bug in Tpetra::Crs{Graph,Matrix} which I plan to fix once
I get the chance.  Currently, Tpetra sums repeated entries in each row at
fillComplete, not as they are inserted.

mfh



More information about the Trilinos-Users mailing list