英特尔 Fortran 编译器“-并行”不工作
我有一个运行良好的串行 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很抱歉这么说,但这不太可能是英特尔编译器的问题,它是一个非常好的编译器(不,我不为英特尔工作!但我确实使用他们的编译器)。
是的,我有能力解释这种行为,但是如果没有看到你的程序,我建议的任何内容都会是错误的。
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.
英特尔 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.