On Mon, Apr 17, 2023 at 6:00 AM Edoardo alinovi <edoardo.alin...@gmail.com> wrote:
> Hey Matt, > > Thanks for the help. Here is the error: > > [0]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [0]PETSC ERROR: Object is in wrong state > [0]PETSC ERROR: Not for unassembled vector, did you call > VecAssemblyBegin()/VecAssemblyEnd()? > [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! > [0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: > hypre source: code > [0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [0]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: > bjacobi source: code > [0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.19.0, unknown > [0]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon > Apr 17 12:05:28 2023 > [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 > [0]PETSC ERROR: #1 MatMult() at > /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557 > [1]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [1]PETSC ERROR: Object is in wrong state > [1]PETSC ERROR: Not for unassembled vector, did you call > VecAssemblyBegin()/VecAssemblyEnd()? > [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! > [1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: > hypre source: code > [1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [1]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: > bjacobi source: code > [1]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting. > [1]PETSC ERROR: Petsc Release Version 3.19.0, unknown > [1]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon > Apr 17 12:05:28 2023 > [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 > [1]PETSC ERROR: #1 MatMult() at > /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557 > [2]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [2]PETSC ERROR: Object is in wrong state > [2]PETSC ERROR: Not for unassembled vector, did you call > VecAssemblyBegin()/VecAssemblyEnd()? > [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! > [2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: > hypre source: code > [2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [2]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: > bjacobi source: code > [2]PETSC ERROR: [3]PETSC ERROR: --------------------- Error Message > -------------------------------------------------------------- > [3]PETSC ERROR: Object is in wrong state > [3]PETSC ERROR: Not for unassembled vector, did you call > VecAssemblyBegin()/VecAssemblyEnd()? > [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! > [3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_p_pc_type value: > hypre source: code > [3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_ksp_rtol value: > 0.10000000000000000E-0001 source: code > [3]PETSC ERROR: Option left: name:-UPeqn_fieldsplit_u_pc_type value: > bjacobi source: code > See https://petsc.org/release/faq/ for trouble shooting. > [2]PETSC ERROR: Petsc Release Version 3.19.0, unknown > [2]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon > Apr 17 12:05:28 2023 > [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 > [3]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting. > [3]PETSC ERROR: Petsc Release Version 3.19.0, unknown > [3]PETSC ERROR: flubio_coupled on a arch-gnu named betelgeuse by edo Mon > Apr 17 12:05:28 2023 > [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 > [2]PETSC ERROR: #1 MatMult() at > /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557 > [3]PETSC ERROR: #1 MatMult() at > /home/edo/user_software_repository/petsc/src/mat/interface/matrix.c:2557 > > Here the way I am doing: > > ! Duplicate vector > call VecDuplicate(this%rhs, x, ierr) > call VecZeroEntries(x, ierr) > > call VecDuplicate(this%rhs, vres, ierr) > ! Set the current solution > call VecSetValues(x, numberOfElements, mesh%cellGlobalAddr-1, > field%phi(1:numberOfElements,iComp), INSERT_VALUES, ierr) > After VecSetValues(), you must call VecAssemblyBegin/End(). Thanks, Matt > call flubioStopMsg('HELLO') > > cheers > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>