[Trilinos-Users] Questions about InsertGlobalValues
M. Scot Breitenfeld
brtnfld at uiuc.edu
Thu Aug 26 12:51:21 MDT 2010
I have a few questions about the use of InsertGlobalValues for
Epetra_FECrsMatrix class matrix, which is for my K matrix. Currently I
form one row and then use the InsertGlobalValues routine to add it to K
(I'm forming the row array in a Fortran program). Is it better (faster)
to form more rows and then send that to InsertGlobalValues, or does it
not matter.
Also, I'm getting an error in Epetra_CrsGraph.cpp:
Epetra_CrsGraph::InsertIndices(int Row,
int NumIndices,
int* UserIndices)
by failing
if(current_numAllocIndices == 0) {
int * temp = new int[NumIndices];
CrsGraphData_->Indices_[Row] = temp;
}
else {
ierr = 3; // Out of room. Must allocate more space, copy and
delete...
and getting ierr = 3. Is there something I'm doing wrong to get this error?
I'm trying to track down a memory problem where it is taking more memory
to store K then it would to just storing the full matrix with all the
zero coefficients. I've tracked it down to the InsertGlobalValues but I
have not found the source of the problem. This happens regardless if I
run it in serial or parallel. It also takes an extremely long time to
assemble the matrix (it takes longer then solving the system of
equations), but I suspect it is related to the memory problems.
More information about the Trilinos-Users
mailing list