[Trilinos-Users] Epetra_FEVbrMatrix data entry issue

Williams, Alan B william at sandia.gov
Wed Feb 16 16:38:49 MST 2011


ok, I understand what you're doing now.

The problem is that when you start the loop, the matrix doesn't contain any entries, and so it has an error when you try to sum-into a non-existent entry. If you use BeginInsertGlobalValues on the first iteration of your loop and then use BeginSumIntoGlobalValues on subsequent loop iterations, it should work as you expect.

(The reason why the remote processor doesn't have that error, is due to the way non-local input data is handled. I know that's confusing...)

Alan


> -----Original Message-----
> From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-
> users-bounces at software.sandia.gov] On Behalf Of Andrea Zonca
> Sent: Wednesday, February 16, 2011 3:49 PM
> To: trilinos-users at software.sandia.gov
> Subject: Re: [Trilinos-Users] Epetra_FEVbrMatrix data entry issue
> 
> thanks Alan,
> 
> On Wed, Feb 16, 2011 at 14:43, Williams, Alan B <william at sandia.gov>
> wrote:
> > Your code loops over 'NumHits', but it always passes the same indices
> to the BeginSumIntoGlobalValues method. Shouldn't the indices change as
> the loop iterates? You're summing into block-row 2, block-col 1 on
> every processor and in every iteration of the loop.
> 
> for testing using the same indices is enough,
> so, running with 2 processors, the first has 5 hits, the second 7.
> As I am summing everything in block-row 2 block-col 2, I should have
> this matrix at the end:
> 13 0 0
> 0 0 0
> 0 0 0
> instead I get
> 7 0 0
> 0 0 0
> 0 0 0
> so I get only the hits of the second processor, infact on the first
> processor I get error code 2 from EndSubmitEntries().
> 
> 
> _______________________________________________
> 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