<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:10.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt">Hi Eric, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Your questions are related to MPICH, not MVAPICH. Please post your questions to the MPICH mailing list and they will be able to provide you more accurate answers.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Thanks, <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">DK<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Mvapich-discuss <mvapich-discuss-bounces+panda.2=osu.edu@lists.osu.edu>
<b>On Behalf Of </b>Eric Chamberland via Mvapich-discuss<br>
<b>Sent:</b> Wednesday, October 1, 2025 11:07 PM<br>
<b>To:</b> mvapich-discuss@lists.osu.edu<br>
<b>Cc:</b> René Chenard <rene.chenard.1@ulaval.ca>; dave.martin@giref.ulaval.ca; Satish Balay <balay@mcs.anl.gov><br>
<b>Subject:</b> [Mvapich-discuss] Recommended configure options for MPICH 4.3.x with Valgrind or address-sanitizer<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="mso-line-height-alt:.75pt"><span style="font-size:1.0pt;color:white">Hi, I have been building MPICH with the following configure options for a long time, mainly to keep my code “Valgrind-clean”: === ./configure \ --enable-g=dbg,meminit
 \ --with-device=ch3:</span><span style="font-size:1.0pt;font-family:"Arial",sans-serif;color:white"> </span><span style="font-size:1.0pt;color:white">sock \ --enable-romio === This setup worked reasonably<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-line-height-alt:.75pt"><span style="font-size:1.0pt;color:white">ZjQcmQRYFpfptBannerStart<o:p></o:p></span></p>
</div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;border-radius:4px">
<tbody>
<tr>
<td style="padding:12.0pt 0in 12.0pt 0in">
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="100%" style="width:100.0%;background:#CFD3D7;border:none;border-top:solid #8C8E91 3.0pt">
<tbody>
<tr>
<td valign="top" style="border:none;padding:0in 7.5pt 3.75pt 4.5pt">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left">
<tbody>
<tr>
<td style="padding:3.0pt 6.0pt 3.0pt 6.0pt">
<p class="MsoNormal"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">This Message Is From an External Sender
<o:p></o:p></span></b></p>
</td>
</tr>
<tr>
<td style="padding:3.0pt 6.0pt 3.0pt 6.0pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black">This message came from outside your organization.
<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr>
<td style="padding:3.0pt 0in 3.0pt 0in">
<p class="MsoNormal">  <a href="https://us-phishalarm-ewt.proofpoint.com/EWT/v1/KGKeukY!s8QTfeYhyYcKwPqR_8-u9FkU_9TgJAv0rY1_sNeRcvfS9iAR2Lw-qTDiKb7EpZ66B549bOyxtpP-gBwfooEeHZKmGdS9JlEFmsNFPt4r8ffx0m6PA8s$" target="_blank"><strong><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black;border:solid #666666 1.0pt;padding:6.0pt;font-weight:normal;text-decoration:none">  Report Suspicious  </span></strong></a>  ‌
<span style="font-size:12.0pt"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal" style="mso-line-height-alt:.75pt"><span style="font-size:1.0pt;color:white">ZjQcmQRYFpfptBannerEnd<o:p></o:p></span></p>
</div>
<p>Hi,<br>
<br>
I have been building MPICH with the following configure options for a long time, mainly to keep my code “Valgrind-clean”:<o:p></o:p></p>
<p>===<br>
./configure \<br>
  --enable-g=dbg,meminit \<br>
  --with-device=ch3:sock \<br>
  --enable-romio<o:p></o:p></p>
<p>===<o:p></o:p></p>
<p>This setup worked reasonably well in the past, but recently I’ve been seeing occasional errors with address-sanitizer or valgrind (with 4.3.0 on a single node) such as:<o:p></o:p></p>
<p>===<o:p></o:p></p>
<pre style="font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;overflow-wrap: break-word;white-space:pre-wrap;word-spacing:0px"><span style="color:black">Fatal error in internal_Allreduce_c: Unknown error class, error stack:<o:p></o:p></span></pre>
<pre><span style="color:black">internal_Allreduce_c(347)...................: MPI_Allreduce_c(sendbuf=0x7ffdeb0b8e90, recvbuf=0x7ffdeb0b8e98, count=1, dtype=0x4c00083a, MPI_SUM, comm=0x84000003) failed<o:p></o:p></span></pre>
<pre><span style="color:black">MPIR_Allreduce_impl(4826)...................: <o:p></o:p></span></pre>
<pre><span style="color:black">MPIR_Allreduce_allcomm_auto(4732)...........: <o:p></o:p></span></pre>
<pre><span style="color:black">MPIR_Allreduce_intra_recursive_doubling(115): <o:p></o:p></span></pre>
<pre><span style="color:black">MPIC_Sendrecv(266)..........................: <o:p></o:p></span></pre>
<pre><span style="color:black">MPIC_Wait(90)...............................: <o:p></o:p></span></pre>
<pre><span style="color:black">MPIR_Wait(751)..............................: <o:p></o:p></span></pre>
<pre><span style="color:black">MPIR_Wait_state(708)........................: <o:p></o:p></span></pre>
<pre><span style="color:black">MPIDI_CH3i_Progress_wait(187)...............: an error occurred while handling an event returned by MPIDI_CH3I_Sock_Wait()<o:p></o:p></span></pre>
<pre><span style="color:black">MPIDI_CH3I_Progress_handle_sock_event(385)..: <o:p></o:p></span></pre>
<pre><span style="color:black">MPIDI_CH3I_Socki_handle_read(3647)..........: connection failure (set=0,sock=1,errno=104:Connection reset by peer)<o:p></o:p></span></pre>
<p>===<o:p></o:p></p>
<p>Is CH3 considered legacy?<o:p></o:p></p>
<p>I would like to also ask:<br>
<br>
 1. What are the recommended configure options in 2025 for building MPICH in a way that works well with Valgrind?<br>
<br>
 2. Is it preferable now to move to CH4 (e.g. ch4:ofi or ch4:shm) when debugging with Valgrind?<br>
<br>
 3. Are there any other options (besides --enable-g=dbg,meminit) that you would suggest for catching memory errors while keeping Valgrind reports as clean as possible?<o:p></o:p></p>
<p> 4. Is <a href="https://urldefense.com/v3/__https:/github.com/pmodels/mpich/blob/main/doc/wiki/design/Support_for_Debugging_Memory_Allocation.md__;!!KGKeukY!0uZHEHtZEaga1beOpdYFXpq7WNGp5jNAW8wQaJk8wgYLGwAEf-QD8rrTOQF7SYFYfdxC1lVvpP3XqxhRMeBGqXCTDdN2eE6IFMZP04X4lX-e$">
https://github.com/pmodels/mpich/blob/main/doc/wiki/design/Support_for_Debugging_Memory_Allocation.md</a> up-to-date?<o:p></o:p></p>
<p>Any guidance on the “best practice” configuration for this use case would be greatly appreciated.<o:p></o:p></p>
<p>PETSc guys have some options about debug (<a href="https://urldefense.com/v3/__https:/gitlab.com/petsc/petsc/-/blob/main/config/BuildSystem/config/packages/MPICH.py*L94__;Iw!!KGKeukY!0uZHEHtZEaga1beOpdYFXpq7WNGp5jNAW8wQaJk8wgYLGwAEf-QD8rrTOQF7SYFYfdxC1lVvpP3XqxhRMeBGqXCTDdN2eE6IFMZP07bPQizu$">https://gitlab.com/petsc/petsc/-/blob/main/config/BuildSystem/config/packages/MPICH.py#L94</a>)
 but still uses CH3 by default.<o:p></o:p></p>
<p>Thanks a lot,<o:p></o:p></p>
<p>Eric<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Eric Chamberland, ing., M. Ing<o:p></o:p></pre>
<pre>Professionnel de recherche<o:p></o:p></pre>
<pre>GIREF/Université Laval<o:p></o:p></pre>
<pre>(418) 656-2131 poste 41 22 42<o:p></o:p></pre>
</div>
</body>
</html>