<div dir="ltr"><div dir="ltr">On Wed, Feb 20, 2019 at 6:57 PM Marius Buerkle <<a href="mailto:mbuerkle@web.de">mbuerkle@web.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"><div><div style="font-family:Verdana;font-size:12px"><div>ok, I think I understand now. I will give it a try and if there is some trouble comeback to you. thanks.</div></div></div></blockquote><div><br></div><div>Cool.</div><div><br></div><div> Matt</div><div> </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 style="font-family:Verdana;font-size:12px"><div> </div>
<div>marius</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229);word-wrap:break-word">
<div style="margin:0px 0px 10px"> </div>
<div name="quoted-content">
<div>
<div>On Tue, Feb 19, 2019 at 8:42 PM Marius Buerkle <<a href="mailto:mbuerkle@web.de" target="_blank">mbuerkle@web.de</a>> wrote:</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">
<div>
<div style="font-family:Verdana;font-size:12px">ok, so it seems there is no straight forward way to transfer data between PETSc matrices on different subcomms. Probably doing it by "hand" extracting the matricies on the subcomms create a MPI_INTERCOMM transfering the data to PETSC_COMM_WORLD and assembling them in a new PETSc matrix would be possible, right?</div>
</div>
</blockquote>
<div> </div>
<div><span style="font-family:Verdana;font-size:12px">That sounds too complicated. Why not just reverse MPICreateSubMatricesMPI()? Meaning make it collective on the whole big communicator, so that you can swap out all the subcommunicator for the aggregation call, just like we do in that function.</span></div>
<div><span style="font-family:Verdana;font-size:12px">Then its really just a matter of reversing the communication call.</span></div>
<div> </div>
<div><span style="font-family:Verdana;font-size:12px"> Matt </span></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 style="font-family:Verdana;font-size:12px">
<div>
<div style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)">
<div style="margin:0px 0px 10px"> </div>
<div>
<div>
<div>On Tue, Feb 19, 2019 at 7:12 PM Marius Buerkle <<a href="mailto:mbuerkle@web.de" target="_blank">mbuerkle@web.de</a>> wrote:</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">
<div>
<div style="font-family:Verdana;font-size:12px">
<div>I see. This would work if the matrices are on different subcommumicators ? Is it possible to add this functionality ?</div>
</div>
</div>
</blockquote>
<div> </div>
<div>Hmm, no. That is specialized to serial matrices. You need the inverse of MatCreateSubMatricesMPI().</div>
<div> </div>
<div> Thanks,</div>
<div> </div>
<div> Matt</div>
<div> <span style="font-family:Verdana;font-size:12px"> </span></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 style="font-family:Verdana;font-size:12px">
<div>marius</div>
<div>
<div style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)">
<div style="margin:0px 0px 10px"> </div>
<div>
<div>You basically need the inverse of MatCreateSubmatrices(). I do not think we have that right now, but it could probably be done without too much trouble by looking at that code.
<div> </div>
<div> Thanks,</div>
<div> </div>
<div> Matt</div>
</div>
<div class="gmail_quote">
<div class="gmail_attr">On Tue, Feb 19, 2019 at 6:15 AM Marius Buerkle via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> wrote:</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 style="font-family:Verdana;font-size:12px">
<div>Hi !</div>
<div> </div>
<div>Is there some way to combine MatCompositeMerge with MatCreateRedundantMatrix? I basically want to create copies of a matrix from PETSC_COMM_WORLD to subcommunicators, do some work on each subcommunicator and than gather the results back to PETSC_COMM_WORLD, namely I want to sum the the invidual matrices from the subcommunicatos component wise and get the resulting matrix on PETSC_COMM_WORLD. Is this somehow possible without going through all the hassle of using MPI directly? </div>
<div> </div>
<div>marius</div>
</div>
</div>
</blockquote>
</div>
<div> </div>
--
<div class="gmail-m_-8791113756472057659gmail-m_2843557469688416611gmail-m_-2681180824371843578gmail_signature">
<div>
<div>
<div>
<div>
<div>
<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> </div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div> </div>
--
<div class="gmail-m_-8791113756472057659gmail-m_2843557469688416611gmail_signature">
<div>
<div>
<div>
<div>
<div>
<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> </div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div> </div>
--
<div class="gmail-m_-8791113756472057659gmail_signature">
<div>
<div>
<div>
<div>
<div>
<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> </div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></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>