MatTranspose_MPIDense illegal read?

Yujie recrusader at gmail.com
Tue Jan 6 18:53:02 CST 2009


According to Barry's advice, I use Valgrind to check my codes. I find there
is an problem in MatTranspose_MPIDense(). It breaks my codes. The following
is the information. could you give me some advice? thanks a lot
==5821==
==5821== Invalid read of size 4
==5821== at 0x5143617: MatGetSubMatrix_MPIDense(_p_Mat*, _p_IS*, _p_IS*,
int, MatReuse, _p_Mat**) (mpidense.c:251)
==5821== by 0x50C2D71: MatGetSubMatrix(_p_Mat*, _p_IS*, _p_IS*, int,
MatReuse, _p_Mat**) (matrix.c:5744)
==5821== by 0x805BCE8: mySystem::MakeA(int) (mySystem.C:518)
==5821== by 0x80615A6: mySystem::Source(mySystem*, int) (mySystem.C:1927)
==5821== by 0x806B5B1: main (myproject.C:293)
==5821== Address 0x8f06c64 is 12 bytes after a block of size 472,272 alloc'd
==5821== at 0x401AC01: malloc (vg_replace_malloc.c:207)
==5821== by 0x558312D: PetscMallocAlign(unsigned int, int, char const*, char
const*, char const*, void**) (mal.c:40)
==5821== by 0x558DA83: PetscTrMallocDefault(unsigned int, int, char const*,
char const*, char const*, void**) (mtr.c:194)
==5821== by 0x50386A7: MatSeqDenseSetPreallocation_SeqDense (dense.c:1875)
==5821== by 0x5038469: MatSeqDenseSetPreallocation(_p_Mat*, double*)
(dense.c:1858)
==5821== by 0x514BC4B: MatMPIDenseSetPreallocation_MPIDense
(mpidense.c:1175)
==5821== by 0x514C889: MatMPIDenseSetPreallocation(_p_Mat*, double*)
(mpidense.c:1312)
==5821== by 0x514AD8B: MatTranspose_MPIDense(_p_Mat*, _p_Mat**)
(mpidense.c:979)
==5821== by 0x50B2D85: MatTranspose(_p_Mat*, _p_Mat**) (matrix.c:3603)
==5821== by 0x805BCAA: mySystem::MakeA(int) (mySystem.C:514)
==5821== by 0x80615A6: mySystem::Source(mySystem*, int) (mySystem.C:1927)
==5821== by 0x806B5B1: main (myproject.C:293)

Regards,
Yujie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090106/b2e0af40/attachment.htm>


More information about the petsc-users mailing list