<div dir="ltr">Hello!<div><br></div><div>Can somebody explain to me what I am doing wrong here?</div><div>I took tutorial 28 from KSP folder and modified it a little in order to create manual DM interpolations and set them to PC.</div><div>When i run the application I receive an error:</div><div><br></div><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: Must call DMShellSetGlobalVector() or DMShellSetCreateGlobalVector()<br>[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/">https://petsc.org/release/faq/</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Development GIT revision: v3.17.3-770-gceb9926454c  GIT Date: 2022-07-15 21:35:25 +0000<br>[0]PETSC ERROR: ./a.out on a  named MacBook-Pro-Oleg.local by olegshatrov Mon Sep 12 17:53:13 2022<br>[0]PETSC ERROR: Configure options --prefix=/usr/local CFLAGS="-m64 -O0 -g" CXXFLAGS="-m64 -O0 -g" FCFLAGS="-m64 -O0 -g -ffree-line-length-none" --with-mem-debug=1 --with-debugging=1 --with-mpi-dir=/usr/local/ --with-moab=true<br>[0]PETSC ERROR: #1 DMCreateGlobalVector_Shell() at /Users/olegshatrov/Documents/GitHub/petsc/src/dm/impls/shell/dmshell.c:206<br>[0]PETSC ERROR: #2 DMCreateGlobalVector() at /Users/olegshatrov/Documents/GitHub/petsc/src/dm/interface/dm.c:998<br>[0]PETSC ERROR: #3 DMGetGlobalVector() at /Users/olegshatrov/Documents/GitHub/petsc/src/dm/interface/dmget.c:161<br>[0]PETSC ERROR: #4 KSPCreateVecs() at /Users/olegshatrov/Documents/GitHub/petsc/src/ksp/ksp/interface/iterativ.c:1616<br>[0]PETSC ERROR: #5 PCSetUp_MG() at /Users/olegshatrov/Documents/GitHub/petsc/src/ksp/pc/impls/mg/mg.c:1129<br>[0]PETSC ERROR: #6 PCSetUp() at /Users/olegshatrov/Documents/GitHub/petsc/src/ksp/pc/interface/precon.c:991<br>[0]PETSC ERROR: #7 KSPSetUp() at /Users/olegshatrov/Documents/GitHub/petsc/src/ksp/ksp/interface/itfunc.c:401<br>[0]PETSC ERROR: #8 main() at ex28.c:67<br>[0]PETSC ERROR: No PETSc Option Table entries<br>[0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint@mcs.anl.gov----------<br>--------------------------------------------------------------------------<br></div><div><br></div><div>And this is strange, since I did not provide any Shell DM.</div><div>When i comment out lines with setting interpolation matrix to PCMG everything works fine:</div><div><img src="cid:ii_l7yw1xca0" alt="image.png" width="562" height="167"><br></div><div><br></div><div>I am testing on MacOS 12.3.</div><div>MPI: Open MPI: 4.1.4</div><div>gcc version 12.1.0</div><div>Program is compiled with mpicc ex28.c -I /usr/local/include/ -L /usr/local/lib -lpetsc</div><div><br></div><div><br></div><div>Thanks in advance,</div><div>Oleg</div></div>