[petsc-dev] PCComputeExplicitOperator error

Mark Adams mfadams at lbl.gov
Mon Aug 4 13:35:57 CDT 2014

I am getting a new-non-zero error in PCComputeExplicitOperator at the
bottom of precon.c.  it looks like the matrix is set to have not memory:

PetscErrorCode  PCComputeExplicitOperator(PC pc,Mat *mat)


  if (size == 1) {    ierr = MatSetType(*mat,MATSEQDENSE);CHKERRQ(ierr);

    ierr = MatSeqDenseSetPreallocation(*mat,NULL);CHKERRQ(ierr);

  } else {

    ierr = MatSetType(*mat,MATMPIAIJ);CHKERRQ(ierr);

    ierr = MatMPIAIJSetPreallocation(*mat,0,NULL,0,NULL);CHKERRQ(ierr);



    ierr = MatSetValues(*mat,m,rows,1,&i,array,INSERT_VALUES);CHKERRQ(ierr);

I get the error on this last line (#1835 precon.c).  Matt mentioned that
this code needed work.  I can work on this but am not sure about the best
way to proceed.  I am doing a full Schur complement and don't mind simply
going through and solving for each column of A_01 in A_00^-1 * A_01.  I
guess the pc->pmat is a matrix shell with (A_11 - A_10 * A_00^-1 * A_01).

should this just be a dense matrix in parallel as well as not?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20140804/bed1fe25/attachment.html>

More information about the petsc-dev mailing list