I was able to reproduce it. Let me ask MPICH developers. --Junchao Zhang
On Tue, Dec 12, 2023 at 3:06 PM Randall Mackie <rlmackie...@gmail.com> wrote: > It now seems to me that petsc+mpich is no longer valgrind clean, or I am > doing something wrong. > > A simple program: > > > Program test > > #include "petsc/finclude/petscsys.h" > use petscsys > > PetscInt :: ierr > > call PetscInitialize(PETSC_NULL_CHARACTER,ierr) > call PetscFinalize(ierr) > > end program test > > > PETSc compiled in debug mode, complex scalars, and download-mpich, when > run with valgrind generates errors like these: > > ==3997== Syscall param writev(vector[...]) points to uninitialised byte(s) > ==3997== at 0x8C31867: writev (writev.c:26) > ==3997== by 0x9C20DE4: MPL_large_writev (mpl_sock.c:31) > ==3997== by 0x9BF1050: MPIDI_CH3I_Sock_writev (sock.c:2689) > ==3997== by 0x9BF9812: MPIDI_CH3_iStartMsgv (ch3_istartmsgv.c:92) > ==3997== by 0x9BA7790: MPIDI_CH3_EagerContigSend (ch3u_eager.c:191) > ==3997== by 0x9BCA7EC: MPID_Send (mpid_send.c:132) > ==3997== by 0x9BCAC64: MPID_Send_coll (mpid_send.c:206) > ==3997== by 0x9A2AC7C: MPIC_Send (helper_fns.c:126) > ==3997== by 0x993A645: MPIR_Bcast_intra_binomial > (bcast_intra_binomial.c:146) > ==3997== by 0x99FF64A: MPIR_Bcast_allcomm_auto (mpir_coll.c:323) > ==3997== by 0x99FFC06: MPIR_Bcast_impl (mpir_coll.c:420) > ==3997== by 0x99FCF86: MPID_Bcast (mpid_coll.h:30) > ==3997== by 0x99FFE13: MPIR_Bcast (mpir_coll.c:465) > ==3997== by 0x974A513: internal_Bcast (bcast.c:93) > ==3997== by 0x974A72B: PMPI_Bcast (bcast.c:143) > ==3997== by 0x4B8D6DB: PETScParseFortranArgs_Private (zstart.c:182) > ==3997== by 0x4B8DDFA: PetscInitFortran_Private (zstart.c:200) > ==3997== by 0x4B34931: PetscInitialize_Common (pinit.c:974) > ==3997== by 0x4B8E8C7: petscinitializef_ (zstart.c:284) > ==3997== by 0x4959434: __petscsys_MOD_petscinitializenohelp > (petscsysmod.F90:374) > ==3997== Address 0x1ffeffcac0 is on thread 1's stack > ==3997== in frame #4, created by MPIDI_CH3_EagerContigSend > (ch3u_eager.c:160) > ==3997== Uninitialised value was created by a stack allocation > ==3997== at 0x9BA7601: MPIDI_CH3_EagerContigSend (ch3u_eager.c:160) > ==3997== > > ==3997== Syscall param write(buf) points to uninitialised byte(s) > ==3997== at 0x8C2B697: write (write.c:26) > ==3997== by 0x9BF0F1D: MPIDI_CH3I_Sock_write (sock.c:2614) > ==3997== by 0x9BF7AAE: MPIDI_CH3_iStartMsg (ch3_istartmsg.c:68) > ==3997== by 0x9BA7A27: MPIDI_CH3_EagerContigShortSend (ch3u_eager.c:262) > ==3997== by 0x9BCA766: MPID_Send (mpid_send.c:119) > ==3997== by 0x9BCAC64: MPID_Send_coll (mpid_send.c:206) > ==3997== by 0x9A2AC7C: MPIC_Send (helper_fns.c:126) > ==3997== by 0x993A645: MPIR_Bcast_intra_binomial > (bcast_intra_binomial.c:146) > ==3997== by 0x99FF64A: MPIR_Bcast_allcomm_auto (mpir_coll.c:323) > ==3997== by 0x99FFC06: MPIR_Bcast_impl (mpir_coll.c:420) > ==3997== by 0x99FCF86: MPID_Bcast (mpid_coll.h:30) > ==3997== by 0x99FFE13: MPIR_Bcast (mpir_coll.c:465) > ==3997== by 0x974A513: internal_Bcast (bcast.c:93) > ==3997== by 0x974A72B: PMPI_Bcast (bcast.c:143) > ==3997== by 0x4DB95A2: PetscOptionsGetenv (pdisplay.c:61) > ==3997== by 0x4E0D745: PetscStrreplace (str.c:572) > ==3997== by 0x4AC8DEA: PetscOptionsFilename (options.c:416) > ==3997== by 0x4ACF0B5: PetscOptionsInsertFile (options.c:632) > ==3997== by 0x4AD3CB5: PetscOptionsInsert (options.c:861) > ==3997== by 0x4B8E0EF: PetscInitFortran_Private (zstart.c:206) > ==3997== Address 0x1ffeff7998 is on thread 1's stack > ==3997== in frame #3, created by MPIDI_CH3_EagerContigShortSend > (ch3u_eager.c:223) > ==3997== Uninitialised value was created by a stack allocation > ==3997== at 0x9BA788F: MPIDI_CH3_EagerContigShortSend (ch3u_eager.c:223) > ==3997== > > Is this a known issue or am I doing something wrong? > > Thanks, Randy >