On 12/29/23 11:39, Simon Wiesheier wrote:

For efficiency reasons, I decided to loop manually over the rows I am interested in. In a serial program, that worked smoothly. But if I get the gist of your message, vmult and extracting the relevant elements is the only way to do this in parallel, right?

If you only need certain rows, you still have to do the same basic steps a parallel vmult has to do, except that you can restrict yourself to a subset of the rows. What I meant to say is that it isn't trivial to determine which elements you need to communicate. You might have to read through the source code of PETSc's or Trilinos's vmult functions to understand the sequence of events. I would not be surprised if a parallel vmult runs into several hundred of lines of code.

It is certainly *easier* to just do the full vmult with a vector, and then pick out the entries you actually need. Whether that's a performance problem is something you should benchmark -- it is not worth optimizing operations for which you do not already know that they are a bottleneck.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/666e38ae-57d7-453b-8dbe-28848f05de0d%40colostate.edu.

Reply via email to