Reputation: 429
I wanted to compile my Fortran programs (.f90) with mpif90, but I get the following:
use a_box
1
Fatal Error: Wrong module version '6' (expected '9') for
file 'a_box.mod' opened at (1)
Can you help me to solve this problem? Thanks!
The mpif90 version is as follows:
GNU Fortran (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
My system is Ubuntu 12.10.
Upvotes: 4
Views: 3797
Reputation: 29391
You need to compile the source code file that contains the module a_box before you compile any source code file that uses it. When you are compiling your source code file that uses this module, you seem to be picking up an older version of the .mod file produced by the compiler when it compiles the source code with the module. Either it was made by an older version of gfortran or by a different fortran compiler.
Upvotes: 6