- 1、本文档共24页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
高性能计算导论-OpenMPProgramming摘要
OpenMP Programming OpenMP Introduction OpenMP-Open Multi-Processing OpenMP is an Application Program Interface (API) Comprised of three components: Compiler directives Runtime library routines(运行库例程) Environment variables OpenMP program A program that consists of a base program, annotated with OpenMP directives and runtime library routines. base program A program written in a programming language. Three components of OpenMP Directives/pragmas Create threads Share the work amongst threads Synchronize threads Library routines external functions(外部功能) Control and query the parallel execution environment(控制和查询并行执行环境) Environment variables control the behavior of an OpenMP program Directives specifying how a compiler or assembler should process its input OpenMP directives for C/C++ are specified with the pragma preprocessing directive #pragma omp directive-name [clause[ [,] clause]...] new-line #pragma omp parallel #pragma omp for #pragma omp parallel for #pragma omp barrier Create threads/Share the work amongst threads/Synchronize threads Runtime Library a header file named omp.h omp_set_num_threads, omp_get_num_threads omp_get_max_threads, omp_get_thread_num omp_get_num_procs, omp_in_parallel omp_set_dynamic, omp_get_dynamic omp_set_nested, omp_get_nested omp_set_schedule, omp_get_schedule omp_get_thread_limit omp_set_max_active_levels omp_get_max_active_levels omp_get_level, omp_get_ancestor_thread_num omp_get_team_size, omp_get_active_level omp_in_final external functions/Control and query the parallel execution environment environment variables:control the behavior of an OpenMP program OMP_NUM_THREADS OMP_SCHEDULE OMP_DYNAMIC OMP_PROC_BIND OMP_NESTED OMP_STACKSIZE OMP_WAIT_POLICY OMP_MAX_ACTIVE_LEVELS OMP_THREAD_LIMIT The OpenMP Execution Model The OpenMP Memory Model parallel construct A set of implicit(隐含) tasks, one per thread, is generated. The code for each task is defined by the code inside the parallel construct. #pragma omp parallel [clause[ [, ]clau
您可能关注的文档
- 高层豪宅标准摘要.ppt
- 高层案例摘要.ppt
- 平面镜习题全解.ppt
- 高层酒店建筑设计及案例摘要.ppt
- 高层香格里拉营销推广方案摘要.doc
- 高山榕项目可行性报告-甲级资质摘要.doc
- 年产10万吨合成氨变换工艺设计全解.ppt
- 高山流水(教学设计)摘要.doc
- 年产15万吨无釉砖工艺设计全解.doc
- 年产4万吨环己烷过程工艺设计绪论全解.doc
- 第十一章 电流和电路专题特训二 实物图与电路图的互画 教学设计 2024-2025学年鲁科版物理九年级上册.docx
- 人教版七年级上册信息技术6.3加工音频素材 教学设计.docx
- 5.1自然地理环境的整体性 说课教案 (1).docx
- 4.1 夯实法治基础 教学设计-2023-2024学年统编版九年级道德与法治上册.docx
- 3.1 光的色彩 颜色 电子教案 2023-2024学年苏科版为了八年级上学期.docx
- 小学体育与健康 四年级下册健康教育 教案.docx
- 2024-2025学年初中数学九年级下册北京课改版(2024)教学设计合集.docx
- 2024-2025学年初中科学七年级下册浙教版(2024)教学设计合集.docx
- 2024-2025学年小学信息技术(信息科技)六年级下册浙摄影版(2013)教学设计合集.docx
- 2024-2025学年小学美术二年级下册人美版(常锐伦、欧京海)教学设计合集.docx
文档评论(0)