<div dir="ltr"><div dir="ltr">On Mon, Apr 17, 2023 at 6:00 AM Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com">edoardo.alinovi@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">Hey Matt,<div><br></div><div>Thanks for the help. Here is the error:</div><div><br></div><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: Object is in wrong state<br>[0]PETSC ERROR: Not for unassembled vector, did you call VecAssemblyBegin()/VecAssemblyEnd()?<br>[0]PETSC ERROR: WARNING! There are option(s) set that were not used! Could be the program crashed before they were used or a spelling mistake, etc!<br>[0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: hypre source: code<br>[0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: bjacobi source: code<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.19.0, unknown<br>[0]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon Apr 17 12:05:28 2023<br>[0]PETSC ERROR: Configure options PETSC_ARCH=arch-gnu FOPTFLAGS=-O3 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 -with-debugging=no -with-mpi-dir=/home/edo/user_software_repository/openmpi-4.1.2/build -download-fblaslapack=1 -download-superlu_dist -download-mumps -download-hypre -download-metis -download-parmetis -download-scalapack --download-ml -download-slepc -download-spai -download-fftw<br>[0]PETSC ERROR: #1 MatMult() at /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557<br>[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[1]PETSC ERROR: Object is in wrong state<br>[1]PETSC ERROR: Not for unassembled vector, did you call VecAssemblyBegin()/VecAssemblyEnd()?<br>[1]PETSC ERROR: WARNING! There are option(s) set that were not used! Could be the program crashed before they were used or a spelling mistake, etc!<br>[1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: hypre source: code<br>[1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: bjacobi source: code<br>[1]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[1]PETSC ERROR: Petsc Release Version 3.19.0, unknown<br>[1]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon Apr 17 12:05:28 2023<br>[1]PETSC ERROR: Configure options PETSC_ARCH=arch-gnu FOPTFLAGS=-O3 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 -with-debugging=no -with-mpi-dir=/home/edo/user_software_repository/openmpi-4.1.2/build -download-fblaslapack=1 -download-superlu_dist -download-mumps -download-hypre -download-metis -download-parmetis -download-scalapack --download-ml -download-slepc -download-spai -download-fftw<br>[1]PETSC ERROR: #1 MatMult() at /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557<br>[2]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[2]PETSC ERROR: Object is in wrong state<br>[2]PETSC ERROR: Not for unassembled vector, did you call VecAssemblyBegin()/VecAssemblyEnd()?<br>[2]PETSC ERROR: WARNING! There are option(s) set that were not used! Could be the program crashed before they were used or a spelling mistake, etc!<br>[2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: hypre source: code<br>[2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: bjacobi source: code<br>[2]PETSC ERROR: [3]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[3]PETSC ERROR: Object is in wrong state<br>[3]PETSC ERROR: Not for unassembled vector, did you call VecAssemblyBegin()/VecAssemblyEnd()?<br>[3]PETSC ERROR: WARNING! There are option(s) set that were not used! Could be the program crashed before they were used or a spelling mistake, etc!<br>[3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: hypre source: code<br>[3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: 0.10000000000000000E-0001 source: code<br>[3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: bjacobi source: code<br>See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[2]PETSC ERROR: Petsc Release Version 3.19.0, unknown<br>[2]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon Apr 17 12:05:28 2023<br>[2]PETSC ERROR: Configure options PETSC_ARCH=arch-gnu FOPTFLAGS=-O3 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 -with-debugging=no -with-mpi-dir=/home/edo/user_software_repository/openmpi-4.1.2/build -download-fblaslapack=1 -download-superlu_dist -download-mumps -download-hypre -download-metis -download-parmetis -download-scalapack --download-ml -download-slepc -download-spai -download-fftw<br>[3]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<br>[3]PETSC ERROR: Petsc Release Version 3.19.0, unknown<br>[3]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon Apr 17 12:05:28 2023<br>[3]PETSC ERROR: Configure options PETSC_ARCH=arch-gnu FOPTFLAGS=-O3 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 -with-debugging=no -with-mpi-dir=/home/edo/user_software_repository/openmpi-4.1.2/build -download-fblaslapack=1 -download-superlu_dist -download-mumps -download-hypre -download-metis -download-parmetis -download-scalapack --download-ml -download-slepc -download-spai -download-fftw<br>[2]PETSC ERROR: #1 MatMult() at /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557<br>[3]PETSC ERROR: #1 MatMult() at /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557<br></div><div><br></div><div>Here the way I am doing:</div><div><br></div><div> ! Duplicate vector<br> call VecDuplicate(this%rhs, x, ierr)<br> call VecZeroEntries(x, ierr)<br><br> call VecDuplicate(this%rhs, vres, ierr)<br> ! Set the current solution<br> call VecSetValues(x, numberOfElements, mesh%cellGlobalAddr-1, field%phi(1:numberOfElements,iComp), INSERT_VALUES, ierr)<br></div></div></blockquote><div><br></div><div>After VecSetValues(), you must 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> call flubioStopMsg('HELLO')<br></div><div><br></div><div>cheers</div></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><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>