<div dir="ltr">It appears that MPICH 4.2.3 is incompatible with C++ clang. You can have PETSc download and build the latest MPICH using<div><br></div><div> --download-mpich</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Jun 9, 2025 at 6:05 AM David Jiawei LUO LIANG <<a href="mailto:12431140@mail.sustech.edu.cn">12431140@mail.sustech.edu.cn</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><font>Ok, the configure.log is attached. </font></div><div><font>I try again configuration without cxx</font></div><div><font><p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(49,179,255)"><b>➜</b></span><span style="font-variant-ligatures:no-common-ligatures"> ./configure --with-cxx=0 --with-pic --with-make-np=4 --with-mpi-compilers=1 --with-mpi-dir=/Users/lawkawai/lib/mpich-4.2.3-opt/ --with-scalar-type=real --with-precision=double --download-mumps --download-scalapack --download-metis --download-hdf5 --download-slepc --download-hypre --with-debugging=no --prefix=/Users/lawkawai/codes/HPC_class/HW5/lib/petsc-3.22.1-opt</span></p></font></div><div><font><p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">=============================================================================================</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> Configuring PETSc to compile on your system</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">=============================================================================================</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">TESTING: configureExternalPackagesDir from config.framework(config/BuildSystem/config/framework.py:1092)</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">*********************************************************************************************</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">---------------------------------------------------------------------------------------------</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> Package hypre requested requires C++ but compiler turned off.</span></p>
<p style="margin:0px;font-style:normal;font-variant-caps:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Menlo;font-size-adjust:none;font-kerning:auto;font-variant-alternates:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-east-asian:normal;font-feature-settings:normal;color:rgb(249,249,249);background-color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">*********************************************************************************************</span></p></font></div><div><u></u><div><font><br></font><font>bu I need hypre, and it needs C++ to compile</font></div><div><font>----------------------------------------</font></div><div><font>Sorry, I attached the wrong configure.log. </font></div><div><font>This is the right configure.log for the MPI & C++ errors</font></div><div><font><br></font><font><br></font><font><br></font><div style="color:rgb(144,144,144);font-family:"Arial Narrow";font-size:12px"></div></div><div style="font-size:14px;font-family:Verdana;color:rgb(0,0,0)"><div><div style="width:305px;height:35px;line-height:35px;margin:20px 0px 0px"><img src="https://exmail.qq.com/cgi-bin/viewfile?type=logo&domain=mail.sustech.edu.cn"></div><div style="margin:10px 0px 0px"><h4 style="margin:0px;font-size:14px;font-weight:bold;line-height:28px;zoom:1">David Jiawei LUO LIANG</h4><p style="margin:0px;line-height:22px;color:rgb(160,160,160)"></p><p style="margin:0px;line-height:22px;color:rgb(160,160,160)">南方科技大学/学生/研究生/2024</p><p style="margin:0px;line-height:22px;color:rgb(160,160,160)"></p><p style="margin:0px;line-height:22px;color:rgb(160,160,160)">广东省深圳市南山区学苑大道1088号</p></div></div></div><u></u></div><div> </div><div><u></u><div> </div><div> </div><div style="color:rgb(0,0,0)"><div style="font-size:12px;font-family:"Arial Narrow";padding:2px 0px">------------------ Original ------------------</div><div style="font-size:12px;background:rgb(239,239,239);padding:8px"><div id="m_5069521650832019915menu_sender"><b>From: </b> "Matthew Knepley"<<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>;</div><div><b>Date: </b> Mon, Jun 9, 2025 05:44 PM</div><div><b>To: </b> "Jose E. Roman"<<a href="mailto:jroman@dsic.upv.es" target="_blank">jroman@dsic.upv.es</a>>; </div><div><b>Cc: </b> "David Jiawei LUO LIANG"<<a href="mailto:12431140@mail.sustech.edu.cn" target="_blank">12431140@mail.sustech.edu.cn</a>>; "petsc-dev"<<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>>; </div><div><b>Subject: </b> Re: [petsc-dev] Petsc cannot be configure</div></div><div> </div><div><div id="m_5069521650832019915tmpcontent_res"></div><div dir="ltr">Yes, send the configure log.<div><br></div><div>It seems that you did not build the C++ bindings for MPICH. You can shut of C++ in PETSc using</div><div><br></div><div> --with-cxx=0</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 9, 2025 at 5:42 AM Jose E. Roman via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You should always attach the configure.log file.<br>
<br>
Thanks.<br>
Jose<br>
<br>
<br>
> El 9 jun 2025, a las 11:14, David Jiawei LUO LIANG <<a href="mailto:12431140@mail.sustech.edu.cn" target="_blank">12431140@mail.sustech.edu.cn</a>> escribió:<br>
> <br>
> ./configure --with-x=0 -with-pic --with-make-np=4 --with-mpi-compilers=1 --with-mpi-dir=/Users/lawkawai/lib/mpich-4.2.3-opt/ --with-scalar-type=real --with-precision=double --with-mumps=1 --download-mumps --with-scalapack=1 --download-scalapack --with-blacs=1 --download-blacs --download-fblaslapack --download-metis --download-hdf5 --with-debugging=no --download-slepc --prefix=/Users/lawkawai/lib/petsc-3.23.3-opt<br>
> the error:<br>
> =============================================================================================<br>
> Configuring PETSc to compile on your system<br>
> =============================================================================================<br>
> =============================================================================================<br>
> ***** WARNING *****<br>
> Found environment variable: FFLAGS=-w -fallow-argument-mismatch -O2. Ignoring it! Use<br>
> "./configure FFLAGS=$FFLAGS" if you really want to use this value<br>
> =============================================================================================<br>
> =============================================================================================<br>
> ***** WARNING *****<br>
> Using default C optimization flags "-g -O3". You might consider manually setting optimal<br>
> optimization flags for your system with COPTFLAGS="optimization flags" see<br>
> config/examples/arch-*-opt.py for examples<br>
> =============================================================================================<br>
> =============================================================================================<br>
> ***** WARNING *****<br>
> Using default Cxx optimization flags "-g -O3". You might consider manually setting<br>
> optimal optimization flags for your system with CXXOPTFLAGS="optimization flags" see<br>
> config/examples/arch-*-opt.py for examples<br>
> =============================================================================================<br>
> =============================================================================================<br>
> ***** WARNING *****<br>
> Using default FC optimization flags "-g -O". You might consider manually setting optimal<br>
> optimization flags for your system with FOPTFLAGS="optimization flags" see<br>
> config/examples/arch-*-opt.py for examples<br>
> =============================================================================================<br>
> =============================================================================================<br>
> ***** WARNING *****<br>
> You have a version of GNU make older than 4.0. It will work, but may not support all the<br>
> parallel testing options. You can install the latest GNU make with your package manager,<br>
> such as Brew or MacPorts, or use the --download-make option to get the latest GNU make<br>
> =============================================================================================<br>
> TESTING: CxxMPICheck from config.packages.MPI(config/BuildSystem/config/packages/MPI.py:673)<br>
> *********************************************************************************************<br>
> UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):<br>
> ---------------------------------------------------------------------------------------------<br>
> C++ error! MPI_Finalize() could not be located!<br>
> *********************************************************************************************<br>
> <br>
> <br>
> Iam sure my mpich is good, it has been tested. But the petsc configure still fail. <br>
> <br>
> David Jiawei LUO LIANG南方科技大学/学生/研究生/2024广东省深圳市南山区学苑大道1088号<br>
> <br>
<br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ajgkAkDpjBBVmlczaLVO6Kdl1Oe_nfZxVLQC3_tHVIz3FFvUj13xyOiYSoRLmAaJMmU_JFljVPKtMtD7BqAw$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>
</div></div><u></u></div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ajgkAkDpjBBVmlczaLVO6Kdl1Oe_nfZxVLQC3_tHVIz3FFvUj13xyOiYSoRLmAaJMmU_JFljVPKtMtD7BqAw$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>