英特尔 Fortran 编译器“-并行”不工作

发布于 2024-08-06 08:41:06 字数 323 浏览 3 评论 0原文

我有一个运行良好的串行 Fortran 代码。一旦我使用 ifort -parallel 编译相同的代码并运行它,它就会给出错误的结果和溢出。我希望通过“-parallel”标志,英特尔编译器能够选择可以安全并行化的循环,并且我应该得到与串行代码完全相同的结果,但这并没有发生。更奇怪的行为是,我继续使用 !DEC$ NOPARALLEL 关闭代码中的所有 do 循环并行化,使用 ifort -parallel 编译代码以确保没有循环并行化然后运行。令人惊讶的是,我得到了相同的错误结果和溢出,尽管后一个操作应该完全等同于串行代码。

有没有人能够解释这种行为,或者这只是英特尔编译器的缺陷。

问候。

I have a serial Fortran code that works fine. Once I compile the same code using ifort -parallel and run it, it gives wrong results and overflow. I would expect that with "-parallel" flag, the Intel compiler is capable of selecting the loops that are safe to parallelize and I should get the exact same results as for the serial code, which did not happen. The even more strange behaviour is that I went ahead and closed all the do loops parallelization in my code using !DEC$ NOPARALLEL, compiled the code using ifort -parallel to make sure that non of the loops was parallelized and then run. Surprisingly, I got the same wrong results and overflow, although the latter action should be exactly equivalent to a serial code.

Is there any one capable of explaining this behaviour or is it just an Intel compiler deficiency.

Greetings.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

漫漫岁月 2024-08-13 08:41:06

很抱歉这么说,但这不太可能是英特尔编译器的问题,它是一个非常好的编译器(不,我不为英特尔工作!但我确实使用他们的编译器)。

是的,我有能力解释这种行为,但是如果没有看到你的程序,我建议的任何内容都会是错误的。

Sorry to say this, but it's unlikely to be an Intel compiler problem it's a pretty good compiler (no, I don't work for Intel ! but I do use their compilers).

Yes I am capable of explaining this sort of behaviour, but without sight of your program anything I suggest will be wrong.

记忆消瘦 2024-08-13 08:41:06

英特尔 Fortran 论坛上给出了相同问题的答案:http://software .intel.com/en-us/forums/topic/269743

编辑:我修改了链接,因为正如评论中所述,原始链接现已失效。

Answers were given to this identical question on the Intel Fortran Forum: http://software.intel.com/en-us/forums/topic/269743

EDIT: I revised the link, since as stated in the comment, the original link is now dead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文