MatTranspose_MPIDense illegal read?
Yujie
recrusader at gmail.com
Tue Jan 6 20:06:58 CST 2009
Dear Barry:
I will try to do it according to your advice. I tried to incearse and reduce
the processor number, some cases are broken, others aren't. This invalid
read problem always exists. If the erros exist, the following is the broken
information,
Invalid read can lead to the following errors? thanks.
"[6]PETSC ERROR:
------------------------------------------------------------------------
p2_15964: p4_error: net_recv read: probable EOF on socket: 1
rm_l_2_15965: (354.724282) net_send: could not write to fd=5, errno = 32"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
==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)
[6]PETSC ERROR:
------------------------------------------------------------------------
p2_15964: p4_error: net_recv read: probable EOF on socket: 1
rm_l_2_15965: (354.724282) net_send: could not write to fd=5, errno = 32
==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)
[6]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
probably memory access out of range
[6]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[6]PETSC ERROR: or see
http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[6]PETSCERROR:
or try
http://valgrind.org on linux or man libgmalloc on Apple to find memory
corruption errors
[6]PETSC ERROR: likely location of problem given in stack below
[6]PETSC ERROR: --------------------- Stack Frames
------------------------------------
[6]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,
[6]PETSC ERROR: INSTEAD the line number of the start of the function
[6]PETSC ERROR: is given.
[6]PETSC ERROR: [6] MatGetSubMatrix_MPIDense line 218
src/mat/impls/dense/mpi/mpidense.c
[6]PETSC ERROR: [6] MatGetSubMatrix line 5721 src/mat/interface/matrix.c
[6]PETSC ERROR: --------------------- Error Message
------------------------------------
[6]PETSC ERROR: Signal received!
[6]PETSC ERROR:
------------------------------------------------------------------------
[6]PETSC ERROR: Petsc Release Version 2.3.3, Patch 8, Fri Nov 16 17:03:40
CST 2007 HG revision: 414581156e67e55c761739b0deb119f7590d0f4b
[6]PETSC ERROR: See docs/changes/index.html for recent updates.
[6]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
[6]PETSC ERROR: See docs/index.html for manual pages.
[6]PETSC ERROR:
------------------------------------------------------------------------
[6]PETSC ERROR: /data4/ylu/codes/new/examples/myproj/myproj-dbg on a linux
named wolf29.cluster1.isl.org by yujie Tue Jan 6 16:20:55 2009
[6]PETSC ERROR: Libraries linked from
/home/yujie/codes/petsc-2.3.3-p8/lib/linux
[6]PETSC ERROR: Configure run at Fri Apr 11 17:24:03 2008
[6]PETSC ERROR: Configure options --with-mpi-dir=/home/yujie/mpich127/
--with-clanguage=C++ --with-debugging=1 --with-shared=1 --with-hypre=1
--with-spooles=1 --download-spooles=1 --with-superlu_dist=1
--download-superlu_dist=1
[6]PETSC ERROR:
------------------------------------------------------------------------
[6]PETSC ERROR: User provided function() line 0 in unknown directory unknown
file
p6_11637: p4_error: : 59
rm_l_6_11638: (333.669678) net_send: could not write to fd=5, errno = 32
On Tue, Jan 6, 2009 at 5:52 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> 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
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090106/24c50b87/attachment.htm>
More information about the petsc-users
mailing list