<div dir="ltr">It's not the most satisfying solution but you can also pretty quickly generate and use suppression files to at least de-clutter the output: <a href="https://valgrind.org/docs/manual/manual-core.html#manual-core.suppress">https://valgrind.org/docs/manual/manual-core.html#manual-core.suppress</a></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 2. Juni 2020 um 18:59 Uhr schrieb Satish Balay via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">MPICH need to be built with the option --enable-g=meminit for it to be valgrind clean.<br>
<br>
--download-mpich does this [among other things that are useful during software developement]. Pre-configured MPICH is not likely to do this.<br>
<br>
You can verify with: mpichversion<br>
<br>
You can prebuild MPICH using PETSc with:<br>
<br>
./configure --prefix=$HOME/soft/mpich --download-mpich CFLAGS= FFLAGS= CXXFLAGS= COPTFLAGS= CXXOPTFLAGS= FOPTFLAGS=<br>
<br>
And make this your default pre-installed MPI. [by adding $HOME/soft/mpich to PATH]<br>
<br>
Satish<br>
<br>
<br>
On Tue, 2 Jun 2020, Jacob Faibussowitsch wrote:<br>
<br>
> Yes I am using the pre-loaded MPICH from the docker image. Further proof from configure<br>
> <br>
> #define PETSC_HAVE_MPICH_NUMVERSION 30302300<br>
> #define PETSC_HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE MPIR_CVAR_CH3<br>
> <br>
> Best regards,<br>
> <br>
> Jacob Faibussowitsch<br>
> (Jacob Fai - booss - oh - vitch)<br>
> Cell: (312) 694-3391<br>
> <br>
> > On Jun 2, 2020, at 11:35 AM, Junchao Zhang <<a href="mailto:junchao.zhang@gmail.com" target="_blank">junchao.zhang@gmail.com</a>> wrote:<br>
> > <br>
> > I guess Jacob already used MPICH, since MPIDI_CH3_EagerContigShortSend() is from MPICH. <br>
> > <br>
> > --Junchao Zhang<br>
> > <br>
> > <br>
> > On Tue, Jun 2, 2020 at 9:38 AM Satish Balay via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a> <mailto:<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>>> wrote:<br>
> > use --download-mpich for valgrind.<br>
> > <br>
> > <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" rel="noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a> <<a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" rel="noreferrer" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a>><br>
> > <br>
> > Satish<br>
> > <br>
> > On Tue, 2 Jun 2020, Karl Rupp wrote:<br>
> > <br>
> > > Hi Jacob,<br>
> > > <br>
> > > the recommendation in the past was to use MPICH as it is (was?)<br>
> > > valgrind-clean. Which MPI do you use? OpenMPI used to have these kinds of<br>
> > > issues. (My information might be outdated)<br>
> > > <br>
> > > Best regards,<br>
> > > Karli<br>
> > > <br>
> > > On 6/2/20 2:43 AM, Jacob Faibussowitsch wrote:<br>
> > > > Hello All,<br>
> > > > <br>
> > > > TL;DR: valgrind always complains about "Syscall param write(buf) points to<br>
> > > > uninitialised byte(s)” for a LOT of MPI operations in petsc code, making<br>
> > > > debugging using valgrind fairly annoying since I have to sort through a ton<br>
> > > > of unrelated stuff. I have built valgrind from source, used apt install<br>
> > > > valgrind, apt install valgrind-mpi to no avail.<br>
> > > > <br>
> > > > I am using valgrind from docker. Dockerfile is attached below as well. I<br>
> > > > have been unsuccessfully trying to resolve these local valgrind errors, but<br>
> > > > I am running out of ideas. Googling the issue has also not provided entirely<br>
> > > > applicable solutions. Here is an example of the error:<br>
> > > > <br>
> > > > $ make -f gmakefile test VALGRIND=1<br>
> > > > ...<br>
> > > > #==54610== Syscall param write(buf) points to uninitialised byte(s)<br>
> > > > #==54610==    at 0x6F63317: write (write.c:26)<br>
> > > > #==54610==    by 0x9056AC9: MPIDI_CH3I_Sock_write (in <br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x9059FCD: MPIDI_CH3_iStartMsg (in<br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x903F298: MPIDI_CH3_EagerContigShortSend (in<br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x9049479: MPID_Send (in /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8FC9B2A: MPIC_Send (in /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8F86F2E: MPIR_Bcast_intra_binomial (in <br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8EE204E: MPIR_Bcast_intra_auto (in<br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8EE21F4: MPIR_Bcast_impl (in<br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8F887FB: MPIR_Bcast_intra_smp (in<br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8EE206E: MPIR_Bcast_intra_auto (in<br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8EE21F4: MPIR_Bcast_impl (in<br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x8EE2A6F: PMPI_Bcast (in /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > #==54610==    by 0x4B377B8: PetscOptionsInsertFile (options.c:525)<br>
> > > > #==54610==    by 0x4B39291: PetscOptionsInsert (options.c:672)<br>
> > > > #==54610==    by 0x4B5B1EF: PetscInitialize (pinit.c:996)<br>
> > > > #==54610==    by 0x10A6BA: main (ex9.c:75)<br>
> > > > #==54610==  Address 0x1ffeffa944 is on thread 1's stack<br>
> > > > #==54610==  in frame #3, created by MPIDI_CH3_EagerContigShortSend (???:)<br>
> > > > #==54610==  Uninitialised value was created by a stack allocation<br>
> > > > #==54610==    at 0x903F200: MPIDI_CH3_EagerContigShortSend (in <br>
> > > > /usr/local/lib/libmpi.so.12.1.8)<br>
> > > > <br>
> > > > There are probably 20 such errors every single time, regardless of what code<br>
> > > > is being run. I have tried using apt install valgrind, apt install<br>
> > > > valgrind-mpi, and building valgrind from source:<br>
> > > > <br>
> > > > # VALGRIND<br>
> > > > WORKDIR /<br>
> > > > RUN git clone git://<a href="http://sourceware.org/git/valgrind.git" rel="noreferrer" target="_blank">sourceware.org/git/valgrind.git</a> <<a href="http://sourceware.org/git/valgrind.git" rel="noreferrer" target="_blank">http://sourceware.org/git/valgrind.git</a>><br>
> > > > WORKDIR /valgrind<br>
> > > > RUN git pull<br>
> > > > RUN ./autogen.sh<br>
> > > > RUN ./configure --with-mpicc=/usr/local/bin/mpicc<br>
> > > > RUN make -j 5<br>
> > > > RUN make install<br>
> > > > <br>
> > > > None of the those approaches lead to these errors disappearing. Perhaps I am<br>
> > > > missing some funky MPI args?<br>
> > > > <br>
> > > > Best regards,<br>
> > > > <br>
> > > > Jacob Faibussowitsch<br>
> > > > (Jacob Fai - booss - oh - vitch)<br>
> > > > Cell: (312) 694-3391<br>
> > > > <br>
> > > > <br>
> > > <br>
> > > <br>
> <br>
> <br>
</blockquote></div>