<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 7, 2015 at 6:04 PM, Boris <span dir="ltr"><<a href="mailto:borisbou@buffalo.edu" target="_blank">borisbou@buffalo.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am working on a toy Laplace problem (p1.C attached) investigating some multigrid projection matrices when using finite differences. Things seem to work as expected when running with :<br>
<br>
./p1 -da_grid_x 21 -da_grid_y 21 -mat_view -pc_type mg -pc_mg_levels 1<br>
<br>
But if I change pc_mg_levels to 2 or 3, I generate the error below.<br>
<br>
Any insights as to what I could be doing wrong would be much appreciated.<br></blockquote><div><br></div><div>It looks like your FormJacobian() is getting called with a DM that you do not expect. I think its getting</div><div>called for a coarse grid, but you are getting the same fine DM from your user context.</div><div><br></div><div>Take a look at SNES ex5 where we solve exactly this problem.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
Boris<br>
<br>
<br>
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>
[0]PETSC ERROR: Argument out of range<br>
[0]PETSC ERROR: Local index 169 too large 168 (max) at 4<br>
[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br>
[0]PETSC ERROR: Petsc Release Version 3.5.4, May, 23, 2015<br>
[0]PETSC ERROR: ./p1 on a gcc-4.8.4-mpich-3.1.4-openblas-0.2.14-opt named <a href="http://bender.eng.buffalo.edu" rel="noreferrer" target="_blank">bender.eng.buffalo.edu</a> by borisbou Wed Oct 7 18:06:35 2015<br>
[0]PETSC ERROR: Configure options --prefix=/bender1/data/shared/software/libs/petsc/3.5.4/gcc/4.8.4/mpich/3.1.4/openblas/0.2.14/opt --with-debugging=false --COPTFLAGS="-O3 -mavx" --CXXOPTFLAGS="-O3 -mavx" --FOPTFLAGS=-O3 --with-shared-libraries=1 --with-mpi-dir=/bender1/data/shared/software/libs/mpich/3.1.4/gcc/4.8.4 --with-mumps=true --download-mumps=1 --with-metis=true --download-metis=1 --with-parmetis=true --download-parmetis=1 --with-superlu=true --download-superlu=1 --with-superludir=true --download-superlu_dist=1 --with-blacs=true --download-blacs=1 --with-scalapack=true --download-scalapack=1 --with-hypre=true --download-hypre=1 --with-blas-lib="[/bender1/data/shared/software/libs/openblas/0.2.14/gcc/4.8.4/lib/libopenblas.so]" --with-lapack-lib="[/bender1/data/shared/software/libs/openblas/0.2.14/gcc/4.8.4/lib/libopenblas.so]"<br>
[0]PETSC ERROR: #1 ISLocalToGlobalMappingApply() line 401 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/vec/is/utils/isltog.c<br>
[0]PETSC ERROR: #2 MatSetValuesLocal() line 1982 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/mat/interface/matrix.c<br>
[0]PETSC ERROR: #3 MatSetValuesStencil() line 1383 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/mat/interface/matrix.c<br>
[0]PETSC ERROR: #4 FormJacobian() line 366 in p1.C<br>
[0]PETSC ERROR: #5 SNESComputeJacobian() line 2193 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/snes/interface/snes.c<br>
[0]PETSC ERROR: #6 KSPComputeOperators_SNES() line 527 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/snes/interface/snes.c<br>
[0]PETSC ERROR: #7 KSPSetUp() line 256 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/ksp/ksp/interface/itfunc.c<br>
[0]PETSC ERROR: #8 PCSetUp_MG() line 803 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/ksp/pc/impls/mg/mg.c<br>
[0]PETSC ERROR: #9 PCSetUp() line 902 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/ksp/pc/interface/precon.c<br>
[0]PETSC ERROR: #10 KSPSetUp() line 306 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/ksp/ksp/interface/itfunc.c<br>
[0]PETSC ERROR: #11 KSPSolve() line 418 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/ksp/ksp/interface/itfunc.c<br>
[0]PETSC ERROR: #12 SNESSolve_NEWTONLS() line 232 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/snes/impls/ls/ls.c<br>
[0]PETSC ERROR: #13 SNESSolve() line 3743 in /bender1/data/shared/software/builddir/petsc-1HCwjW/petsc-3.5.4/src/snes/interface/snes.c<br>
[0]PETSC ERROR: #14 main() line 147 in p1.C<br>
[0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------<br>
application called MPI_Abort(MPI_COMM_WORLD, 63) - process 0<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>