[petsc-users] np>1 valgrind error comes out
(Rebecca) Xuefei YUAN
xy2102 at columbia.edu
Wed Apr 21 06:14:31 CDT 2010
Dear all,
I was wrong at the previous message about the valgrind result. If
np=1, valgrind says ok, but when np=2 it is not.
It seems to me that the error comes from the initial set ups with wrong size :
Address 0x46b6d78 is 368 bytes inside a [MPICH2 handle:
objptr=0x46b6c08 handle=0xec00000c INDIRECT/REQUEST] of size 372
client-defined
Could you please take a look at this error message:
rebecca at YuanWork:~/linux/code/twoway/twoway_new/valgrind$ mpiexec -np
2 valgrind --leak-check=full ./twqt2ff.exe -options_file
option_all_twqt2ff
==546== Memcheck, a memory error detector
==546== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==546== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==546== Command: ./twqt2ff.exe -options_file option_all_twqt2ff
==546==
==547== Memcheck, a memory error detector
==547== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==547== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==547== Command: ./twqt2ff.exe -options_file option_all_twqt2ff
==547==
**************************************************
number of processors = 2
viscosity = 1.0000000000000000e-03
resistivity = 1.0000000000000000e-03
skin depth = 1.0000000000000000e+00
hyper resistivity = 1.8204444444444448e-04
hyper viscosity = 7.2817777777777792e-01
problem size: 31 by 31
dx = 4.1290322580645161e-01
dy = 2.1333333333333335e-01
dt = 5.0000000000000003e-02
adaptive time step size (1:yes;0:no) = 0
**************************************************
0 SNES Function norm 4.632833297189e-02
==546== Invalid read of size 4
==546== at 0x8872994: MPIDI_CH3I_Progress_handle_sock_event
(ch3_progress.c:738)
==546== by 0x8872EE7: MPIDI_CH3I_Progress (ch3_progress.c:212)
==546== by 0x8851E94: PMPI_Waitany (waitany.c:203)
==546== by 0x841A61C: MatGetSubMatrices_MPIAIJ_Local (mpiov.c:1195)
==546== by 0x8414E3A: MatGetSubMatrices_MPIAIJ (mpiov.c:781)
==546== by 0x832B67C: MatGetSubMatrices (matrix.c:5823)
==546== by 0x816580B: PCSetUp_ASM (asm.c:299)
==546== by 0x8131CD5: PCSetUp (precon.c:795)
==546== by 0x81D6B2D: KSPSetUp (itfunc.c:237)
==546== by 0x81D7C1F: KSPSolve (itfunc.c:353)
==546== by 0x80FEF93: SNES_KSPSolve (snes.c:2931)
==546== by 0x811A7C0: SNESSolve_LS (ls.c:191)
==546== Address 0x46b6d78 is 368 bytes inside a [MPICH2 handle:
objptr=0x46b6c08 handle=0xec00000c INDIRECT/REQUEST] of size 372
client-defined
==546== at 0x8866BCA: MPIU_Handle_obj_alloc_unsafe (handlemem.c:219)
==546== by 0x88B3810: MPIDI_CH3U_Recvq_FDU_or_AEP (ch3u_recvq.c:342)
==546== by 0x887CF77: MPID_Irecv (mpid_irecv.c:46)
==546== by 0x8840290: MPIC_Sendrecv (helper_fns.c:153)
==546== by 0x8835810: MPIR_Barrier (barrier.c:75)
==546== by 0x8835B07: MPIR_Barrier_or_coll_fn (barrier.c:244)
==546== by 0x8835BC8: PMPI_Barrier (barrier.c:421)
==546== by 0x875B472: PetscCommDuplicate (tagm.c:190)
==546== by 0x875F272: PetscHeaderCreate_Private (inherit.c:44)
==546== by 0x81EA967: KSPCreate (itcreate.c:477)
==546== by 0x81530F4: PCMGCreate_Private (mg.c:95)
==546== by 0x8158F42: PCMGSetLevels (mg.c:623)
==546==
==547== Invalid read of size 4
==547== at 0x8872994: MPIDI_CH3I_Progress_handle_sock_event
(ch3_progress.c:738)
==547== by 0x8872EE7: MPIDI_CH3I_Progress (ch3_progress.c:212)
==547== by 0x8851E94: PMPI_Waitany (waitany.c:203)
==547== by 0x841B4B7: MatGetSubMatrices_MPIAIJ_Local (mpiov.c:1306)
==547== by 0x8414E3A: MatGetSubMatrices_MPIAIJ (mpiov.c:781)
==547== by 0x832B67C: MatGetSubMatrices (matrix.c:5823)
==547== by 0x816580B: PCSetUp_ASM (asm.c:299)
==547== by 0x8131CD5: PCSetUp (precon.c:795)
==547== by 0x81D6B2D: KSPSetUp (itfunc.c:237)
==547== by 0x81D7C1F: KSPSolve (itfunc.c:353)
==547== by 0x80FEF93: SNES_KSPSolve (snes.c:2931)
==547== by 0x811A7C0: SNESSolve_LS (ls.c:191)
==547== Address 0x45ba490 is 368 bytes inside a [MPICH2 handle:
objptr=0x45ba320 handle=0xec00000c INDIRECT/REQUEST] of size 372
client-defined
==547== at 0x8866BCA: MPIU_Handle_obj_alloc_unsafe (handlemem.c:219)
==547== by 0x88B3810: MPIDI_CH3U_Recvq_FDU_or_AEP (ch3u_recvq.c:342)
==547== by 0x887CF77: MPID_Irecv (mpid_irecv.c:46)
==547== by 0x8840290: MPIC_Sendrecv (helper_fns.c:153)
==547== by 0x8835810: MPIR_Barrier (barrier.c:75)
==547== by 0x8835B07: MPIR_Barrier_or_coll_fn (barrier.c:244)
==547== by 0x8835BC8: PMPI_Barrier (barrier.c:421)
==547== by 0x875B472: PetscCommDuplicate (tagm.c:190)
==547== by 0x875F272: PetscHeaderCreate_Private (inherit.c:44)
==547== by 0x81EA967: KSPCreate (itcreate.c:477)
==547== by 0x81530F4: PCMGCreate_Private (mg.c:95)
==547== by 0x8158F42: PCMGSetLevels (mg.c:623)
==547==
Linear solve converged due to CONVERGED_RTOL iterations 2
1 SNES Function norm 7.444976906574e-04
Linear solve converged due to CONVERGED_RTOL iterations 2
2 SNES Function norm 9.698205312365e-06
Linear solve converged due to CONVERGED_RTOL iterations 3
3 SNES Function norm 6.808828603405e-09
Linear solve converged due to CONVERGED_RTOL iterations 6
4 SNES Function norm 1.757078396735e-13
Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE
**************************************************
time step = 1
current time step size= 5.0000000000000003e-02
time = 5.0000000000000003e-02
number of nonlinear iterations = 4
number of linear iterations = 13
function norm = 1.7570783967354192e-13
**************************************************
total number of time steps = 1
total number of nonlinear iterations = 4
total number of linear iterations = 13
WARNING! There are options you set that were not used!
WARNING! could be spelling mistake, etc!
Option left: name:-mxgrid value: 32
Option left: name:-mygrid value: 32
Option left: name:-time_to_generate_grid value: 0.0
==546==
==547==
==547== HEAP SUMMARY:
==547== in use at exit: 156 bytes in 11 blocks
==547== total heap usage: 4,947 allocs, 3,551 frees, 29,251,365
bytes allocated
==547==
==546== HEAP SUMMARY:
==546== in use at exit: 156 bytes in 11 blocks
==546== total heap usage: 4,922 allocs, 3,851 frees, 31,388,554
bytes allocated
==546==
==546== 156 (36 direct, 120 indirect) bytes in 1 blocks are definitely
lost in loss record 11 of 11
==546== at 0x4022BF3: malloc (vg_replace_malloc.c:195)
==546== by 0x42693E2: ??? (in /lib/tls/i686/cmov/libc-2.7.so)
==546== by 0x4269C2D: __nss_database_lookup (in
/lib/tls/i686/cmov/libc-2.7.so)
==546== by 0x4701FDB: ???
==546== by 0x470313C: ???
==546== by 0x4215D15: getpwuid_r (in /lib/tls/i686/cmov/libc-2.7.so)
==546== by 0x421565D: getpwuid (in /lib/tls/i686/cmov/libc-2.7.so)
==546== by 0x8789545: PetscGetUserName (fuser.c:68)
==546== by 0x8744872: PetscErrorPrintfInitialize (errtrace.c:68)
==546== by 0x8779CEB: PetscInitialize (pinit.c:568)
==546== by 0x804B4E7: main (twqt2ff.c:88)
==546==
==546== LEAK SUMMARY:
==546== definitely lost: 36 bytes in 1 blocks
==546== indirectly lost: 120 bytes in 10 blocks
==546== possibly lost: 0 bytes in 0 blocks
==546== still reachable: 0 bytes in 0 blocks
==546== suppressed: 0 bytes in 0 blocks
==546==
==546== For counts of detected and suppressed errors, rerun with: -v
==546== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 40 from 10)
==547== 156 (36 direct, 120 indirect) bytes in 1 blocks are definitely
lost in loss record 11 of 11
==547== at 0x4022BF3: malloc (vg_replace_malloc.c:195)
==547== by 0x42693E2: ??? (in /lib/tls/i686/cmov/libc-2.7.so)
==547== by 0x4269C2D: __nss_database_lookup (in
/lib/tls/i686/cmov/libc-2.7.so)
==547== by 0x4701FDB: ???
==547== by 0x470313C: ???
==547== by 0x4215D15: getpwuid_r (in /lib/tls/i686/cmov/libc-2.7.so)
==547== by 0x421565D: getpwuid (in /lib/tls/i686/cmov/libc-2.7.so)
==547== by 0x8789545: PetscGetUserName (fuser.c:68)
==547== by 0x8744872: PetscErrorPrintfInitialize (errtrace.c:68)
==547== by 0x8779CEB: PetscInitialize (pinit.c:568)
==547== by 0x804B4E7: main (twqt2ff.c:88)
==547==
==547== LEAK SUMMARY:
==547== definitely lost: 36 bytes in 1 blocks
==547== indirebecca at YuanWork:~/linux/code/twoway/twoway_new/valgrind$
Thanks very much!
Rebecca
--
(Rebecca) Xuefei YUAN
Department of Applied Physics and Applied Mathematics
Columbia University
Tel:917-399-8032
www.columbia.edu/~xy2102
More information about the petsc-users
mailing list