Dear all,
attached is a minimal example with 125 dofs, where dofs with indices 0-74
live on proccesor 0 and dofs with indices 75-124 live on processor 1
(two MPI processes).
Consider the following code to loop over the rows of a Trilinos sparsity pattern:
// make_sparsity_pattern,...
for(unsigned int row = 0; row < dofHandler.n_dofs(); ++row)
{
if( ! sparsityPattern.row_is_stored_locally(row)) continue;
auto it =
sparsityPattern.begin(row);
auto itend =
sparsityPattern.end(row);
// do something with the columns
while(it != itend) { it->column();...}
}
For row=74 on processor 0, there is an error
dealii::TrilinosWrappers::SparsityPatternIterators::Accessor::visit_present_row()
"An error with error number -1 occurred while calling a Trilinos function"
The mentioned Trilinos function is ExtractGlobalRowCopy() and the error number
suggests an access to a row which is not locally owned.
This makes sense to me because
sparsityPattern.end(74) calls visit_present_row(75),
which is indeed not locally owned.
Not sure whether I miss something or this is a bug.
My expectation was to use the begin and end iterators on all locally owned rows.
Thank you,
Simon