<div dir="ltr"><div dir="ltr">On Tue, Dec 6, 2022 at 6:45 AM 김성익 <<a href="mailto:ksi2443@gmail.com">ksi2443@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div><br></div><div>There is a code which can run in not mpirun and also it can run in mpi_linear_solver_server.</div><div>However, it has an error in just mpirun case such as mpirun -np ./program.</div><div>The error output is as below.</div><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: Object is in wrong state<br>[0]PETSC ERROR: Not for unassembled vector<br>[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.18.1, unknown <br>[0]PETSC ERROR: ./app on a arch-linux-c-debug named ubuntu by ksi2443 Tue Dec  6 03:39:13 2022<br>[0]PETSC ERROR: Configure options -download-mumps -download-scalapack -download-parmetis -download-metis<br>[0]PETSC ERROR: #1 VecCopy() at /home/ksi2443/petsc/src/vec/vec/interface/vector.c:1625<br>[0]PETSC ERROR: #2 KSPInitialResidual() at /home/ksi2443/petsc/src/ksp/ksp/interface/itres.c:60<br>[0]PETSC ERROR: #3 KSPSolve_GMRES() at /home/ksi2443/petsc/src/ksp/ksp/impls/gmres/gmres.c:227<br>[0]PETSC ERROR: #4 KSPSolve_Private() at /home/ksi2443/petsc/src/ksp/ksp/interface/itfunc.c:899<br>[0]PETSC ERROR: #5 KSPSolve() at /home/ksi2443/petsc/src/ksp/ksp/interface/itfunc.c:1071<br>[0]PETSC ERROR: #6 main() at /home/ksi2443/Downloads/coding/a1.c:450<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></div><div><br></div><div>How can I fix this??</div></div></blockquote><div><br></div><div>It looks like we do not check the assembled state in parallel, since it cannot cause a problem, but every time you</div><div>update values with VecSetValues(), you should call VecAssemblyBegin/End().</div><div><br></div><div>  Thanks</div><div><br></div><div>      Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks,</div><div>Hyung Kim</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>