[petsc-users] PETSc with gcc/gfortran
Barry Smith
bsmith at petsc.dev
Tue Sep 6 11:21:50 CDT 2022
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 <tranduchan at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220906/cfaac3c0/attachment.html>
More information about the petsc-users
mailing list