<div dir="ltr">For example, before using preallocaotor, I made A matrix. (A matrix has information about indices of global matrix)<div>And the code structures are as below.</div><div>for (int i=0; i<num; i++){</div><div> MatGetRow(A,~~) // for getting indices info of global matrix.</div><div> MatSetvalues(preallocator, value_from_A);</div><div>}</div><div>Current state, I got an error at 'MatGetRow' when I run this code in parallel.</div><div>That's why I want "all mpi ranks has information of A matrix".</div><div><br></div><div>Thanks,</div><div>Hyung Kim</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2022년 12월 18일 (일) 오후 11:36, Junchao Zhang <<a href="mailto:junchao.zhang@gmail.com">junchao.zhang@gmail.com</a>>님이 작성:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am not clear on what you said "this information must be viewed in all mpi ranks." Even with preallocator, each rank only needs to insert entries it knows (i.e., don't need to get all entries)</div><div><br></div><div>Maybe you could provide an example code for us to better understand what you mean?</div><div><br></div><div><div dir="ltr"><div dir="ltr">--Junchao Zhang</div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 18, 2022 at 8:25 AM 김성익 <<a href="mailto:ksi2443@gmail.com" target="_blank">ksi2443@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div><br></div><div>Is there a matrix version function of VecScatterCreateToAll?</div><div><br></div><div>I'm using preallocator for preallocation of global matrix.</div><div>Prior to using the preallocator, information related to allocation is stored in the specific matrix, and this information must be viewed in all mpi ranks.<br></div><div>For using preallocator, I need scattering the specific matrix info to all mpi ranks.</div><div><br></div><div>Thanks,</div><div>Hyung Kim</div></div>
</blockquote></div>
</blockquote></div>