[petsc-users] PETSc with gcc/gfortran

Han Tran tranduchan at gmail.com
Tue Sep 6 11:45:25 CDT 2022


Thank you, Satish and Barry!
I will try to re-build PETSc with gcc compiler.

Best regards,
-Han

> On Sep 6, 2022, at 10:23 AM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> Did you rebuild PETSc with gnu compilers?
> 
> You can have both builds of PETSc (one with Intel compilers, the other with GNU compilers) by building each with a different PETSC_ARCH value
> 
> ./configure PETSC_ARCH=arch-intel --with-cc=icc ...
> ..configure PETSC_ARCH=arch-gnu --with-cc=gcc ...
> 
> 
> And then switch your application to use appropriate build of PETSc - by switching PETSC_ARCH value [if using PETSc formatted makefiles]
> 
> Satish
> 
> On Tue, 6 Sep 2022, Han Tran wrote:
> 
>> I used to compile my Fortran 90 code using intel compilers (i.e. intel and impi). However, when I tried to compile using gcc, it gave the following error.
>> 
>>  use petscksp
>>      1
>> Fatal Error: File 'petscksp.mod' opened at (1) is not a GNU Fortran module file
>> 
>> It would be appreciated if you could give any hints on this issue. Thank you so much!
>> 
>> -Han
> 



More information about the petsc-users mailing list