华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)04 OpenMP并行编程(三)运行库函数、环境变量

華東狮免天學数学科学学院 School of Mathematical Sciences.East China Normal University OpenMP并行编程 (三) 运行库函数 环境变量 1 http://math.ecnu.edu.cn/~jypan
http://math.ecnu.edu.cn/~jypan 1 OpenMP 并行编程 (三) —— 运行库函数 —— 环境变量

华东师范大学数学科学学院 目录页 School of Mathematical Sciences,ECNU Contents 运行库函数 2 环境变量 3 编程示例 http://math.ecnu.edu.cn/~jypan
http://math.ecnu.edu.cn/~jypan 目录页 Contents 华东师范大学 数学科学学院 School of Mathematical Sciences, ECNU http://math.ecnu.edu.cn/~jypan 1 2 运行库函数 环境变量 3 编程示例

华东师范大学数学科学学院 目录页 School of Mathematical Sciences,ECNU Contents 运行库函数 Runtime Library Routines 运行环境函数 1 运行库函数 锁函数 ■ 时间函数 2 环境变量 3 编程示例 http://math.ecnu.edu.cn/-jypan
http://math.ecnu.edu.cn/~jypan 目录页 Contents 华东师范大学 数学科学学院 School of Mathematical Sciences, ECNU http://math.ecnu.edu.cn/~jypan 运行环境函数 锁函数 时间函数 1 2 运行库函数 环境变量 1 运行库函数 Runtime Library Routines 3 编程示例

运行环境函数 Execution Environment Routines omp_set_num_threads(int) 设置并行域中的线程个数(用在串行域中) omp_get_num_threads() 返回当前并行域中的线程个数 omp_get_max_threads() 返回并行域中缺省可用的最大线程个数 omp_get_thread_num() 返回当前线程的线程号,0号为主线程 omp_get_num_procs() 返回系统中处理器的个数 omp_in_parallel() 判断是否在并行域中 启用或关闭线程数目动态改变功能 omp_set_dynamic(int) (用在串行域中) omp_get_dynamic() 判断系统是否支持动态改变线程数目 omp_set_nested(int) 启用或关闭并行域嵌套功能(缺省为关闭) omp_get_nested() 判断系统是否支持并行域的嵌套 http://math.ecnu.edu.cn/-jypan 4
http://math.ecnu.edu.cn/~jypan 4 运行环境函数 Execution Environment Routines omp_set_num_threads(int) 设置并行域中的线程个数(用在串行域中) omp_get_num_threads() 返回当前并行域中的线程个数 omp_get_max_threads() 返回并行域中缺省可用的最大线程个数 omp_get_thread_num() 返回当前线程的线程号,0号为主线程 omp_get_num_procs() 返回系统中处理器的个数 omp_in_parallel() 判断是否在并行域中 omp_set_dynamic(int) 启用或关闭线程数目动态改变功能 (用在串行域中) omp_get_dynamic() 判断系统是否支持动态改变线程数目 omp_set_nested(int) 启用或关闭并行域嵌套功能(缺省为关闭) omp_get_nested() 判断系统是否支持并行域的嵌套

运行环境函数 ●omp_set_num_threads subroutine omp_set_num_threads(num threads) Fortran integer num threads C/C++ void omp_set_num_threads(int num_threads); ●omp_get_num_threads Fortran integer function omp_get_num_threads() C/C++ int omp_get_num_threads(void); omp_get_max_threads Fortran integer function omp_get_max_threads( C/C++ int omp_get_max_threads(void); http://math.ecnu.edu.cn/-jypan 5
http://math.ecnu.edu.cn/~jypan 5 运行环境函数 Fortran subroutine omp_set_num_threads(num_threads) integer num_threads C/C++ void omp_set_num_threads(int num_threads); omp_set_num_threads Fortran integer function omp_get_num_threads() C/C++ int omp_get_num_threads(void); omp_get_num_threads Fortran integer function omp_get_max_threads() C/C++ int omp_get_max_threads(void); omp_get_max_threads

运行环境函数 ●omp_get_thread_num Fortran integer function omp_get_thread_num( C/C++ int omp_get_thread_num(void); ● omp_get_num_procs Fortran integer function omp_get_num_procsO C/C++ int omp_get_num_procs(void); ● omp_in_parallel Fortran logical function omp_in_parallel() C/C++ int omp_in_parallel(void); http://math.ecnu.edu.cn/-jypan 6
http://math.ecnu.edu.cn/~jypan 6 运行环境函数 Fortran integer function omp_get_thread_num() C/C++ int omp_get_thread_num(void); omp_get_thread_num Fortran integer function omp_get_num_procs() C/C++ int omp_get_num_procs(void); omp_get_num_procs Fortran logical function omp_in_parallel() C/C++ int omp_in_parallel(void); omp_in_parallel

运行环境函数 ● omp_set_dynamic Fortran subroutine omp_set_dynamic (dynamic_threads) logical dynamic threads C/C++ void omp_set_dynamic(int dynamic_threads); ● omp_get_dynamic Fortran logical function omp_get_dynamic( C/C++ int omp_get_dynamic(void); ● omp_set_nested subroutine omp_set_nested (nested) Fortran logical nested C/C++ void omp_set_nested(int nested); http://math.ecnu.edu.cn/-jypan
http://math.ecnu.edu.cn/~jypan 7 运行环境函数 Fortran subroutine omp_set_dynamic (dynamic_threads) logical dynamic_threads C/C++ void omp_set_dynamic(int dynamic_threads); omp_set_dynamic Fortran logical function omp_get_dynamic() C/C++ int omp_get_dynamic(void); omp_get_dynamic Fortran subroutine omp_set_nested (nested) logical nested C/C++ void omp_set_nested(int nested); omp_set_nested

运行环境函数 ●omp_get_nested Fortran logical function omp_get_nested( C/C++ int omp_get_nested(void); http://math.ecnu.edu.cn/-jypan 8
http://math.ecnu.edu.cn/~jypan 8 运行环境函数 Fortran logical function omp_get_nested() C/C++ int omp_get_nested(void); omp_get_nested

运行环境函数 ■OpenMP3.1中新函数 ●omp_set_schedule subroutine omp_set_schedule(kind,modifier) Fortran integer (kind=omp_sched_kind)kind integer modifier C/C++ void omp_set_schedule(omp_sched_t kind,int modifier); ● omp_get_schedule subroutine omp_get_schedule(kind,modifier) Fortran integer(kind=omp_sched_kind)kind integer modifier C/C++ void omp_get_schedule(omp_sched_t kind,int modifier ) http://math.ecnu.edu.cn/-jypan 9
http://math.ecnu.edu.cn/~jypan 9 运行环境函数 Fortran subroutine omp_set_schedule(kind, modifier) integer (kind=omp_sched_kind) kind integer modifier C/C++ void omp_set_schedule(omp_sched_t kind, int modifier); omp_set_schedule Fortran subroutine omp_get_schedule(kind, modifier) integer (kind=omp_sched_kind) kind integer modifier C/C++ void omp_get_schedule(omp_sched_t * kind, int * modifier ); omp_get_schedule OpenMP 3.1 中新函数

运行环境函数 omp_get_thread_limit returns the maximum number of OpenMP threads available to the program Fortran integer function omp_get_thread_limit() C/C++ int omp_get_thread_limit(void); omp_set_max_active_levels limits the number of nested active parallel regions Fortran subroutine omp_set_max_active_levels(max_levels) integer max levels C/C++ void omp_set_max_active_levels(int max_levels); http://math.ecnu.edu.cn/-jypan 10
http://math.ecnu.edu.cn/~jypan 10 运行环境函数 Fortran integer function omp_get_thread_limit() C/C++ int omp_get_thread_limit(void); omp_get_thread_limit Fortran subroutine omp_set_max_active_levels (max_levels) integer max_levels C/C++ void omp_set_max_active_levels (int max_levels); omp_set_max_active_levels returns the maximum number of OpenMP threads available to the program limits the number of nested active parallel regions
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)04 OpenMP并行编程(二)工作共享结构、同步与数据环境.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)OpenMP Application Programming Interface Examples Version 4.0.2.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)OpenMP Application Programming Interface Version 5.0.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)OpenMP Application Program Interface Version 4.0.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)OpenMP API 5.0.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)OpenMP API 4.0.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)04 OpenMP并行编程(一)并行编程介绍、并行域与工作共享.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)应用 - 矩阵乘积的快速算法.pdf
- 华东师范大学:《C语言程序设计》课程教学资源(学习笔记)C语言程序设计学习笔记.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)C Reference Card.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)03 C语言编程介绍.pdf
- Linux操作系统《Linux就该这么学》书籍电子版(第2版)Linux就该这么学(刘遄,2021).pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)Linux操作系统 - Vim Cheat Sheet for Programmers.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)Linux操作系统 - VIM命令小结.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)Linux操作系统 - Vi简介(visual interface).pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)Linux操作系统 - Linux Command Quick Reference.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)02 Linux操作系统介绍.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)01 并行计算介绍 Parallel and High Performance Computing(主讲:潘建瑜).pdf
- 兰州交通大学:《单片机原理与接口技术》课程授课教案(打印版)第十二章 单片机的其它接口.pdf
- 兰州交通大学:《单片机原理与接口技术》课程授课教案(打印版)第十一章 单片机与I2C总线芯片的接口(2/2)单片机与PCF8591接口.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)05 矩阵 - 向量乘积并行算法(OpenMP).pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)05 矩阵 - 矩阵乘积并行算法(OpenMP).pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)06 线性方程组直接法并行计算.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)07 消息传递编程接口 MPI(一)编程基础.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)MPI - A Message-Passing Interface Standard Version 3.1.pdf
- 《高等数值分析(高性能计算/并行计算)》课程教学资源(参考资料)MPI - A Message-Passing Interface Standard Version 4.0.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)07 消息传递编程接口MPI(二)消息传递.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)08 矩阵向量乘积并行算法(基于MPI).pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)08 矩阵矩阵乘积并行算法(基于MPI).pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)07 消息传递编程接口MPI(三)MPI 数据类型.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)07 消息传递编程接口MPI(四)进程与通信器操作.pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)09 线性方程组并行直接法(基于 MPI).pdf
- 华东师范大学:《高等数值分析(高性能计算/并行计算)》课程教学资源(讲义)10 二维Poisson方程的并行求解算法(基于MPI).pdf
- 大连大学:信息与计算科学专业课程教学大纲汇编(2010).doc
- 大连大学:物理学(多媒体与网络技术)专业课程教学大纲汇编(2010).doc
- 大连大学:计算机科学与技术专业课程教学大纲汇编(2010).doc
- 石河子大学:《编译原理》课程教学资源(教案讲义)编译原理教案 Principle of Compiler(负责人:张丽).doc
- 石河子大学:《编译原理》课程教学资源(试卷习题)第一套.doc
- 石河子大学:《编译原理》课程教学资源(试卷习题)第二套.doc
- 石河子大学:《编译原理》课程教学资源(试卷习题)第三套.doc