Fortran 中的 OpenMP:数据类型发生变化?
我有一个程序,我曾经使用和不使用 OpenMP 进行过编译。即使当我使用一个要转换的输入文件运行它并将 OMP_NUM_THREADS 设置为 1 时,生成的 ASCII 文件也与我运行该程序时得到的文件不同,该程序是在没有 OpenMP 的情况下编译的!我真的不明白...... Linux 中的“diff”将每一行打印为不同的,但是当我自己查看文件并比较单个浮点值时,我自己没有看到任何差异。 该文件如下所示:
0.949566E+00 0.945844E+00 0.942125E+00 0.938410E+00 0.934698E+00 0.930989E+00 0.927285E+00 0.923584E+00 0.919888E+00 0.916196E+00 0.912508E+00 0.908826E+00 0.905149E+00 0.901476E+00 0.897810E+00 0.894149E+00 0.890493E+00 0.886845E+00 0.883202E+00 0.879565E+00
等等...(当前以单精度运行!)... OpenMP 中是否有任何内部数据更改或对此有何建议?
I have a program which I once compile with and without OpenMP. Even when I run it with ONE input-file to convert with OMP_NUM_THREADS set to 1, the resulting ASCII files differs from the one which I get when I run the program, which is compiled without OpenMP! I really don't get it... "diff" in linux prints out every single line as different, but when I look into the file myself and compare the single float values, I don't see any difference myself.
The file looks like:
0.949566E+00 0.945844E+00 0.942125E+00 0.938410E+00 0.934698E+00
0.930989E+00 0.927285E+00 0.923584E+00 0.919888E+00 0.916196E+00
0.912508E+00 0.908826E+00 0.905149E+00 0.901476E+00 0.897810E+00
0.894149E+00 0.890493E+00 0.886845E+00 0.883202E+00 0.879565E+00
etc... (Currently running with single precision!)...
Is there any internal data-change in OpenMP or any advice on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论