<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><br></div><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><div>Mark</div></div>