Trilinos icon indicating copy to clipboard operation
Trilinos copied to clipboard

Epetra_CrsGraph: Overflow issues when trying to add too many nonzeros.

Open bangerth opened this issue 3 years ago • 5 comments

This is part of the explorations in https://github.com/dealii/dealii/issues/13428 where we're tracking down what happens if one tries to allocate sparsity patterns with more than 2B entries on one process. This isn't supposed to work, but also isn't resulting in good error messages.

Fundamentally, there are two Trilinos issues:

  • The addition of nonzero entries inside Epetra_CrsGraph overflows CrsGraphData_->NumMyNonzeros_, at which point it becomes a negative number. #10249 tracks this.
  • The Epetra_CrsGraph::OptimizeStorage() function should return error codes as regular return values, but decides to instead use an exception: https://github.com/trilinos/Trilinos/blob/7f8bbe22f1fb97e72857337ca696c3b69be450b6/packages/epetra/src/Epetra_CrsGraph.cpp#L1929-L1931. That's just poor design: Pick one way to report errors and then stick with it; don't use a separate way in a subset of places.

bangerth avatar Feb 25 '22 21:02 bangerth