MatTranspose_MPIDense illegal read?

Barry Smith bsmith at mcs.anl.gov
Tue Jan 6 19:52:18 CST 2009


    Looks like this is some old version of PETSc. The line numbers  
don't match PETSc 3.0.0
Please switch to 3.0.0 and see if the problem occurs and send the  
valgrind output again

Please switch to petsc-maint at mcs.anl.gov for this.

    Barry

I don't see a problem with the MatTranspose_  but there is a bad read  
in the MatGetSubMatrix

On Jan 6, 2009, at 6:53 PM, Yujie wrote:

> 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
>




More information about the petsc-users mailing list