Re: [petsc-users] IS from MatNestGetISs
From the manual page: "The reference count is not increased on the returned ISs", so you should not delete them Note that the rule in PETSc is items obtained with a call that contains the work Create must destroy the object, if it contains Get then it should not destroy the object. Barry > On Jun 15, 2019, at 9:17 PM, tangqi via petsc-users > wrote: > > Dear all, > > Do I need to delete index_set from MatNestGetISs? I get my index_set from > MatNestGetISs(P, index_set, NULL); //P is a nest matrix of 3x3 > > When I delete index_set later > for (int i=0; i<3; i++) > { > ISDestroy(_set[i]); > } > > It gives me error > [0]PETSC ERROR: - Error Message > -- > [0]PETSC ERROR: Invalid argument > [0]PETSC ERROR: Wrong type of object: Parameter # 1 > [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for > trouble shooting. > [0]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019 > [0]PETSC ERROR: Unknown Name on a arch-linux2-c-debug named ba005.localdomain > by qtang Sat Jun 15 19:48:29 2019 > [0]PETSC ERROR: Configure options > --with-mpi-dir=/usr/projects/hpcsoft/toss3/badger/openmpi/2.1.2-gcc-7.4.0 > --download-hypre --with-cxx-dialect=C++11 > [0]PETSC ERROR: #1 ISDestroy() line 428 in > /turquoise/users/qtang/Software/petsc-3.11.1/src/vec/is/is/interface/index.c > > Thanks, > Qi
[petsc-users] IS from MatNestGetISs
Dear all, Do I need to delete index_set from MatNestGetISs? I get my index_set from MatNestGetISs(P, index_set, NULL); //P is a nest matrix of 3x3 When I delete index_set later for (int i=0; i<3; i++) { ISDestroy(_set[i]); } It gives me error [0]PETSC ERROR: - Error Message -- [0]PETSC ERROR: Invalid argument [0]PETSC ERROR: Wrong type of object: Parameter # 1 [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting. [0]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019 [0]PETSC ERROR: Unknown Name on a arch-linux2-c-debug named ba005.localdomain by qtang Sat Jun 15 19:48:29 2019 [0]PETSC ERROR: Configure options --with-mpi-dir=/usr/projects/hpcsoft/toss3/badger/openmpi/2.1.2-gcc-7.4.0 --download-hypre --with-cxx-dialect=C++11 [0]PETSC ERROR: #1 ISDestroy() line 428 in /turquoise/users/qtang/Software/petsc-3.11.1/src/vec/is/is/interface/index.c Thanks, Qi
Re: [petsc-users] Local sizes when creating PETSC MatIS
José Lorenzo via petsc-users writes: > I'm using PETSC 3.10 with 64 bits indices. > > When I run valgrind I get the following message at the end of the report, > which I don't know how to interpret: > > ==399672== Invalid read of size 8 > ==399672==at 0x5627D05: MatZeroEntries_SeqAIJ (aij.c:1077) > ==399672==by 0x5394A61: MatZeroEntries (matrix.c:5664) > ==399672==by 0x53DEF3F: MatZeroEntries_IS (matis.c:3064) > ==399672==by 0x5394A61: MatZeroEntries (matrix.c:5664) > ==399672==by 0x53B682C: matzeroentries_ (matrixf.c:1024) > ==399672==by 0x415C0B: parallmodule_mp_elementarymatrices_ > (parallModule.F90:101) > ==399672==by 0x424C40: MAIN__ (main.F90:414) > ==399672==by 0x40303D: main (in /myproject/) > ==399672== Address 0x4c30 is not stack'd, malloc'd or (recently) free'd This "address" looks an awful lot like a typical integer. Is this really the *first* Valgrind warning?