Ok, the configure.log is attached. 
I try again configuration without cxx

➜ ./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


=============================================================================================
 
                     
    Configuring PETSc to compile on your system
 
=============================================================================================
 
TESTING: configureExternalPackagesDir from 
config.framework(config/BuildSystem/config/framework.py:1092)
 
*********************************************************************************************
 
           UNABLE to CONFIGURE with GIVEN OPTIONS 
(see configure.log for details):
 
---------------------------------------------------------------------------------------------
 
                Package hypre requested 
requires C++ but compiler turned off.
 
*********************************************************************************************


bu I need hypre, and it needs C++ to compile







David Jiawei LUO LIANG



南方科技大学/学生/研究生/2024



广东省深圳市南山区学苑大道1088号




 
 
 
------------------ Original ------------------
From: &nbsp;"Matthew&nbsp;Knepley"<knep...@gmail.com&gt;;
Date: &nbsp;Mon, Jun 9, 2025 05:44 PM
To: &nbsp;"Jose E. Roman"<jro...@dsic.upv.es&gt;; 
Cc: &nbsp;"David Jiawei LUO LIANG"<12431...@mail.sustech.edu.cn&gt;; 
"petsc-dev"<petsc-dev@mcs.anl.gov&gt;; 
Subject: &nbsp;Re: [petsc-dev] Petsc cannot be configure

&nbsp;

Yes, send the configure log.

It seems that you did not build the C++ bindings for MPICH. You can shut of C++ 
in PETSc using


&nbsp; --with-cxx=0


&nbsp; Thanks,


&nbsp; &nbsp; &nbsp;Matt


On Mon, Jun 9, 2025 at 5:42 AM Jose E. Roman via petsc-dev 
<petsc-dev@mcs.anl.gov&gt; wrote:

You should always attach the configure.log file.
 
 Thanks.
 Jose
 
 
 &gt; El 9 jun 2025, a las 11:14, David Jiawei LUO LIANG 
<12431...@mail.sustech.edu.cn&gt; escribió:
 &gt; 
 &gt; ./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
 &gt; the error:
 &gt; 
=============================================================================================
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; Configuring PETSc to compile on your system
 &gt; 
=============================================================================================
 &gt; 
=============================================================================================
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ***** WARNING 
*****
 &gt;&nbsp; &nbsp;Found environment variable: FFLAGS=-w 
-fallow-argument-mismatch -O2. Ignoring it! Use
 &gt;&nbsp; &nbsp;"./configure FFLAGS=$FFLAGS" if you really want to use this 
value
 &gt; 
=============================================================================================
 &gt; 
=============================================================================================
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ***** WARNING 
*****
 &gt;&nbsp; &nbsp;Using default C optimization flags "-g -O3". You might 
consider manually setting optimal
 &gt;&nbsp; &nbsp;optimization flags for your system with 
COPTFLAGS="optimization flags" see
 &gt;&nbsp; &nbsp;config/examples/arch-*-opt.py for examples
 &gt; 
=============================================================================================
 &gt; 
=============================================================================================
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ***** WARNING 
*****
 &gt;&nbsp; &nbsp;Using default Cxx optimization flags "-g -O3". You might 
consider manually setting
 &gt;&nbsp; &nbsp;optimal optimization flags for your system with 
CXXOPTFLAGS="optimization flags" see
 &gt;&nbsp; &nbsp;config/examples/arch-*-opt.py for examples
 &gt; 
=============================================================================================
 &gt; 
=============================================================================================
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ***** WARNING 
*****
 &gt;&nbsp; &nbsp;Using default FC optimization flags "-g -O". You might 
consider manually setting optimal
 &gt;&nbsp; &nbsp;optimization flags for your system with 
FOPTFLAGS="optimization flags" see
 &gt;&nbsp; &nbsp;config/examples/arch-*-opt.py for examples
 &gt; 
=============================================================================================
 &gt; 
=============================================================================================
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ***** WARNING 
*****
 &gt;&nbsp; &nbsp;You have a version of GNU make older than 4.0. It will work, 
but may not support all the
 &gt;&nbsp; &nbsp;parallel testing options. You can install the latest GNU make 
with your package manager,
 &gt;&nbsp; &nbsp;such as Brew or MacPorts, or use the --download-make option 
to get the latest GNU make
 &gt; 
=============================================================================================
 &gt; TESTING: CxxMPICheck from 
config.packages.MPI(config/BuildSystem/config/packages/MPI.py:673)
 &gt; 
*********************************************************************************************
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UNABLE to CONFIGURE with GIVEN 
OPTIONS (see configure.log for details):
 &gt; 
---------------------------------------------------------------------------------------------
 &gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; C++ error! MPI_Finalize() could not be located!
 &gt; 
*********************************************************************************************
 &gt; 
 &gt; 
 &gt; Iam sure my mpich is good, it has been tested.&nbsp; But the petsc 
configure still fail. 
 &gt; 
 &gt; David Jiawei LUO LIANG南方科技大学/学生/研究生/2024广东省深圳市南山区学苑大道1088号
 &gt;&nbsp; 
 
 




-- 
What most experimenters take for granted before they begin their experiments is 
infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener


https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!eN2uw2a2x_0GJDHiLy9dx8EegaN7AsZZGQSkReeNqXKvurwjrWRSb7ja4eZ6f3JgL18yehEpvtssTK5tG9IylL6d6m4pFzOH$
 

Attachment: configure.log
Description: Binary data

Reply via email to