【问题标题】:Wrong module version on compile编译时模块版本错误
【发布时间】:2012-11-21 17:16:30
【问题描述】:

我想用 mpif90 编译我的 Fortran 程序 (.f90),但得到以下结果:

use a_box
   1
Fatal Error: Wrong module version '6' (expected '9') for 
                       file 'a_box.mod' opened at (1)

你能帮我解决这个问题吗?谢谢!

mpif90版本如下:

GNU Fortran (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2

我的系统是 Ubuntu 12.10。

【问题讨论】:

    标签: fortran mpi


    【解决方案1】:

    在编译任何使用它的源代码文件之前,您需要编译包含模块 a_box 的源代码文件。当您编译使用此模块的源代码文件时,您似乎在选择编译器在使用该模块编译源代码时生成的旧版本的 .mod 文件。它是由旧版本的 gfortran 或不同的 fortran 编译器制作的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-28
      • 2022-11-01
      • 2016-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-19
      相关资源
      最近更新 更多