运行环境函数 ●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