[petsc-users] PETSc with gcc/gfortran
Satish Balay
balay at mcs.anl.gov
Tue Sep 6 11:23:01 CDT 2022
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