[Trilinos-Users] Epetra_FECrsGraph question

Kent-Andre Mardal kent-and at simula.no
Mon Aug 11 06:45:28 MDT 2008


Hi, 


Lately we have been doing a set of benchmarks for comparing the
efficiency of the (finite element) assembly routine in Dolfin with
respect to its different backends, MTL, PETSC, uBlas, and Epetra.  
The benchmark results can be found here: 
http://www.fenics.org/wiki/Benchmark

It turns out that for equations using vector elements, Epetra is
somewhat slower than the other backends,  and most of this is due to the
creation of the Epetra_FECrsGraph. 

We have implemented it roughly as follows: 

Epetra_Map row_map(dims[0], 0, Comm);
Epetra_FECrsGraph* epetra_graph;
epetra_graph = new Epetra_FECrsGraph(Copy, row_map, 0);   
int numRows, numCols; 
int *rows; 
int *cols; 
for each element: 
    epetra_graph->InsertGlobalIndices(numRows, rows, numCols, cols);

I assume that the problem here is that NumIndicesPerRow is not set
appropriately.
However, this code is 'library code' and we do not know (with the
current design in Dolfin) the number of indices per row when creating
the Epetra_FECrsGraph. 

Do you know any ways to speed up the code (without knowing
NumIndicesPerRow) ? 

Kent-Andre Mardal
Simula Research Laboratory 





More information about the Trilinos-Users mailing list