<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> Could be a bug in PETSc, please send a sample program that produces the problem.<div class=""><br class=""></div><div class=""> Barry</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 15, 2020, at 1:28 PM, Karl Yang <<a href="mailto:y.juntao@hotmail.com" class="">y.juntao@hotmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div class="">Hi, Barry, </div><br class=""><div class="">Thanks for your reply. I output the matrix and vec with matview and vecview. And I think I do have the values set as it has been shown. </div><br class=""><div class="">Mat Object: 1 MPI processes</div><div class=""> type: nest</div><div class=""> Matrix object: </div><div class=""> type=nest, rows=3, cols=3 </div><div class=""> MatNest structure: </div><div class=""> (0,0) : type=seqaij, rows=25, cols=25 </div><div class=""> (0,1) : NULL </div><div class=""> (0,2) : type=seqaij, rows=25, cols=25 </div><div class=""> (1,0) : NULL </div><div class=""> (1,1) : type=seqaij, rows=25, cols=25 </div><div class=""> (1,2) : type=seqaij, rows=25, cols=25 </div><div class=""> (2,0) : type=seqaij, rows=25, cols=25 </div><div class=""> (2,1) : type=seqaij, rows=25, cols=25 </div><div class=""> (2,2) : NULL </div><div class="">Vec Object: 1 MPI processes</div><div class=""> type: nest</div><div class=""> VecNest, rows=3, structure: </div><div class=""> (0) : type=seq, rows=25 </div><div class=""> Vec Object: 1 MPI processes</div><div class=""> type: seq</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 75.8279</div><div class=""> -51.0776</div><div class=""> -75.8279</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> -90.8404</div><div class=""> 58.7011</div><div class=""> 90.8404</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> -75.8279</div><div class=""> 51.0776</div><div class=""> 75.8279</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> (1) : name="Vec_0x84000000_0", type=seq, rows=25 </div><div class=""> Vec Object: Vec_0x84000000_0 1 MPI processes</div><div class=""> type: seq</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 75.8279</div><div class=""> -51.0776</div><div class=""> -75.8279</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> -90.8404</div><div class=""> 58.7011</div><div class=""> 90.8404</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> -75.8279</div><div class=""> 51.0776</div><div class=""> 75.8279</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> (2) : type=seq, rows=25 </div><div class=""> Vec Object: 1 MPI processes</div><div class=""> type: seq</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class=""> 0.</div><div class="">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div><div class="">[0]PETSC ERROR: Invalid argument</div><div class="">[0]PETSC ERROR: Nest vector argument 4 not setup.</div><div class="">[0]PETSC ERROR: See <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</div><div class="">[0]PETSC ERROR: Petsc Release Version 3.12.5, Mar, 29, 2020 </div><div class="">[0]PETSC ERROR: ./testSolve on a arch-linux2-c-debug named f601294ac804 by Unknown Thu Jul 16 02:15:26 2020</div><div class="">[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack --with-cuda</div><div class="">[0]PETSC ERROR: #1 VecPointwiseMult_Nest() line 245 in /usr/local/petsc/petsc-3.12.5/src/vec/vec/impls/nest/vecnest.c</div><div class="">[0]PETSC ERROR: #2 VecPointwiseMult() line 1107 in /usr/local/petsc/petsc-3.12.5/src/vec/vec/interface/vector.c</div><div class="">[0]PETSC ERROR: #3 PCApply_Jacobi() line 272 in /usr/local/petsc/petsc-3.12.5/src/ksp/pc/impls/jacobi/jacobi.c</div><div class="">[0]PETSC ERROR: #4 PCApply() line 444 in /usr/local/petsc/petsc-3.12.5/src/ksp/pc/interface/precon.c</div><div class="">[0]PETSC ERROR: #5 KSP_PCApply() line 281 in /usr/local/petsc/petsc-3.12.5/include/petsc/private/kspimpl.h</div><div class="">[0]PETSC ERROR: #6 KSPInitialResidual() line 65 in /usr/local/petsc/petsc-3.12.5/src/ksp/ksp/interface/itres.c</div><div class="">[0]PETSC ERROR: #7 KSPSolve_GMRES() line 236 in /usr/local/petsc/petsc-3.12.5/src/ksp/ksp/impls/gmres/gmres.c</div><div class="">[0]PETSC ERROR: #8 KSPSolve() line 760 in /usr/local/petsc/petsc-3.12.5/src/ksp/ksp/interface/itfunc.c</div><br class=""><div class="gmail_quote_attribution">On Jul 16 2020, at 2:13 am, Barry Smith <<a href="mailto:bsmith@petsc.dev" class="">bsmith@petsc.dev</a>> wrote:</div><blockquote class=""><div class=""><br class=""></div><div class=""> From the error message the second vector you are using to form the nest vector has not been completely created/set up. Make sure you called either VecCreateSeq(), VecCreateMPI() or did VecCreate(), VecSetType(), VecSetUp() and if it is the right hand side make sure you put numerical values in it.</div><div class=""><br class=""></div><div class=""> Barry</div><div class=""><br class=""><div class=""><br class=""><blockquote class=""><div class="">On Jul 15, 2020, at 1:05 PM, Karl Yang <<a href="https://link.getmailspring.com/link/540F752A-DB59-4878-9C98-B8F4B4D9FD0D@getmailspring.com/0?redirect=mailto%3Ay.juntao%40hotmail.com&recipient=YnNtaXRoQHBldHNjLmRldg%3D%3D" title="mailto:y.juntao@hotmail.com" class="">y.juntao@hotmail.com</a>> wrote:</div><br class=""><div class=""><div class="">Hello,</div><br class=""><div class="">I'm trying to solve a 2*2 block matrix system.</div><div class="">I managed to form a 2*2 MatNest and a 21 VecNest. However when I try to make use of ksp solve, I encounter the following error. There is only one or two examples on MatNest and VecNest. I could not figure out what could be the trouble.</div><br class=""><br class=""><div class="">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div><div class="">[0]PETSC ERROR: Invalid argument</div><div class="">[0]PETSC ERROR: Nest vector argument 2 not setup.</div><div class="">[0]PETSC ERROR: See <a href="https://link.getmailspring.com/link/540F752A-DB59-4878-9C98-B8F4B4D9FD0D@getmailspring.com/1?redirect=https%3A%2F%2Fwww.mcs.anl.gov%2Fpetsc%2Fdocumentation%2Ffaq.html&recipient=YnNtaXRoQHBldHNjLmRldg%3D%3D" title="https://www.mcs.anl.gov/petsc/documentation/faq.html" class="">https://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.</div><div class="">[0]PETSC ERROR: Petsc Release Version 3.12.5, Mar, 29, 2020</div><div class="">[0]PETSC ERROR: ./testSolve on a arch-linux2-c-debug named f601294ac804 by Unknown Thu Jul 16 01:56:11 2020</div><div class="">[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack --with-cuda</div><div class="">[0]PETSC ERROR: #1 VecCopy_Nest() line 68 in /usr/local/petsc/petsc-3.12.5/src/vec/vec/impls/nest/vecnest.c</div><div class="">[0]PETSC ERROR: #2 VecCopy() line 1577 in /usr/local/petsc/petsc-3.12.5/src/vec/vec/interface/vector.c</div><div class="">[0]PETSC ERROR: #3 KSPInitialResidual() line 61 in /usr/local/petsc/petsc-3.12.5/src/ksp/ksp/interface/itres.c</div><div class="">[0]PETSC ERROR: #4 KSPSolve_GMRES() line 236 in /usr/local/petsc/petsc-3.12.5/src/ksp/ksp/impls/gmres/gmres.c</div><div class="">[0]PETSC ERROR: #5 KSPSolve() line 760 in /usr/local/petsc/petsc-3.12.5/src/ksp/ksp/interface/itfunc.c</div><br class=""><br class=""><div class="">Regards</div><div class="">JT</div></div></blockquote></div></div></blockquote><img class="mailspring-open" alt="Sent from Mailspring" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/540F752A-DB59-4878-9C98-B8F4B4D9FD0D@getmailspring.com?me=05842e25&recipient=YnNtaXRoQHBldHNjLmRldg%3D%3D"></div></blockquote></div><br class=""></div></body></html>