<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 7, 2016 at 3:37 AM, Cyrill Vonplanta <span dir="ltr"><<a href="mailto:cyrill.von.planta@usi.ch" target="_blank">cyrill.von.planta@usi.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I would like to reorder the rows of a matrix across processors. Is this possible with MatPermute(…)?<br></blockquote><div><br></div><div>Yes, this works with MatPermute().</div><div><br></div><div>Could you send this small example so I can reproduce it?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
To illustrate here is how an index set would look like for a matrix with M=35 on 2 CPU’s. Amongst other things I intend to swap the first and last row here.<br>
<br>
[0] Number of indices in set 24<br>
[0] 0 34<br>
[0] 1 1<br>
[0] 2 2<br>
[0] 3 3<br>
[0] 4 4<br>
[0] 5 5<br>
[0] 6 6<br>
[0] 7 7<br>
[0] 8 15<br>
[0] 9 16<br>
[0] 10 11<br>
[0] 11 8<br>
[0] 12 10<br>
[0] 13 21<br>
[0] 14 9<br>
[0] 15 12<br>
[0] 16 13<br>
[0] 17 14<br>
[0] 18 17<br>
[0] 19 18<br>
[0] 20 19<br>
[0] 21 20<br>
[0] 22 22<br>
[0] 23 23<br>
[1] Number of indices in set 11<br>
[1] 0 24<br>
[1] 1 25<br>
[1] 2 26<br>
[1] 3 27<br>
[1] 4 28<br>
[1] 5 29<br>
[1] 6 30<br>
[1] 7 31<br>
[1] 8 32<br>
[1] 9 33<br>
[1] 10 0<br>
<br>
Instead of exchanging the first and last row it seems to replace them with zeros only.<br>
If this can’t be done with MatPermute how could it be done?<br></blockquote><div><br></div><div>You could also use MatGetSubMatrix().</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks<br>
<span class="HOEnZb"><font color="#888888">Cyrill<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">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>