是否可以确定哪个 Fortran 编译器生成了“.mod"?文件? [英] Is it possible to determine which Fortran compiler generated a ".mod" file?

查看:36
本文介绍了是否可以确定哪个 Fortran 编译器生成了“.mod"?文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我的机器上已经安装了一个包,我想知道是否需要重新生成模块包含文件 (.mod) 以使它们与我的其余编译兼容.有没有办法做到这一点?

Say I have a package already installed on my machine and I want to figure out if I need to regenerate the module include files (.mod) to make them compatible with the rest of my compilation. Is there any way to do this?

推荐答案

我在库和模块文件的某些时候遇到了类似的问题,但没有源.因为在某些情况下,获得正确的编译器比获得重新编译的源代码更容易,或者只重新编译 OP 提到的少数东西,我发现在 SO 上的某个地方获得 gfortran 模块的版本控制很有用.不幸的是,信息不容易找到,因此需要进行逆向工程,欢迎任何人编辑和添加更多内容.

I had a similar problem at some point with libraries and module files but no sources. Because it is easier to get the right compiler than to get the source code for recompiling in some cases, or to recompile only few things as mentioned by the OP, I found it useful to get the versioning of gfortran module somewhere on SO. Unfortunately, the information is not easy to find, so there is a need of reverse engineering and anyone is welcome to edit and add more.

我做了一点谷歌搜索,这是起点:对于 gfortran,模块版本控制出现在gfortran 4.4"中.根据此页面.重要的是要说版本号是针对模块而不是针对编译器的.我猜当模块文件的格式发生变化以适应一些新功能时,它会发生变化.

I did a little bit of googling and here is the starting point: For gfortran the module versioning appeared at "gfortran 4.4" according to this page. It is important to say that the version number is for the module not for the compiler. I guess it changes when the format of the module file changes to account for some new features.

通过结合来自此页面的信息,本页, 这个和matthieu-verstraete的回答,我想出了这个对应列表.p>

By combining information from this page, this pages, this one and the answer from matthieu-verstraete, I came up with this list of correspondence.

GCC version    module file version
-----------------------------------
up to 4.3.2    unversioned
4.4            0
4.5.1          4
4.6.3          6
4.7.0pre       8
4.7.1          9
4.8.[1-3]      10
4.9.2          12
5.1.0          14
8.1.0          15 
9              15
10             15
11             15

从版本 4.8 开始,gfortran 团队会在模块版本更改时在发行说明中包含一条小消息.消息看起来像

From version 4.8 on, the gfortran team includes a small message in the release notes when the module version changes. The message looks like

模块文件:模块文件(.mod)的版本已递增

Module files: The version of the module files (.mod) has been incremented

因为它可以从 此链接中阅读.他们没有给出版本号,而且似乎当他们说递增时,它增加了 2.gfortran 版本 8 中模块版本的更新加 1,[gfortran wiki] 5 在撰写本文时并未对此发表任何评论.感谢 matthieu-verstraete 挖掘它.

as it can be read from this link. They do not give the version number, and it seems that when they say incremented, it is incremented by 2. The update of the module version in gfortran version 8 incremented by 1, and the [gfortran wiki] 5 does not say anything about it as of this writting. Thank you to matthieu-verstraete for digging it up.

这篇关于是否可以确定哪个 Fortran 编译器生成了“.mod"?文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆