"Would you be willing to create a complete example, and open a bug report for this on github?"
Sure. I opened an issue https://github.com/dealii/dealii/issues/16414 Do you think this bug has a quick solution? I am interested in the columns of the rows. I did not see a different way to do this than using the row iterators. Best, Simon On Thursday, January 4, 2024 at 9:50:36 PM UTC+1 Wolfgang Bangerth wrote: Simon: > 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. A bug. And a timely one in view of the fact that I have been thinking about exactly this issue recently: https://github.com/dealii/dealii/pull/16406 Would you be willing to create a complete example, and open a bug report for this on github? Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: bang...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/4f17ab8a-c292-4601-83dc-16e43a9c69a9n%40googlegroups.com.