第十三章共享存储系统编程内容摘要:
pthread_mutex_lock(amp。 slot_lock nslots++。 cond_signal(amp。 slots)。 pthread_mutex_unlock(amp。 slot_lock)。 } return NULL。 } 国家高性能计算中心(合肥) 共享存储系统编程 ANSI X3H5共享存储模型 POSIX 线程模型 OpenMP模型 国家高性能计算中心(合肥) The History of OpenMP What is directive/pragma? Directivebased general purpose parallel programming API with emphasis on the ability to parallelize existing serial programs Why a new standard? Who’s Involved? Parallelism model and basic directives Fortran77, Fortran90 C, C++ OpenMP标准 国家高性能计算中心(合肥) The History of OpenMP A key intermediate step was X3H5 in the late 80’s. An official standards effort to agree on a parallel dialect of Fortran for shared memory puters. The X3H5 effort failed. It was too big and too late. OpenMP is born: In 1996 a group formed to create an industry standard set of directives for SMP programming This group called itself the OpenMP Architecture Review Board(the ARB) who takes care of OpenMP 国家高性能计算中心(合肥) The History of OpenMP(cont.) The ARB has released the following specifications: OpenMP for Fortran, Nov. 1997 OpenMP for C/C++, Nov. 1998 OpenMP Fortran Interpretations, Spring 1999 OpenMP (soon) OpenMP is an evolving standard. Send ments over the feedback link on the OpenMP web site( 国家高性能计算中心(合肥) 为什么要建立新标准 ? ANSI X3H5, 1994 时机不好 , 分布式机器流行 只支持循环级并行性,粒度太细 Pthreads(IEEE Posix ) 是为低端 (low end)的共享机器 (如 SMP)的标准 对 FORTRAN的支持不够 适合任务并行 , 而不适合数据并行 MPI 消息传递的编程标准 , 对程序员要求高 HPF 主要用于 分布式存储机器 大量已有的科学应用程序需要很好地被继承和移植 国家高性能计算中心(合肥) In a Nutshell A set of directives(library routines, and environment variables) used to annotate a sequential program to indicate how it should be executed in parallel— 继承 X3H5的许多概念 Portable, Simple and Scalable Shared Memory Multiprocessing API not a new language not automatic parallelization extend base languages: Fortran77, Fortran90, C and C++ Multivendor Support, for both UNIX and NT Standardizes Fine Grained(Loop) Parallelism, also Supports Coarse Grained Algorithms 国家高性能计算中心(合肥) OpenMP是什么。 一组编译制导语句和可调用的运行 (runtime)库函数 , 扩充到基本语言中用来表达程序中的并行性。第十三章共享存储系统编程
本资源仅提供20页预览,下载后可查看全文
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。
相关推荐
第十三章国际不平等交换理论
平等交换的实质 第二节 “国际不等价交换”及其争论 一 “依附论”及扩展分析 二 伊曼纽尔的“国际不等价交换论” 三 阿明的“中心 边缘论” 四 普雷维什的“贸易
第十七章商标权的保护
(五)其他侵权 知识产权法 第十七章 商标权的保护 第二节 商标侵权行为的界定 案例 2: “ 十佳 ” 注册商标侵权案 【争议焦点】: 本案被告的继续使用行为是否构成商标侵权。 知识产权法 第十七章 商标权的保护 第二节 商标侵权行为的界定 四、商标侵权行为的例外 例外情形主要有以下几种: (一)合理使用 构成 “ 合理使用 ” 一般要求有两个条件,一是 “ 善意 使用 ” ,其次