[petsc-users] dynamic matrix type & dense matrix.
Matthew Knepley
knepley at gmail.com
Mon Aug 25 11:34:32 CDT 2014
On Mon, Aug 25, 2014 at 9:49 AM, Mark Adams <mfadams at lbl.gov> wrote:
> I have a matrix that is logically dense and I create it like this:
>
> call MatCreate(solver%comm,solver%schur,ierr);
> call
> MatSetSizes(solver%schur,nloc,nloc,PETSC_DECIDE,PETSC_DECIDE,ierr)
> call MatSetType(solver%schur,MATAIJ,ierr)
> call
> MatSeqAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,ierr)
> call
> MatMPIAIJSetPreallocation(solver%schur,nloc,PETSC_NULL_INTEGER,i,PETSC_NULL_INTEGER,ierr)
> !call MatSetFromOptions(solver%schur,ierr)
>
Send the full error from
call MatCreate(solver%comm,solver%schur,ierr);
call
MatSetSizes(solver%schur,nloc,nloc,PETSC_DECIDE,PETSC_DECIDE,ierr)
call MatSetFromOptions(solver%schur,ierr)
call MatSetUp(solver%schur, ierr)
Thanks,
Matt
> 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.
>
> Any ideas?
> Mark
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140825/2fb2780c/attachment.html>
More information about the petsc-users
mailing list