ICC对openmp的支持相对C1,有什么优势?

y456789 2009-12-01 05:07:54
最近在使用openmp,目前使用的是C1编译器,ICC曾经也有用过,想比较一下ICC是否要强一些,希望先得到一些权威性的理论上的比较,或者提供一些相关的比较文章。
...全文
114 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
y456789 2009-12-14
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 intel_iclifort 的回复:]
如果你的openmp directive写得不正确, 编译器当然无法生成OpenMP的可执行程序

[/Quote]

这种语法问题C1同样可以检测的.
intel_iclifort 2009-12-13
  • 打赏
  • 举报
回复
如果语法写得没问题, 而编译器无法完成, 那就是一个bug了
intel_iclifort 2009-12-13
  • 打赏
  • 举报
回复
如果你的openmp directive写得不正确, 编译器当然无法生成OpenMP的可执行程序
y456789 2009-12-10
  • 打赏
  • 举报
回复
貌似强多了,我现在用的C1好象只能检测一些语法上的问题.

"-Qopenmp_report1 = display diagnostics indicating loops, regions, and sections successfully parallelized (Default).
-Qopenmp_report2 = same as -Qopenmp_report1 plus diagnostics indicating master construct, single construct, critical sections, order construct, atomic directive, etc. successfully handled."

难道ICC能够自动判断:是否要对一个并行区进行并行化(类似向量化)?
是否存在冗余的同步过程,从而消除它们?



y456789 2009-12-10
  • 打赏
  • 举报
回复
谢谢。
你这里讲的主要是开关/Qparallel的功能。

我对你下面这两句中的successfully理解不清,难道icc编译器有时候不会根据openmp directive进行处理,从而导致某些情况下失败?
"-Qopenmp_report1 = display diagnostics indicating loops, regions, and sections successfully parallelized (Default).
-Qopenmp_report2 = same as -Qopenmp_report1 plus diagnostics indicating master construct, single construct, critical sections, order construct, atomic directive, etc. successfully handled."
intel_jeff 2009-12-10
  • 打赏
  • 举报
回复
icc的确能够尝试去识别可以并行化的循环,并将其并行化,开关为 /Qparallel,类似的,也能产生报告给我们阅读。至于说冗余的同步过程,你是指编译器是否能识别多余重复的锁?编译器还没达到人的智能。:-)

Syntax
Linux and Mac OS X:
-par-report[n]

Windows:
/Qpar-report[n]


Arguments
n
Is a value denoting which diagnostic messages to report. Possible values are:

0
Tells the auto-parallelizer to report no diagnostic information.

1
Tells the auto-parallelizer to report diagnostic messages for loops successfully auto-parallelized. The compiler also issues a "LOOP AUTO-PARALLELIZED" message for parallel loops.

2
Tells the auto-parallelizer to report diagnostic messages for loops successfully and unsuccessfully auto-parallelized.

3
Tells the auto-parallelizer to report the same diagnostic messages specified by 2 plus additional information about any proven or assumed dependencies inhibiting auto-parallelization (reasons for not parallelizing).
intel_jeff 2009-12-09
  • 打赏
  • 举报
回复
我简单介绍下

ICC 11.x支持OpenMP 3.0,并能提供诊断信息(使用/Qopenmp_report{0|1|2}开关,如下)。

The -Qopenmp_report{0|1|2} option controls the OpenMP parallelizer's diagnostic levels 0, 1, or 2 as follows:
-Qopenmp_report0 = no diagnostic information is displayed.
-Qopenmp_report1 = display diagnostics indicating loops, regions, and sections successfully parallelized (Default).
-Qopenmp_report2 = same as -Qopenmp_report1 plus diagnostics indicating master construct, single construct, critical sections, order construct, atomic directive, etc. successfully handled.

另外,通过ICC后,你可以用Intel Parallel Debugger Extension来深入调试你的OpenMP程序,它可以:
1、检测 data racing
2、检测 函数重入
3、提供对OpenMP的强大支持,包括:
1) Serialize OpenMP* threaded application execution on the fly
2) Insight into thread groups, barriers, locks, wait lists, &c.

567

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧