<div dir="ltr">MatSetup was the issues: this seems to work with and w/o -mat_type dense:<div><br></div><div><div>           call MatCreate(solver%comm,solver%schur,ierr);</div><div>           call MatSetSizes(solver%schur,nloc,nloc,PETSC_DECIDE,PETSC_DECIDE,ierr)</div>
<div>           call MatSetType(solver%schur,MATAIJ,ierr)</div><div>           call MatSeqAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,ierr)</div><div>           call MatMPIAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,i,PETSC_NULL_INTEGER,ierr)</div>
<div>           call MatSetFromOptions(solver%schur,ierr)</div><div>           call MatSetup(solver%schur,ierr)           </div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 25, 2014 at 12:34 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<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"><div class="gmail_quote"><div class="">On Mon, Aug 25, 2014 at 9:49 AM, Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>I have a matrix that is logically dense and I create it like this:</div><div><br></div><div>           call MatCreate(solver%comm,solver%schur,ierr);</div><div>           call MatSetSizes(solver%schur,nloc,nloc,PETSC_DECIDE,PETSC_DECIDE,ierr)</div>


<div>           call MatSetType(solver%schur,MATAIJ,ierr)</div><div>           call MatSeqAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,ierr)</div><div>           call MatMPIAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,i,PETSC_NULL_INTEGER,ierr)</div>


<div>           !call MatSetFromOptions(solver%schur,ierr)</div></div></blockquote><div><br></div></div><div>Send the full error from</div><div><br></div><div>           call MatCreate(solver%comm,solver%schur,ierr);</div>
<div>
<div>           call MatSetSizes(solver%schur,nloc,nloc,PETSC_DECIDE,PETSC_DECIDE,ierr)</div><div>           call MatSetFromOptions(solver%schur,ierr)</div><div>           call MatSetUp(solver%schur, ierr)</div><div><br>
</div>
<div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div></div><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div>This works but if I uncomment MatSetFromOptions, and comment out the AIJ lines, and have '-mat_type dense' I get an error that the row is too large.  I can see from the trace that this happens in MatSetValues_MPIDense.  If I don't comment out the AIJ calls then I get a segv in MatSetValues, that is called from MatSetValues_MPIDense.  It segvs on the first line that uses the 'mat' so it looks like it is being called with garbage.</div>


<div><br></div><div>Any ideas?</div><span><font color="#888888"><div>Mark</div></font></span></div>
</blockquote></div></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>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
</font></span></div></div>
</blockquote></div><br></div>