This time I used VectorOperation::insert and it didn't happen the memory error that I posted before.

OK, so that then clearly helps :-)

However, if I put the compress function after the loop, it only sets one entry on each rank then throws the exception
  "Object is in wrong state, not for unassembled matrix."
Putting the compress() in the loop does not throw exceptions, instead, it iterates forever.
So just as you said it is very inefficient and not an option.

I see. Yes, this is an effect of the PETSc memory model then. I'm not sure how to solve this other than to not iterate over the entries of the matrix after assembly :-(


Wolfgang Bangerth          email:       

The deal.II project is located at
For mailing list/forum options, see
--- 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 
For more options, visit

Reply via email to