| 14ca34e6 | 14-Nov-2008 |
Barry Smith <bsmith@mcs.anl.gov> |
From: mstefano@milan.westerngeco.slb.com Subject: [Fwd: Re: [PETSC #18599] Valgrind problem with MatGetSubMatrix] Date: November 14, 2008 2:30:37 AM CST To: petsc-maint@mcs.anl.gov Cc: pets
From: mstefano@milan.westerngeco.slb.com Subject: [Fwd: Re: [PETSC #18599] Valgrind problem with MatGetSubMatrix] Date: November 14, 2008 2:30:37 AM CST To: petsc-maint@mcs.anl.gov Cc: petsc-maint@mcs.anl.gov
I think I've found the bug.
Look at src/mat/impls/aij/seq/aij.c, line 1699.
There, variable "i" is declared as a PetscInt.
Then, look at line 1710 or 1712.
The variable "i" is used to get the truth answer from the ISSorted function.
As long as you don't build PETSc with --with-64-bit-indices, all is OK.
But (and this is my case) if you built PETSc with 64 bit indices, the PetscTruth data type is smaller (as byte size) than PetscInt. The result is that only part of the bytes of the "i" variable are initialized by ISSorted.
I strongly suggest to add a new variable to be used exclusively as a PetscTruth flag for the ISSorted calls.
Fixed this bug all over the place
Hg-commit: 79369c761f62f38e25800abc8725233db2a5486a
show more ...
|