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 :-(

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to