<div dir="ltr">But the MatSetValuesLocal requires local index. I do not have that. By the way, use MatISGetMPIXAIJ to get the assembled matrix I obtained the one as in the figure A00.ps. It seems that MatSetValues does not assemble the remote entries, because the coupling blocks are zero.<div><br></div><div>The range of the matrix in each process is below:</div><div><div>0: Istart: 0, Iend: 17</div><div>1: Istart: 17, Iend: 54</div></div><div><br><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr">Giang</div></div></div>
<br><div class="gmail_quote">On Mon, Jun 5, 2017 at 1:48 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
> On Jun 4, 2017, at 5:51 PM, Hoang Giang Bui <<a href="mailto:hgbk2008@gmail.com">hgbk2008@gmail.com</a>> wrote:<br>
><br>
> Hello<br>
><br>
> I obtained two different matrices when assembling with MATIS and MATMPIAIJ. With MATIS I used MatISSetPreallocation to allocate and MatSetLocalToGlobalMapping to provide the mapping. However I still used MatSetValues and MatAssemblyBegin/End with MATIS. Is it the correct way to do so? In case that BDDC required assembling the matrix using local index, is there a way to assemble using global index to keep the same assembly interface as MATMPIAIJ?<br>
<br>
</span>   You can use MatSetValuesLocal() in both cases; this the efficient way.<br>
<br>
  Barry<br>
<br>
><br>
> Thanks<br>
> Giang<br>
<br>
</blockquote></div><br></div></div></div>