Well, here's the problem:<div><br></div><div>MatSetBlockSize() used to call mat->ops->setblocksize() which the MPI matrices forwarded down to their seq submatrices.</div><div><br></div><div>But then this patch removed that behavior so MatSetBlockSize() is processed immediately and not forwarded down.</div>
<div><br></div><div><a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/80ec81eb9db9">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/80ec81eb9db9</a></div><div><br></div><div>Since the Seq inner matrices have different PetscLayouts, they don't inherit the block sizes set on their parent.</div>
<div><br></div><div>Barry, why did you remove this MatOp? How do you want the MPI matrices to forward block sizes now?<br><br><div class="gmail_quote">On Sat, May 19, 2012 at 10:57 AM, Mark F. Adams <span dir="ltr"><<a href="mailto:mark.adams@columbia.edu" target="_blank">mark.adams@columbia.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm going to be tied up for a few days, should be able to get to this Wed., if not sooner, but if anyone wants to take a crack at it, here it is. This is run with 8 procs.<br>

<br>
Mark<br>
<br>
==51037== Command: ./ex56 -ne 19 -alpha 1.e-3 -ksp_type cg -ksp_monitor -ksp_max_it 15 -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1 -pc_gamg_verbose 2 -ksp_converged_reason -options_left -theta -30.0 -epsilon .01 -blob_center 0.,0. -pc_gamg_threshold .0 -pc_gamg_coarse_eq_limit 100 -use_coordinates -out_verbose 2 -aggmg_smooths 1 -mg_levels_ksp_type chebyshev -mg_levels_ksp_chebyshev_estimate_eigenvalues 0,0.2,0,1.1 -mg_levels_pc_type pbjacobi -mg_levels_ksp_max_it 1<br>

<br>
==51039== Invalid read of size 8<br>
==51039==    at 0x91E38B: PCApply_PBJacobi_3 (pbjacobi.c:81)<br>
==51039==    by 0xA0FE23: PCApply (precon.c:384)<br>
==51039==    by 0xADA9B2: KSPInitialResidual (itres.c:64)<br>
==51039==    by 0xA7EA39: KSPSolve_GMRES (gmres.c:230)<br>
==51039==    by 0xAB3CA2: KSPSolve (itfunc.c:446)<br>
==51039==    by 0xAA6FF8: KSPSolve_Chebyshev (cheby.c:269)<br>
==51039==    by 0xAB3CA2: KSPSolve (itfunc.c:446)<br>
==51039==    by 0x9ECD2F: PCMGMCycle_Private (mg.c:20)<br>
==51039==    by 0x9F0BEF: PCApply_MG (mg.c:321)<br>
==51039==    by 0xA0FE23: PCApply (precon.c:384)<br>
==51039==    by 0xA43EBF: KSPSolve_CG (cg.c:139)<br>
==51039==    by 0xAB3CA2: KSPSolve (itfunc.c:446)<br>
==51039==    by 0x4805: main (in ./ex56)<br>
==51039==  Address 0x27f4c90 is 0 bytes after a block of size 24,032 alloc'd<br>
==51039==    at 0x1B2AF16: malloc (vg_replace_malloc.c:236)<br>
==51039==    by 0x8A8C7: PetscMallocAlign (mal.c:37)<br>
==51039==    by 0x61E602: MatInvertBlockDiagonal_SeqAIJ (aij.c:2816)<br>
==51039==    by 0x2F0AC3: MatInvertBlockDiagonal (matrix.c:9280)<br>
==51039==    by 0x6D1494: MatInvertBlockDiagonal_MPIAIJ (mpiaij.c:2981)<br>
==51039==    by 0x2F0AC3: MatInvertBlockDiagonal (matrix.c:9280)<br>
==51039==    by 0x920A85: PCSetUp_PBJacobi (pbjacobi.c:213)<br>
==51039==    by 0xA1783B: PCSetUp (precon.c:832)<br>
==51039==    by 0xAB2125: KSPSetUp (itfunc.c:278)<br>
==51039==    by 0x9F536C: PCSetUp_MG (mg.c:678)<br>
==51039==    by 0x98C26C: PCSetUp_GAMG (gamg.c:984)<br>
==51039==    by 0xA1783B: PCSetUp (precon.c:832)<br>
==51039==    by 0xAB2125: KSPSetUp (itfunc.c:278)<br>
==51039==    by 0x46AD: main (in ./ex56)<br>
==51039==<br>
<br>
</blockquote></div><br></div>