[Trilinos-Users] Problem with Epetra FECrsMatrix during the assembly phase

Williams, Alan B william at sandia.gov
Tue Jul 29 08:29:53 MDT 2008


It looks like the doxygen documentation for Epetra_CrsGraph is incomplete, and possibly incorrect.
If InsertGlobalIndices returns a code of 3, it means that it had to allocate more memory to insert the indices. This means that your Arows array didn't specify enough nonzeros for that row when you constructed the graph. To get good performance, it is necessary to specify the correct number of nonzeros for each row, so that the graph doesn't have to do new allocations during calls to InsertGlobalIndices.

The error you are seeing in MatrixMatrix::Add is because the matrices don't have the same rows on each processor. When the Add function tries to get a row from one matrix to add into the other matrix, if that row doesn't exist on the processor then the error occurs. The Add function should be checking the matrix maps to make sure they are compatible before proceeding with the addition. I'll fix that for future releases so that it produces a helpful error message to tell you that you can't add matrices that are distributed differently.


From: trilinos-users-bounces at software.sandia.gov [mailto:trilinos-users-bounces at software.sandia.gov] On Behalf Of MLX82
Sent: Tuesday, July 29, 2008 7:12 AM
To: Williams, Alan B
Cc: trilinos-users at software.sandia.gov
Subject: Re: [Trilinos-Users] Problem with Epetra FECrsMatrix during the assembly phase


regarding the GlobalAssemble, I have set correctly two different maps for rectangular matrices Bblock and Cblock.

About the construction of the Graph of Ablock, I have found a warning message on the instruction: Agraph->InsertGlobalIndices(...); The warning code is 3, and on the Doxygen Manual I have read that: "If the graph is a 'View' mode graph, then a positive warning code of 3 will be returned if the specified row already exists." This is strange, because I am constructing the graph in "copy" mode!

Maybe I have misunderstood how to assemble correctly a Graph: in my code Arows is an int vector, where each position correspond to a row of the matrix and contains the total number of NonZeros elements of that row. With the second instruction (Agraph->InsertGlobalIndices(i, 3*nLocal, intVector)), I put for each row (i) the column indexes (intVector) containing the NonZeros elements, where 3*nLocal is again the total number of NonZeros elements of that row (length of vector intVector). I hope that all of this is correct.

There is also another error message during the execution of the test code with the serial part. This error don't stop the execution of the code but probably can you to give me an advice on how to solve the problem:

Epetra ERROR -1, ../../../../trilinos-8.0.7/packages/epetra/src/Epetra_CrsGraph.cpp, line 1245
Epetra ERROR -1, ../../../../trilinos-8.0.7/packages/epetra/src/Epetra_CrsMatrix.cpp, line 1004
Epetra ERROR -1, ../../../../trilinos-8.0.7/packages/epetraext/src/EpetraExt_MatrixMatrix.cpp, line 1320

This error appear after the operation EpetraExt::MatrixMatrix::Add(*Ablock,false,1.0,AblockS,-1.0); which I use to see if there is a difference between Ablock and AblockS.

Thanks for your help.

   Cristiano Malossi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080729/d9c210b8/attachment.html 

More information about the Trilinos-Users mailing list