<div class="gmail_extra">Mohammad:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br></div>    MatCreate(comm, &amp;A);<br>
MatSetSizes(A, localRowSize, localColumnSize, globalRowSize, globalColumnSize);<br>    MatSetType(A, MATMPIAIJ);<br>

    MatMPIAIJSetPreallocation(A, 0, d_nnz, 0, o_nnz);<br>    MatSetFromOptions(A);<br>MatGetOwnershipRange(A, &amp;rStart, &amp;rEnd);<div><br></div><div><br></div><div>This (even without MatSetType(A, MATMPIAIJ);) works with 3.2-p6 but not dev. The only difference I can see is 1) the order of MatSetFromOptions and 2) I do not call MatSeqAIJSetPreallocation which I think I do not need anyway. Is there something I&#39;m doing wrong?</div>
</div></blockquote><div> </div><div>MatSetFromOptions() must be called before MatMPIAIJSetPreallocation().</div><div>If user set mattype at runtime, MatSetFromOptions() picks it and set the type accordingly. SetPreallocation()</div>
<div>will be called after the type is set.</div><div><br></div><div>Hong</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">

<div><br></div><div>Mohammd</div></div>
</blockquote></div><br></div>