<div dir="ltr"><div dir="ltr">On Thu, Sep 30, 2021 at 9:39 AM Hannes Phil Niklas Brandt <<a href="mailto:s6hsbran@uni-bonn.de">s6hsbran@uni-bonn.de</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u><div><div dir="ltr"><p><span style="color:rgb(0,0,0)">
Hello,</span></p><p> </p><p><span style="color:rgb(0,0,0)">I
intend to compute a parallel Matrix-Vector-Product (via MPI) and
therefore would like to scatter the entries of the input MPI-Vec v
to
a local vector containing all entries relevant to the current
process. </span></p><p> </p><p><span style="color:rgb(0,0,0)">To
achieve this I tried defining
a VecScatter, which
scatters
from v
to a sequential Vec
v_seq (each process has it's own version of v_seq). However,
storing v_seq (which has one
entry for each global row, thus
containing a large amount of
zero-entries)
may demand too
much storage space (in
comparison to my data-sparse Matrix-Storage-Format).</span></p><p> </p><p><span style="color:rgb(0,0,0)">I
am interested in possibilities to scatter v to a sparse Vec-type
to avoid storing unnecessary large
amounts of
zero-entries. Is there a sparse Vector format in Petsc
compatible to
the VecScatter procedure
or is there another efficient way to compute
Matrix-Vector-Products
without usinglarge amounts
of storage space on each process?</span></p></div></div></blockquote><div>I think you misunderstand VecScatter. Parallel to sequential is one possibility, but also parallel-parallel, seq-parallel, etc. Second, you can give</div><div>whatever indices you want into it. Thus you can index only a few places in a large array, or compact a sparse array into a contiguous one. I am</div><div>not sure what other possibilities may exist.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div dir="ltr"><p><span style="color:rgb(0,0,0)">Best
Regards</span></p><p><span style="color:rgb(0,0,0)"> Hannes
Brandt</span></p><p><span style="color:rgb(0,0,0)"></span></p></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>