<div dir="ltr"><div class="gmail_extra">Thanks Hong; that fixed the problem.<br><br><div class="gmail_quote">On Wed, Apr 25, 2012 at 11:31 AM, Hong Zhang <span dir="ltr"><<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra">Mohammad:<br><div class="gmail_quote"><div class="im"><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, &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, &rStart, &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'm doing wrong?</div>
</div></blockquote><div> </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>
</blockquote></div><br></div></div>