我想用mpif90编译我的Fortran程序(.f90),但我得到以下内容:
use a_box
1
Fatal Error: Wrong module version '6' (expected '9') for
file 'a_box.mod' opened at (1)
Run Code Online (Sandbox Code Playgroud)
你能帮我解决这个问题吗?谢谢!
mpif90版本如下:
GNU Fortran (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Run Code Online (Sandbox Code Playgroud)
我的系统是Ubuntu 12.10.
在编译使用它的任何源代码文件之前,您需要编译包含模块a_box的源代码文件.在编译使用此模块的源代码文件时,您似乎在使用模块编译源代码时,会选择编译器生成的.mod文件的旧版本.要么它是由旧版本的gfortran制作,要么是由不同的fortran编译器制作的.