Gfortran cannot read his own creation

I am trying to compile code with gfortran. One of the first things that happens in compilation is creation constants.mod. Soon after, he gfortrantells me:

Fatal Error: Cannot read module file β€˜constants.mod opened at (1), because it was created by a different version of GNU Fortran

Now here's what: this module file is created by the one gfortranthat is trying to read it. gfortrancreates the thing itself, and then after 1 second thinks that the file was created by some other version! Any idea what is going on here?

You might want to see the compilation command:

mpif90 -c -O3 -ISDF/FORTRAN/include -I/usr/include -Iobj -Jobj -o obj/shared_data.o   src/core/shared_data.F90

shared_data.F90contains the constantsmodule at the top of the file.

EDIT: Here's a compilation command followed by a full error message:

$> mpif90 -c -O3 -ISDF/FORTRAN/include -I/usr/include -Iobj -Jobj -o obj/shared_data.o  src/core/shared_data.F90
src/core/shared_data.F90:67:6:

   USE constants
      1
Fatal Error: Cannot read module file β€˜constants.mod opened at (1), because it was created by a different version of GNU Fortran
compilation terminated.

: , , . , , src/core. cd src/core :

mpif90 -c -O3 -I../../SDF/FORTRAN/include -I../../obj -J../../obj -o ../../obj/shared_data.o shared_data.F90

! obj cd :

mpif90 -c -O3 -ISDF/FORTRAN/include -Iobj -Jobj -o shared_data.o src/core/shared_data.F90

, ! ??? .

+5

Source: https://habr.com/ru/post/1614751/


All Articles