<div dir="auto">The idea of the pod code was to create local vectors to perform local products and use mpi non blocking collectives . Not sure how to fix for the nest case. I'm on vacation now, I can take a look in a couple of weeks or so</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 20, 2022, 05:30 Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank" rel="noreferrer">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></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><br></div><div>  I am cc:ing Stefano who wrote the code and can likely say immediately what the solution is.</div><div><br></div><div>  Barry</div><div><br><div><br><blockquote type="cite"><div>On Aug 19, 2022, at 5:21 PM, Wells, David <<a href="mailto:drwells@email.unc.edu" rel="noreferrer noreferrer" target="_blank">drwells@email.unc.edu</a>> wrote:</div><br><div><div 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;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">Hello PETSc experts,</div><div 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;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br></div><div 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;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></div><div 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;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt"><br></div><div 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;text-decoration:none;font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<div>[0]PETSC ERROR: Unknown type. Check for miss-spelling or missing package:<span> </span><a href="https://petsc.org/release/install/install/#external-packages" rel="noreferrer noreferrer" target="_blank">https://petsc.org/release/install/install/#external-packages</a></div><div>[0]PETSC ERROR: Unknown vector type: nest</div><div>[0]PETSC ERROR: See<span> </span><a href="https://petsc.org/release/faq/" rel="noreferrer noreferrer" target="_blank">https://petsc.org/release/faq/</a><span> </span>for trouble shooting.</div><div>[0]PETSC ERROR: Petsc Release Version 3.17.0, Mar 30, 2022<span> </span></div><div>[0]PETSC ERROR: /[...]/step-32/step-32 on a  named mitral by drwells Fri Aug 19 16:33:08 2022</div><div>[0]PETSC ERROR: Configure options [...]</div><div>[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" rel="noreferrer noreferrer" target="_blank">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/vec/vec/interface/vecreg.c:80</a></div><div>[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" rel="noreferrer noreferrer" target="_blank">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>[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" rel="noreferrer noreferrer" target="_blank">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/iguess.c:352</a></div><div>[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" rel="noreferrer noreferrer" target="_blank">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:830</a></div><div>[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" rel="noreferrer noreferrer" target="_blank">cas.unc.edu/users/d/r/drwells/Documents/Code/C/petsc-3.17.0/src/ksp/ksp/interface/itfunc.c:1078</a></div><div><br></div><div><br></div><div>It looks like VecGetType() works with VecNest while VecSetType() does not. I also noticed that VecNest isn't listed in VecRegisterAll().</div><div><br></div><div>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><br></div><div>    PetscCall(KSPCreateVecs(guess->ksp,1,&v,0,NULL));<div>    PetscCall(VecCreate(PETSC_COMM_SELF,&vseq));</div><div>    PetscCall(VecGetLocalSize(v[0],&n));</div><div>    PetscCall(VecSetSizes(vseq,n,n));</div><div>    PetscCall(VecGetType(v[0],&type));</div><div>    PetscCall(VecSetType(vseq,type));</div><div>    PetscCall(VecDestroyVecs(1,&v));</div><div>    PetscCall(VecDuplicateVecs(vseq,pod->maxn,&pod->xsnap));</div><div>    PetscCall(VecDestroy(&vseq));</div><div>    PetscCall(PetscLogObjectParents(guess,pod->maxn,pod->xsnap));</div></div><div><br></div><div>can't work.</div><div><br></div><div>Best,</div><div>David Wells</div></div></div></blockquote></div><br></div></div></blockquote></div>