[petsc-users] Debugging MatAssemblyEnd

Matthew Knepley knepley at gmail.com
Fri Aug 26 04:01:17 CDT 2011


On Fri, Aug 26, 2011 at 8:37 AM, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> > When you run in the debugger and break after it has obviously hung, are
> all
> > processes stopped at the same place?
>
> Of course not, they are stuck at barriers elsewhere. Thanks for the
> valuable question.
>
> > If you see an error condition, you can
> > run
> > CHKMEMQ;
> > MPI_Barrier(((PetscObject)A)->comm);
> > MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY);
> > MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
> > If it hangs, check where every process is stuck.
>
> I obviously seem to be missing some barriers. But why would I need
> MPI_Barrier(((PetscObject)A)->comm) and not just
> MPI_Barrier(PETSC_COMM_WORLD)? Would that only force a barrier for
> A-related traffic?


The idea here is the following:

  1) We would like to isolate the mismatch in synchronizations

  2) We can place barriers in the code to delimit the sections which contain
the offending code,
       and also eliminate bugs in MatAssembly as a possible source of
problems.

  3) Do you have any MPI code you wrote yourself in here?

     Matt


>
> Dominik
>

-- 
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/20110826/54d51d61/attachment.htm>


More information about the petsc-users mailing list