[petsc-users] Problem with VecGhostUpdateBegin

Matthew Knepley knepley at gmail.com
Thu Feb 13 09:33:31 CST 2025


On Thu, Feb 13, 2025 at 10:27 AM ANTONIO GHIDONI via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Hello,
>    I am using Petsc 3.30.2. When I trie to update a ghost vector, I obtain
> the following error:
>
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Object is in wrong state
> [0]PETSC ERROR: Outstanding operation has not been completed
> [0]PETSC ERROR: See
> https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!e7HV8lVYESfvZo54Jin3YQ8o42CMuDL5AoF-o58a35sCLqd_0HhPSZMkoF20Zd0goGvAFFbbapxUFblcU12EitvG2MwayenCuQ$
> for trouble shooting.
> [0]PETSC ERROR: Petsc Release Version 3.20.2, Nov 30, 2023
> [0]PETSC ERROR: ./main2d.out on a linux-intel named node1 by cfdlab Thu
> Feb 13 14:08:53 2025
> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> --with-fc=gfortran --with-debugging=0 --with-pic COPTFLAGS=-O3
> CXXOPTFLAGS=-O3 FOPTFLAGS=-O3 F90OPTFLAGS=-O3 --download-fblaslapack
> --download-mpich
> [0]PETSC ERROR: #1 PetscSFReset_Basic() at
> /home/cfdlab/Lib/petsc-3.20.2/src/vec/is/sf/impls/basic/sfbasic.c:93
> [0]PETSC ERROR: #2 PetscSFReset() at
> /home/cfdlab/Lib/petsc-3.20.2/src/vec/is/sf/interface/sf.c:119
> [0]PETSC ERROR: #3 PetscSFDestroy() at
> /home/cfdlab/Lib/petsc-3.20.2/src/vec/is/sf/interface/sf.c:237
> [0]PETSC ERROR: #4 VecScatterDestroy() at
> /home/cfdlab/Lib/petsc-3.20.2/src/vec/is/sf/interface/vscat.c:483
> [0]PETSC ERROR: #5 VecDestroy_MPI() at
> /home/cfdlab/Lib/petsc-3.20.2/src/vec/vec/impls/mpi/pdvec.c:38
> [0]PETSC ERROR: #6 VecDestroy() at
> /home/cfdlab/Lib/petsc-3.20.2/src/vec/vec/interface/vector.c:579
>
>
> It’s a strange behavior because with other vectors the same routine works
> properly. My routine is as follows:
>
> INTEGER(4) :: nb, nt(:), jtg(nb), nblk, nlfr
> INTEGER(4) :: fr(nlfr+nb*nblk)
>
>  Vec          iv_fr
>
>  INTEGER(4), ALLOCATABLE :: igh(:)
>  INTEGER(4)              :: ierr
>
>
>  ALLOCATE    (igh(nt(1)))
>
> DO it = 1, nt(1)
>        igh(it)   =  jtg(it)  -1
>  ENDDO
>
>  CALL VecCreateGhostBlockWithArray (PETSC_COMM_WORLD,nblk,nlfr, &
>                 PETSC_DECIDE,nt(1),igh,fr,iv_fr,ierr)
>  CALL VecGhostUpdateBegin(iv_fr,INSERT_VALUES,SCATTER_FORWARD,ierr)
>  CALL VecGhostUpdateEnd (iv_fr,INSERT_VALUES,SCATTER_FORWARD,ierr)
>
>  CALL VecDestroy (iv_fr,ierr)
>
>  DEALLOCATE  (igh)
>
> Any suggestion about this strange error?
>

You have a Begin() somewhere without an End(). It is hard to say anything
else without the code.

  Thanks,

     Matt


> Antonio
>
>
> --
>
>
>
>
> Informativa sulla Privacy:
> https://urldefense.us/v3/__https://www.unibs.it/it/node/1452__;!!G_uCfscf7eWS!e7HV8lVYESfvZo54Jin3YQ8o42CMuDL5AoF-o58a35sCLqd_0HhPSZMkoF20Zd0goGvAFFbbapxUFblcU12EitvG2MzDu5UMRg$
>
> <
> https://urldefense.us/v3/__https://www.unibs.it/it/node/1452__;!!G_uCfscf7eWS!e7HV8lVYESfvZo54Jin3YQ8o42CMuDL5AoF-o58a35sCLqd_0HhPSZMkoF20Zd0goGvAFFbbapxUFblcU12EitvG2MzDu5UMRg$
> >
>


-- 
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://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!aHE-77So2SAK4bBUqZtJoEI5p6AYoobJOERwt-ejOAIW_O9tKt10N3EzIsYw3bc_PTiu6nip8M2siVtrPfIz$  <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!aHE-77So2SAK4bBUqZtJoEI5p6AYoobJOERwt-ejOAIW_O9tKt10N3EzIsYw3bc_PTiu6nip8M2siafTwy4x$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250213/f99a936b/attachment.html>


More information about the petsc-users mailing list