<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> I am not sure why the code works this way creating these sequential work vectors. Since VecNest needs some information about the subvectors I don't think just setting these work vectors to nest vectors will work properly. <div class=""><br class=""></div><div class=""> I am cc:ing Stefano who wrote the code and can likely say immediately what the solution is.</div><div class=""><br class=""></div><div class=""> Barry</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 19, 2022, at 5:21 PM, Wells, David <<a href="mailto:drwells@email.unc.edu" class="">drwells@email.unc.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Hello PETSc experts,</div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br class=""></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">I am using VecNest to solve a Stokes problem and I ran into an issue using the POD KSPGuess routines:<br class=""></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><br class=""></div><div class="elementToProof" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<div class="">[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing package:<span class="Apple-converted-space"> </span><a href="https://petsc.org/release/install/install/#external-packages" class="">https://petsc.org/release/install/install/#external-packages</a></div><div class="">[0]PETSC ERROR: Unknown vector type: nest</div><div class="">[0]PETSC ERROR: See<span class="Apple-converted-space"> </span><a href="https://petsc.org/release/faq/" class="">https://petsc.org/release/faq/</a><span class="Apple-converted-space"> </span>for trouble shooting.</div><div class="">[0]PETSC ERROR: Petsc Release Version 3.17.0, Mar 30, 2022<span class="Apple-converted-space"> </span></div><div class="">[0]PETSC ERROR: /[...]/step-32/step-32 on a named mitral by drwells Fri Aug 19 16:33:08 2022</div><div class="">[0]PETSC ERROR: Configure options [...]</div><div class="">[0]PETSC ERROR: #1 VecSetType() at /afs/<a href="http://cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/vec/vec/interface/vecreg.c:80" class="">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/vec/vec/interface/vecreg.c:80</a></div><div class="">[0]PETSC ERROR: #2 KSPGuessSetUp_POD() at /afs/<a href="http://cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/guess/impls/pod/pod.c:118" class="">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/guess/impls/pod/pod.c:118</a></div><div class="">[0]PETSC ERROR: #3 KSPGuessSetUp() at /afs/<a href="http://cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/iguess.c:352" class="">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/iguess.c:352</a></div><div class="">[0]PETSC ERROR: #4 KSPSolve_Private() at /afs/<a href="http://cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:830" class="">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:830</a></div><div class="">[0]PETSC ERROR: #5 KSPSolve() at /afs/<a href="http://cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:1078" class="">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:1078</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">It looks like VecGetType() works with VecNest while VecSetType() does not. I also noticed that VecNest isn't listed in VecRegisterAll().</div><div class=""><br class=""></div><div class="">I think I can write a patch to make the POD KSPGuess work with VecNest, but: should VecSetType() work with VecNest? It seems like this is an oversight but I'd like to know if there is some fundamental reason why the sequence used there</div><div class=""><br class=""></div><div class=""> PetscCall(KSPCreateVecs(guess->ksp,1,&v,0,NULL));<div class=""> PetscCall(VecCreate(PETSC_COMM_SELF,&vseq));</div><div class=""> PetscCall(VecGetLocalSize(v[0],&n));</div><div class=""> PetscCall(VecSetSizes(vseq,n,n));</div><div class=""> PetscCall(VecGetType(v[0],&type));</div><div class=""> PetscCall(VecSetType(vseq,type));</div><div class=""> PetscCall(VecDestroyVecs(1,&v));</div><div class=""> PetscCall(VecDuplicateVecs(vseq,pod->maxn,&pod->xsnap));</div><div class=""> PetscCall(VecDestroy(&vseq));</div><div class=""> PetscCall(PetscLogObjectParents(guess,pod->maxn,pod->xsnap));</div></div><div class=""><br class=""></div><div class="">can't work.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">David Wells</div></div></div></blockquote></div><br class=""></div></body></html>