This happens when the module files were created with one Fortran compiler, 
say ifort`, but it is attempting to read them with a different Fortran 
compiler, say gfortran. (You can never mix to different Fortran compilers in 
the same executable/library/module system.

  You need to use a different PETSC_ARCH and configure PETSc with 
--with-fc=gfortran to use the gfortran compiler

  Barry


> On Sep 6, 2022, at 11:59 AM, Han Tran <tranduc...@gmail.com> 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

Reply via email to