Thanks for your help! Using 'mpiicc, mpiicpc, mpiifort' works well! And yes, 
intel compiler is used intentionally for my installation.


Jiahong CHEN




------------------ Original ------------------
From:                                                                           
                                             "petsc-users"                      
                                                              
<[email protected]&gt;;
Date:&nbsp;Thu, Jun 22, 2023 12:15 PM
To:&nbsp;"Gael"<[email protected]&gt;;
Cc:&nbsp;"petsc-users"<[email protected]&gt;;
Subject:&nbsp;Re: [petsc-users] petsc configure problem



&gt;&nbsp; --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpi PETSC_ARCH=intel_2020

&gt; Executing: mpicc --version
&gt; stdout:
&gt; gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

Did you intend to use Intel compilers?

&gt;&gt;&gt;&gt;&gt;
/tmp/petsc-sMhvLh/config.setCompilers/conftest.c: In function ??main??:
/tmp/petsc-sMhvLh/config.setCompilers/conftest.c:8:9: error: ??FLT_ROUNDS?? 
undeclared (first use in this function)
&nbsp;&nbsp;&nbsp;&nbsp; y = FLT_ROUNDS;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^~~~~~~~~~
<<<<<

Perhaps the intel compiler setup in env is causing gcc to misbehave?

i.e if you are attempting an install with intel compilers - use 'mpiicc, 
mpiicpc, mpiifort'

if you are attempting an install with gcc - avoid the intel compiler setup in 
env

Also currently supported release in petsc-3.19 - we suggest using it instead of 
3.14

Satish



On Thu, 22 Jun 2023, Gael wrote:

&gt; To whom it may concern,
&gt; 
&gt; 
&gt; I'm trying to install PETSc on my HPC, and in the configure step something 
keeps going wrong with the following message:
&gt; 
&gt; 
&gt; PETSc requires c99 compiler! Configure could not determine compatible 
compiler flag. Perhaps you can specify via CFLAGS
&gt; 
&gt; 
&gt; We have googled it and try to add CFLAGS spefified in this 
post&amp;nbsp;Re: [petsc-users] PETSc on GCC (mail-archive.com). But none could 
work and the error message changed as:
&gt; 
&gt; 
&gt; C compiler you provided with -with-cc=mpicc cannot be found or does not 
work. Cannot compile C with mpicc.
&gt; 
&gt; 
&gt; 
&gt; My log file is attached. Could you please give some suggestions on this 
problem?
&gt; 
&gt; 
&gt; Thank you,
&gt; Jiahong CHEN

Reply via email to