Thanks for the reply Matthew
Your suggestion to use MatGetValues helped me to figure out my problem.

The legacy part of my software decided I didn't have enough memory to solve the problem in one shot, so it split it into two pieces, unbeknownst to me. So my A matrix was being partially loaded (hence the unfilled diagonals)


On 08/16/2013 11:34 AM, Matthew Knepley wrote:
On Fri, Aug 16, 2013 at 10:09 AM, Bill McGrory <[email protected] <mailto:[email protected]>> wrote:

    More information pertaining to the referenced post.

    I am using default parameters for my KSP solver, so my routines
    are pretty simple I don't pass any options in through the command
    line, so this is all default stuff here.

            I create, and fill A and b, and then call
    MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);

                    MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);

            VecAssemblyBegin(b);
            VecAssemblyEnd(b);

            VecSet(x,0.);

            // Solve A x = b

            KSPCreate(PETSC_COMM_WORLD,&ksp);

            KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN);

            KSPSetFromOptions(ksp);

            KSPSolve(ksp,b,x);

    The missing diagonals, I see are in the preconditioner, not the
    original Matrix, so I thought I would check my original.


From the code above, this makes no sense. You do not have a separate preconditioner matrix.

    When I make a call to MatMissingDiagonal, after assembling my
    matrix, I get the error telling me that MatMissingDiagonal is not
    supported for a mpibaij matrix.

    Do I have any alternative for querying my assembled matrix?


You can always use MatGetValues().

   Matt

    Thanks again
    Bill





Very true statement in my case below. Ah, but to know what you are taking for granted.
--
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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to