From: Jonathan Peyton Date: Fri, 12 Jul 2019 21:45:36 +0000 (+0000) Subject: [OpenMP] Remove OMP spec versioning X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4b4f994d2f6a090694276b40d433dc1a58beb24;p=platform%2Fupstream%2Fllvm.git [OpenMP] Remove OMP spec versioning Remove all older OMP spec versioning from the runtime and build system. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D64534 llvm-svn: 365963 --- diff --git a/openmp/README.rst b/openmp/README.rst index 63afb70d..5e28b9a 100644 --- a/openmp/README.rst +++ b/openmp/README.rst @@ -141,10 +141,6 @@ Options for ``libomp`` Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) to build for. This value is ignored if **LIBOMP_ARCH** does not equal ``mic``. -**LIBOMP_OMP_VERSION** = ``50|45|40|30`` - OpenMP version to build for. Older versions will disable certain - functionality and entry points. - **LIBOMP_LIB_TYPE** = ``normal|profile|stubs`` Library type can be ``normal``, ``profile``, or ``stubs``. @@ -192,8 +188,8 @@ Optional Features multi-node systems where a small ``CACHE_LINE`` setting leads to false sharing. **LIBOMP_OMPT_SUPPORT** = ``ON|OFF`` - Include support for the OpenMP Tools Interface (OMPT). - This option is supported and ``ON`` by default for x86, x86_64, AArch64, and + Include support for the OpenMP Tools Interface (OMPT). + This option is supported and ``ON`` by default for x86, x86_64, AArch64, and PPC64 on Linux* and macOS*. This option is ``OFF`` if this feature is not supported for the platform. diff --git a/openmp/runtime/CMakeLists.txt b/openmp/runtime/CMakeLists.txt index 088edd4..8087b23 100644 --- a/openmp/runtime/CMakeLists.txt +++ b/openmp/runtime/CMakeLists.txt @@ -69,21 +69,8 @@ libomp_check_variable(LIBOMP_ARCH 32e x86_64 32 i386 arm ppc64 ppc64le aarch64 m set(LIBOMP_LIB_TYPE normal CACHE STRING "Performance,Profiling,Stubs library (normal/profile/stubs)") libomp_check_variable(LIBOMP_LIB_TYPE normal profile stubs) -set(LIBOMP_OMP_VERSION 50 CACHE STRING - "The OpenMP version (50/45/40/30)") -libomp_check_variable(LIBOMP_OMP_VERSION 50 45 40 30) # Set the OpenMP Year and Month assiociated with version -if(${LIBOMP_OMP_VERSION} GREATER 50 OR ${LIBOMP_OMP_VERSION} EQUAL 50) - set(LIBOMP_OMP_YEAR_MONTH 201611) -elseif(${LIBOMP_OMP_VERSION} GREATER 45 OR ${LIBOMP_OMP_VERSION} EQUAL 45) - set(LIBOMP_OMP_YEAR_MONTH 201511) -elseif(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40) - set(LIBOMP_OMP_YEAR_MONTH 201307) -elseif(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30) - set(LIBOMP_OMP_YEAR_MONTH 201107) -else() - set(LIBOMP_OMP_YEAR_MONTH 200505) -endif() +set(LIBOMP_OMP_YEAR_MONTH 201611) set(LIBOMP_MIC_ARCH knc CACHE STRING "Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc). Ignored if not Intel(R) MIC Architecture build.") if("${LIBOMP_ARCH}" STREQUAL "mic") @@ -213,7 +200,7 @@ endif() set(LIBOMP_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LIBOMP_SRC_DIR ${LIBOMP_BASE_DIR}/src) set(LIBOMP_TOOLS_DIR ${LIBOMP_BASE_DIR}/tools) -set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include/${LIBOMP_OMP_VERSION}) +set(LIBOMP_INC_DIR ${LIBOMP_SRC_DIR}/include) set(LIBOMP_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) # Enabling Fortran if it is needed @@ -301,7 +288,7 @@ endif() # OMPT-support defaults to ON for OpenMP 5.0+ and if the requirements in # cmake/config-ix.cmake are fulfilled. set(OMPT_DEFAULT FALSE) -if ((${LIBOMP_OMP_VERSION} GREATER 49) AND (LIBOMP_HAVE_OMPT_SUPPORT) AND (NOT WIN32)) +if ((LIBOMP_HAVE_OMPT_SUPPORT) AND (NOT WIN32)) set(OMPT_DEFAULT TRUE) endif() set(LIBOMP_OMPT_SUPPORT ${OMPT_DEFAULT} CACHE BOOL @@ -314,9 +301,6 @@ set(LIBOMP_OMPT_OPTIONAL TRUE CACHE BOOL if(LIBOMP_OMPT_SUPPORT AND (NOT LIBOMP_HAVE_OMPT_SUPPORT)) libomp_error_say("OpenMP Tools Interface requested but not available in this implementation") endif() -if(LIBOMP_OMPT_SUPPORT AND (${LIBOMP_OMP_VERSION} LESS 50)) - libomp_error_say("OpenMP Tools Interface only available with OpenMP 5.0, LIBOMP_OMP_VERSION is ${LIBOMP_OMP_VERSION}") -endif() # TSAN-support set(LIBOMP_TSAN_SUPPORT FALSE CACHE BOOL @@ -368,7 +352,6 @@ if(${OPENMP_STANDALONE_BUILD}) libomp_say("Intel(R) MIC Architecture -- ${LIBOMP_MIC_ARCH}") endif() libomp_say("Build Type -- ${CMAKE_BUILD_TYPE}") - libomp_say("OpenMP Version -- ${LIBOMP_OMP_VERSION}") libomp_say("Library Kind -- ${LIBOMP_LIBRARY_KIND}") libomp_say("Library Type -- ${LIBOMP_LIB_TYPE}") libomp_say("Fortran Modules -- ${LIBOMP_FORTRAN_MODULES}") diff --git a/openmp/runtime/cmake/LibompDefinitions.cmake b/openmp/runtime/cmake/LibompDefinitions.cmake index cc93ad08..46beec7 100644 --- a/openmp/runtime/cmake/LibompDefinitions.cmake +++ b/openmp/runtime/cmake/LibompDefinitions.cmake @@ -28,4 +28,3 @@ function(libomp_get_definitions_flags cppflags) # CMake doesn't include CPPFLAGS from environment, but we will. set(${cppflags} ${cppflags_local} ${LIBOMP_CPPFLAGS} $ENV{CPPFLAGS} PARENT_SCOPE) endfunction() - diff --git a/openmp/runtime/cmake/LibompExports.cmake b/openmp/runtime/cmake/LibompExports.cmake index e252c62..f98de26 100644 --- a/openmp/runtime/cmake/LibompExports.cmake +++ b/openmp/runtime/cmake/LibompExports.cmake @@ -13,16 +13,13 @@ # Create the suffix for the export directory # - Only add to suffix when not a default value -# - Example suffix: .deb.30.s1 -# final export directory: exports/lin_32e.deb.30.s1/lib -# - These suffixes imply the build is a Debug, OpenMP 3.0, Stats-Gathering version of the library +# - Example suffix: .deb.s1 +# final export directory: exports/lin_32e.deb.s1/lib +# - These suffixes imply the build is a Debug, Stats-Gathering version of the library set(libomp_suffix) libomp_append(libomp_suffix .deb DEBUG_BUILD) libomp_append(libomp_suffix .dia RELWITHDEBINFO_BUILD) libomp_append(libomp_suffix .min MINSIZEREL_BUILD) -if(NOT "${LIBOMP_OMP_VERSION}" STREQUAL "45") - libomp_append(libomp_suffix .${LIBOMP_OMP_VERSION}) -endif() libomp_append(libomp_suffix .s1 LIBOMP_STATS) libomp_append(libomp_suffix .ompt LIBOMP_OMPT_SUPPORT) if(${LIBOMP_OMPT_SUPPORT}) @@ -95,4 +92,3 @@ if(WIN32) COMMAND ${CMAKE_COMMAND} -E copy ${LIBOMPIMP_OUTPUT_DIRECTORY}/${LIBOMP_IMP_LIB_FILE} ${LIBOMP_EXPORTS_LIB_DIR} ) endif() - diff --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake index 86f6294..030e6f0 100644 --- a/openmp/runtime/cmake/LibompHandleFlags.cmake +++ b/openmp/runtime/cmake/LibompHandleFlags.cmake @@ -198,18 +198,6 @@ function(libomp_get_gdflags gdflags) libomp_append(gdflags_local "-D stub" STUBS_LIBRARY) libomp_append(gdflags_local "-D HAVE_QUAD" LIBOMP_USE_QUAD_PRECISION) libomp_append(gdflags_local "-D USE_DEBUGGER" LIBOMP_USE_DEBUGGER) - if(${LIBOMP_OMP_VERSION} GREATER 50 OR ${LIBOMP_OMP_VERSION} EQUAL 50) - libomp_append(gdflags_local "-D OMP_50") - endif() - if(${LIBOMP_OMP_VERSION} GREATER 45 OR ${LIBOMP_OMP_VERSION} EQUAL 45) - libomp_append(gdflags_local "-D OMP_45") - endif() - if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40) - libomp_append(gdflags_local "-D OMP_40") - endif() - if(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30) - libomp_append(gdflags_local "-D OMP_30") - endif() if(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD}) libomp_append(gdflags_local "-D KMP_DEBUG") endif() diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index f58254d..7956ae0 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -97,10 +97,8 @@ else() libomp_append(LIBOMP_CXXFILES kmp_debugger.cpp LIBOMP_USE_DEBUGGER) libomp_append(LIBOMP_CXXFILES kmp_stats.cpp LIBOMP_STATS) libomp_append(LIBOMP_CXXFILES kmp_stats_timing.cpp LIBOMP_STATS) - if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40) - libomp_append(LIBOMP_CXXFILES kmp_taskdeps.cpp) - libomp_append(LIBOMP_CXXFILES kmp_cancel.cpp) - endif() + libomp_append(LIBOMP_CXXFILES kmp_taskdeps.cpp) + libomp_append(LIBOMP_CXXFILES kmp_cancel.cpp) endif() # Files common to stubs and normal library libomp_append(LIBOMP_CXXFILES kmp_ftn_cdecl.cpp) diff --git a/openmp/runtime/src/dllexports b/openmp/runtime/src/dllexports index f9f8648..f76619e 100644 --- a/openmp/runtime/src/dllexports +++ b/openmp/runtime/src/dllexports @@ -279,16 +279,12 @@ __kmpc_reduce 189 __kmpc_end_reduce 190 -# OpenMP 3.0 - -%ifdef OMP_30 __kmpc_omp_task_alloc 191 __kmpc_omp_task 192 __kmpc_omp_taskwait 193 __kmpc_omp_task_begin_if0 196 __kmpc_omp_task_complete_if0 197 __kmpc_omp_task_parts 198 -%endif # OMP_30 # __omp_collector_api 199 @@ -320,9 +316,7 @@ kmpc_set_stacksize_s 222 # kmpc_set_stats 217 kmpc_set_defaults 224 -# OMP 3.0 entry points for unsigned loop iteration variables %ifndef stub - %ifdef OMP_30 __kmpc_for_static_init_8u 225 __kmpc_dispatch_init_8u 226 __kmpc_dispatch_next_8u 227 @@ -331,7 +325,6 @@ kmpc_set_defaults 224 __kmpc_dispatch_init_4u 230 __kmpc_dispatch_next_4u 231 __kmpc_dispatch_fini_4u 232 - %endif # OMP_30 %endif %ifndef stub @@ -339,17 +332,12 @@ kmpc_set_defaults 224 __kmpc_get_parent_taskid 234 %endif -# OpenMP 3.1 entry points %ifndef stub - %ifdef OMP_30 __kmpc_omp_taskyield 235 - %endif # OMP_30 # __kmpc_place_threads 236 %endif -# OpenMP 4.0 entry points %ifndef stub - %ifdef OMP_40 __kmpc_push_proc_bind 237 __kmpc_taskgroup 238 __kmpc_end_taskgroup 239 @@ -372,12 +360,9 @@ kmpc_set_defaults 224 __kmpc_team_static_init_4u 256 __kmpc_team_static_init_8 257 __kmpc_team_static_init_8u 258 - %endif # OMP_40 %endif -# OpenMP 4.5 entry points %ifndef stub - %ifdef OMP_45 __kmpc_proxy_task_completed 259 __kmpc_proxy_task_completed_ooo 260 __kmpc_doacross_init 261 @@ -386,17 +371,14 @@ kmpc_set_defaults 224 __kmpc_doacross_fini 264 __kmpc_taskloop 266 __kmpc_critical_with_hint 270 - %endif %endif kmpc_aligned_malloc 265 kmpc_set_disp_num_buffers 267 -# OpenMP 5.0 entry points %ifndef stub - %ifdef OMP_50 __kmpc_task_reduction_init 268 __kmpc_task_reduction_get_th_data 269 -# USED FOR 4.5 __kmpc_critical_with_hint 270 +# USED ABOVE __kmpc_critical_with_hint 270 __kmpc_get_target_offload 271 __kmpc_omp_reg_task_with_affinity 272 __kmpc_pause_resource 273 @@ -405,7 +387,6 @@ kmpc_set_disp_num_buffers 267 __kmpc_task_allow_completion_event 276 __kmpc_taskred_init 277 __kmpc_taskred_modifier_init 278 - %endif %endif # User API entry points that have both lower- and upper- case versions for Fortran. @@ -463,7 +444,6 @@ kmp_aligned_malloc 747 kmp_set_warnings_on 779 kmp_set_warnings_off 780 -%ifdef OMP_30 omp_get_active_level 789 omp_get_level 790 omp_get_ancestor_thread_num 791 @@ -488,17 +468,9 @@ kmp_set_warnings_off 780 kmpc_unset_affinity_mask_proc 858 kmp_get_affinity_mask_proc 859 kmpc_get_affinity_mask_proc 860 -%endif # OMP_30 - -# OpenMP 3.1 -%ifdef OMP_30 omp_in_final 861 -%endif # OMP_30 -# OpenMP 40 - -%ifdef OMP_40 omp_get_proc_bind 862 #omp_set_proc_bind 863 #omp_curr_proc_bind 864 @@ -510,11 +482,7 @@ kmp_set_warnings_off 780 omp_set_default_device 879 omp_get_default_device 880 omp_get_num_devices 881 -%endif # OMP_40 - -# OpenMP 45 -%ifdef OMP_45 omp_init_lock_with_hint 870 omp_init_nest_lock_with_hint 871 omp_get_max_task_priority 872 @@ -534,11 +502,9 @@ kmp_set_warnings_off 780 omp_target_associate_ptr 888 omp_target_disassociate_ptr 889 %endif -%endif # OMP_45 kmp_set_disp_num_buffers 890 -%ifdef OMP_50 omp_control_tool 891 omp_set_default_allocator 892 omp_get_default_allocator 893 @@ -583,7 +549,6 @@ kmp_set_disp_num_buffers 890 omp_const_mem_space DATA omp_high_bw_mem_space DATA omp_low_lat_mem_space DATA -%endif # OMP_50 %ifndef stub # Ordinals between 900 and 999 are reserved @@ -1033,8 +998,6 @@ kmp_set_disp_num_buffers 890 __kmpc_atomic_float10_div_cpt_fp %endif - %ifdef OMP_40 - # ATOMIC extensions for OpenMP 4.0 spec (x86 and x64 only) __kmpc_atomic_fixed1_swp 2412 @@ -1209,8 +1172,6 @@ kmp_set_disp_num_buffers 890 __kmpc_atomic_float10_sub_cpt_rev_fp __kmpc_atomic_float10_div_cpt_rev_fp %endif - %endif # OMP_40 - %endif # arch_64 diff --git a/openmp/runtime/src/include/30/omp.h.var b/openmp/runtime/src/include/30/omp.h.var deleted file mode 100644 index 015ce54..0000000 --- a/openmp/runtime/src/include/30/omp.h.var +++ /dev/null @@ -1,164 +0,0 @@ -/* - * include/30/omp.h.var - */ - - -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - - -#ifndef __OMP_H -# define __OMP_H - -# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@ -# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@ -# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@ -# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@" - -# ifdef __cplusplus - extern "C" { -# endif - -# define omp_set_num_threads ompc_set_num_threads -# define omp_set_dynamic ompc_set_dynamic -# define omp_set_nested ompc_set_nested -# define omp_set_max_active_levels ompc_set_max_active_levels -# define omp_set_schedule ompc_set_schedule -# define omp_get_ancestor_thread_num ompc_get_ancestor_thread_num -# define omp_get_team_size ompc_get_team_size - - -# define kmp_set_stacksize kmpc_set_stacksize -# define kmp_set_stacksize_s kmpc_set_stacksize_s -# define kmp_set_blocktime kmpc_set_blocktime -# define kmp_set_library kmpc_set_library -# define kmp_set_defaults kmpc_set_defaults -# define kmp_set_affinity_mask_proc kmpc_set_affinity_mask_proc -# define kmp_unset_affinity_mask_proc kmpc_unset_affinity_mask_proc -# define kmp_get_affinity_mask_proc kmpc_get_affinity_mask_proc - -# define kmp_malloc kmpc_malloc -# define kmp_calloc kmpc_calloc -# define kmp_realloc kmpc_realloc -# define kmp_free kmpc_free - - -# if defined(_WIN32) -# define __KAI_KMPC_CONVENTION __cdecl -# else -# define __KAI_KMPC_CONVENTION -# endif - - /* schedule kind constants */ - typedef enum omp_sched_t { - omp_sched_static = 1, - omp_sched_dynamic = 2, - omp_sched_guided = 3, - omp_sched_auto = 4 - } omp_sched_t; - - /* set API functions */ - extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int); - extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int); - extern void __KAI_KMPC_CONVENTION omp_set_nested (int); - extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int); - extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int); - - /* query API functions */ - extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void); - extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void); - extern int __KAI_KMPC_CONVENTION omp_get_nested (void); - extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void); - extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void); - extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void); - extern int __KAI_KMPC_CONVENTION omp_in_parallel (void); - extern int __KAI_KMPC_CONVENTION omp_in_final (void); - extern int __KAI_KMPC_CONVENTION omp_get_active_level (void); - extern int __KAI_KMPC_CONVENTION omp_get_level (void); - extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int); - extern int __KAI_KMPC_CONVENTION omp_get_team_size (int); - extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void); - extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void); - extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *); - - /* lock API functions */ - typedef struct omp_lock_t { - void * _lk; - } omp_lock_t; - - extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *); - extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *); - - /* nested lock API functions */ - typedef struct omp_nest_lock_t { - void * _lk; - } omp_nest_lock_t; - - extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *); - extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *); - - /* time API functions */ - extern double __KAI_KMPC_CONVENTION omp_get_wtime (void); - extern double __KAI_KMPC_CONVENTION omp_get_wtick (void); - -# include - /* kmp API functions */ - extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void); - extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int); - extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void); - extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t); - extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void); - extern int __KAI_KMPC_CONVENTION kmp_get_library (void); - extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int); - extern void __KAI_KMPC_CONVENTION kmp_set_library (int); - extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void); - extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void); - extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void); - extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *); - - /* affinity API functions */ - typedef void * kmp_affinity_mask_t; - - extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void); - extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *); - extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *); - - extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t); - extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t); - extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t); - extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t); - extern void __KAI_KMPC_CONVENTION kmp_free (void *); - - extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void); - extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void); - -# undef __KAI_KMPC_CONVENTION - - /* Warning: - The following typedefs are not standard, deprecated and will be removed in a future release. - */ - typedef int omp_int_t; - typedef double omp_wtime_t; - -# ifdef __cplusplus - } -# endif - -#endif /* __OMP_H */ - diff --git a/openmp/runtime/src/include/30/omp_lib.f.var b/openmp/runtime/src/include/30/omp_lib.f.var deleted file mode 100644 index 555c941..0000000 --- a/openmp/runtime/src/include/30/omp_lib.f.var +++ /dev/null @@ -1,643 +0,0 @@ -! include/30/omp_lib.f.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - -!*** -!*** Some of the directives for the following routine extend past column 72, -!*** so process this file in 132-column mode. -!*** - -!dec$ fixedformlinesize:132 - - module omp_lib_kinds - - integer, parameter :: omp_integer_kind = 4 - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = 4 - integer, parameter :: omp_lock_kind = int_ptr_kind() - integer, parameter :: omp_nest_lock_kind = int_ptr_kind() - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = int_ptr_kind() - integer, parameter :: kmp_size_t_kind = int_ptr_kind() - integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind() - - end module omp_lib_kinds - - module omp_lib - - use omp_lib_kinds - - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@' - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(nthreads) - use omp_lib_kinds - integer (kind=omp_integer_kind) nthreads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(enable) - use omp_lib_kinds - logical (kind=omp_logical_kind) enable - end subroutine omp_set_dynamic - - subroutine omp_set_nested(enable) - use omp_lib_kinds - logical (kind=omp_logical_kind) enable - end subroutine omp_set_nested - - function omp_get_num_threads() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_get_dynamic() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) - use omp_lib_kinds - integer (kind=omp_integer_kind) max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) - use omp_lib_kinds - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) - use omp_lib_kinds - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_team_size - end function omp_get_team_size - - subroutine omp_set_schedule(kind, modifier) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) modifier - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, modifier) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) modifier - end subroutine omp_get_schedule - - function omp_get_wtime() - double precision omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick () - double precision omp_get_wtick - end function omp_get_wtick - - subroutine omp_init_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_set_lock - - subroutine omp_unset_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_unset_lock - - function omp_test_lock(lockvar) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) lockvar - end function omp_test_lock - - subroutine omp_init_nest_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(lockvar) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) lockvar - end function omp_test_nest_lock - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) - use omp_lib_kinds - integer (kind=omp_integer_kind) size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) - use omp_lib_kinds - integer (kind=kmp_size_t_kind) size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) - use omp_lib_kinds - integer (kind=omp_integer_kind) msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) - use omp_lib_kinds - integer (kind=omp_integer_kind) libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) - character*(*) string - end subroutine kmp_set_defaults - - function kmp_get_stacksize() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() - use omp_lib_kinds - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - function kmp_set_affinity(mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind) size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind) size - integer (kind=kmp_size_t_kind) alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind) nelem - integer (kind=kmp_size_t_kind) elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind) ptr - integer (kind=kmp_size_t_kind) size - end function kmp_realloc - - subroutine kmp_free(ptr) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() - end subroutine kmp_set_warnings_off - - end interface - -!dec$ if defined(_WIN32) -!dec$ if defined(_WIN64) .or. defined(_M_AMD64) - -!*** -!*** The Fortran entry points must be in uppercase, even if the /Qlowercase -!*** option is specified. The alias attribute ensures that the specified -!*** string is used as the entry point. -!*** -!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an -!*** underscore prepended. On the Windows* OS Intel(R) 64 -!*** architecture, no underscore is prepended. -!*** - -!dec$ attributes alias:'OMP_SET_NUM_THREADS' :: omp_set_num_threads -!dec$ attributes alias:'OMP_SET_DYNAMIC' :: omp_set_dynamic -!dec$ attributes alias:'OMP_SET_NESTED' :: omp_set_nested -!dec$ attributes alias:'OMP_GET_NUM_THREADS' :: omp_get_num_threads -!dec$ attributes alias:'OMP_GET_MAX_THREADS' :: omp_get_max_threads -!dec$ attributes alias:'OMP_GET_THREAD_NUM' :: omp_get_thread_num -!dec$ attributes alias:'OMP_GET_NUM_PROCS' :: omp_get_num_procs -!dec$ attributes alias:'OMP_IN_PARALLEL' :: omp_in_parallel -!dec$ attributes alias:'OMP_GET_DYNAMIC' :: omp_get_dynamic -!dec$ attributes alias:'OMP_GET_NESTED' :: omp_get_nested -!dec$ attributes alias:'OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit -!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels -!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels -!dec$ attributes alias:'OMP_GET_LEVEL' :: omp_get_level -!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level -!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num -!dec$ attributes alias:'OMP_GET_TEAM_SIZE' :: omp_get_team_size -!dec$ attributes alias:'OMP_SET_SCHEDULE' :: omp_set_schedule -!dec$ attributes alias:'OMP_GET_SCHEDULE' :: omp_get_schedule -!dec$ attributes alias:'OMP_GET_WTIME' :: omp_get_wtime -!dec$ attributes alias:'OMP_GET_WTICK' :: omp_get_wtick - -!dec$ attributes alias:'omp_init_lock' :: omp_init_lock -!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock -!dec$ attributes alias:'omp_set_lock' :: omp_set_lock -!dec$ attributes alias:'omp_unset_lock' :: omp_unset_lock -!dec$ attributes alias:'omp_test_lock' :: omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock' :: omp_init_nest_lock -!dec$ attributes alias:'omp_destroy_nest_lock' :: omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock' :: omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock' :: omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock' :: omp_test_nest_lock - -!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'KMP_FREE'::kmp_free - -!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ else - -!*** -!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended. -!*** - -!dec$ attributes alias:'_OMP_SET_NUM_THREADS' :: omp_set_num_threads -!dec$ attributes alias:'_OMP_SET_DYNAMIC' :: omp_set_dynamic -!dec$ attributes alias:'_OMP_SET_NESTED' :: omp_set_nested -!dec$ attributes alias:'_OMP_GET_NUM_THREADS' :: omp_get_num_threads -!dec$ attributes alias:'_OMP_GET_MAX_THREADS' :: omp_get_max_threads -!dec$ attributes alias:'_OMP_GET_THREAD_NUM' :: omp_get_thread_num -!dec$ attributes alias:'_OMP_GET_NUM_PROCS' :: omp_get_num_procs -!dec$ attributes alias:'_OMP_IN_PARALLEL' :: omp_in_parallel -!dec$ attributes alias:'_OMP_GET_DYNAMIC' :: omp_get_dynamic -!dec$ attributes alias:'_OMP_GET_NESTED' :: omp_get_nested -!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit -!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels -!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels -!dec$ attributes alias:'_OMP_GET_LEVEL' :: omp_get_level -!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level -!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num -!dec$ attributes alias:'_OMP_GET_TEAM_SIZE' :: omp_get_team_size -!dec$ attributes alias:'_OMP_SET_SCHEDULE' :: omp_set_schedule -!dec$ attributes alias:'_OMP_GET_SCHEDULE' :: omp_get_schedule -!dec$ attributes alias:'_OMP_GET_WTIME' :: omp_get_wtime -!dec$ attributes alias:'_OMP_GET_WTICK' :: omp_get_wtick - -!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock -!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock' :: omp_set_lock -!dec$ attributes alias:'_omp_unset_lock' :: omp_unset_lock -!dec$ attributes alias:'_omp_test_lock' :: omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock' :: omp_init_nest_lock -!dec$ attributes alias:'_omp_destroy_nest_lock' :: omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock' :: omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock' :: omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock' :: omp_test_nest_lock - -!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'_KMP_FREE'::kmp_free - -!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ endif -!dec$ endif - -!dec$ if defined(__linux) - -!*** -!*** The Linux* OS entry points are in lowercase, with an underscore appended. -!*** - -!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'omp_get_level_'::omp_get_level -!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick - -!dec$ attributes alias:'omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'kmp_free_'::kmp_free - -!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off - -!dec$ endif - -!dec$ if defined(__APPLE__) - -!*** -!*** The Mac entry points are in lowercase, with an both an underscore -!*** appended and an underscore prepended. -!*** - -!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'_omp_get_level_'::omp_get_level -!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick - -!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'_kmp_free_'::kmp_free - -!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off - -!dec$ endif - - end module omp_lib - diff --git a/openmp/runtime/src/include/30/omp_lib.f90.var b/openmp/runtime/src/include/30/omp_lib.f90.var deleted file mode 100644 index f355e72..0000000 --- a/openmp/runtime/src/include/30/omp_lib.f90.var +++ /dev/null @@ -1,364 +0,0 @@ -! include/30/omp_lib.f90.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - - module omp_lib_kinds - - use, intrinsic :: iso_c_binding - - integer, parameter :: omp_integer_kind = c_int - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = c_float - integer, parameter :: kmp_double_kind = c_double - integer, parameter :: omp_lock_kind = c_intptr_t - integer, parameter :: omp_nest_lock_kind = c_intptr_t - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = c_intptr_t - integer, parameter :: kmp_size_t_kind = c_size_t - integer, parameter :: kmp_affinity_mask_kind = c_intptr_t - - end module omp_lib_kinds - - module omp_lib - - use omp_lib_kinds - - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*) kmp_build_date - parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' ) - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(nthreads) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: nthreads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(enable) bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind), value :: enable - end subroutine omp_set_dynamic - - subroutine omp_set_nested(enable) bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind), value :: enable - end subroutine omp_set_nested - - function omp_get_num_threads() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) :: omp_get_level - end function omp_get_level - - function omp_get_active_level() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) :: omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - integer (kind=omp_integer_kind), value :: level - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_team_size - integer (kind=omp_integer_kind), value :: level - end function omp_get_team_size - - subroutine omp_set_schedule(kind, modifier) bind(c) - use omp_lib_kinds - integer (kind=omp_sched_kind), value :: kind - integer (kind=omp_integer_kind), value :: modifier - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, modifier) bind(c) - use omp_lib_kinds - integer (kind=omp_sched_kind) :: kind - integer (kind=omp_integer_kind) :: modifier - end subroutine omp_get_schedule - - function omp_get_wtime() bind(c) - use omp_lib_kinds - real (kind=kmp_double_kind) omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick() bind(c) - use omp_lib_kinds - real (kind=kmp_double_kind) omp_get_wtick - end function omp_get_wtick - - subroutine omp_init_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_set_lock - - subroutine omp_unset_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_lock_kind) lockvar - end subroutine omp_unset_lock - - function omp_test_lock(lockvar) bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) lockvar - end function omp_test_lock - - subroutine omp_init_nest_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(lockvar) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) lockvar - end function omp_test_nest_lock - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) bind(c) - use omp_lib_kinds - integer (kind=kmp_size_t_kind), value :: size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() bind(c) - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() bind(c) - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() bind(c) - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) bind(c) - use, intrinsic :: iso_c_binding - character (kind=c_char) :: string(*) - end subroutine kmp_set_defaults - - function kmp_get_stacksize() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() bind(c) - use omp_lib_kinds - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - function kmp_set_affinity(mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) bind(c) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) bind(c) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind), value :: size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind), value :: size - integer (kind=kmp_size_t_kind), value :: alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind), value :: nelem - integer (kind=kmp_size_t_kind), value :: elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind), value :: ptr - integer (kind=kmp_size_t_kind), value :: size - end function kmp_realloc - - subroutine kmp_free(ptr) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind), value :: ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() bind(c) - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() bind(c) - end subroutine kmp_set_warnings_off - - end interface - - end module omp_lib diff --git a/openmp/runtime/src/include/30/omp_lib.h.var b/openmp/runtime/src/include/30/omp_lib.h.var deleted file mode 100644 index 66e7774..0000000 --- a/openmp/runtime/src/include/30/omp_lib.h.var +++ /dev/null @@ -1,648 +0,0 @@ -! include/30/omp_lib.h.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - -!*** -!*** Some of the directives for the following routine extend past column 72, -!*** so process this file in 132-column mode. -!*** - -!dec$ fixedformlinesize:132 - - integer, parameter :: omp_integer_kind = 4 - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = 4 - integer, parameter :: omp_lock_kind = int_ptr_kind() - integer, parameter :: omp_nest_lock_kind = int_ptr_kind() - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = int_ptr_kind() - integer, parameter :: kmp_size_t_kind = int_ptr_kind() - integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind() - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*) kmp_build_date - parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' ) - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(nthreads) - import - integer (kind=omp_integer_kind) nthreads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(enable) - import - logical (kind=omp_logical_kind) enable - end subroutine omp_set_dynamic - - subroutine omp_set_nested(enable) - import - logical (kind=omp_logical_kind) enable - end subroutine omp_set_nested - - function omp_get_num_threads() - import - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() - import - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() - import - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() - import - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() - import - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() - import - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() - import - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() - import - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() - import - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) - import - integer (kind=omp_integer_kind) max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() - import - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() - import - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() - import - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) - import - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) - import - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_team_size - end function omp_get_team_size - - subroutine omp_set_schedule(kind, modifier) - import - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) modifier - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, modifier) - import - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) modifier - end subroutine omp_get_schedule - - function omp_get_wtime() - double precision omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick () - double precision omp_get_wtick - end function omp_get_wtick - - subroutine omp_init_lock(lockvar) - import - integer (kind=omp_lock_kind) lockvar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(lockvar) - import - integer (kind=omp_lock_kind) lockvar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(lockvar) - import - integer (kind=omp_lock_kind) lockvar - end subroutine omp_set_lock - - subroutine omp_unset_lock(lockvar) - import - integer (kind=omp_lock_kind) lockvar - end subroutine omp_unset_lock - - function omp_test_lock(lockvar) - import - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) lockvar - end function omp_test_lock - - subroutine omp_init_nest_lock(lockvar) - import - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(lockvar) - import - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(lockvar) - import - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(lockvar) - import - integer (kind=omp_nest_lock_kind) lockvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(lockvar) - import - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) lockvar - end function omp_test_nest_lock - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) - import - integer (kind=omp_integer_kind) size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) - import - integer (kind=kmp_size_t_kind) size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) - import - integer (kind=omp_integer_kind) msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) - import - integer (kind=omp_integer_kind) libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) - character*(*) string - end subroutine kmp_set_defaults - - function kmp_get_stacksize() - import - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() - import - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() - import - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() - import - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - function kmp_set_affinity(mask) - import - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) - import - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() - import - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) - import - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) - import - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) - import - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) - import - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) - import - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) - import - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind) size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) - import - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind) size - integer (kind=kmp_size_t_kind) alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) - import - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind) nelem - integer (kind=kmp_size_t_kind) elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) - import - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind) ptr - integer (kind=kmp_size_t_kind) size - end function kmp_realloc - - subroutine kmp_free(ptr) - import - integer (kind=kmp_pointer_kind) ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() - end subroutine kmp_set_warnings_off - - end interface - -!dec$ if defined(_WIN32) -!dec$ if defined(_WIN64) .or. defined(_M_AMD64) - -!*** -!*** The Fortran entry points must be in uppercase, even if the /Qlowercase -!*** option is specified. The alias attribute ensures that the specified -!*** string is used as the entry point. -!*** -!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an -!*** underscore prepended. On the Windows* OS Intel(R) 64 -!*** architecture, no underscore is prepended. -!*** - -!dec$ attributes alias:'OMP_SET_NUM_THREADS'::omp_set_num_threads -!dec$ attributes alias:'OMP_SET_DYNAMIC'::omp_set_dynamic -!dec$ attributes alias:'OMP_SET_NESTED'::omp_set_nested -!dec$ attributes alias:'OMP_GET_NUM_THREADS'::omp_get_num_threads -!dec$ attributes alias:'OMP_GET_MAX_THREADS'::omp_get_max_threads -!dec$ attributes alias:'OMP_GET_THREAD_NUM'::omp_get_thread_num -!dec$ attributes alias:'OMP_GET_NUM_PROCS'::omp_get_num_procs -!dec$ attributes alias:'OMP_IN_PARALLEL'::omp_in_parallel -!dec$ attributes alias:'OMP_IN_FINAL'::omp_in_final -!dec$ attributes alias:'OMP_GET_DYNAMIC'::omp_get_dynamic -!dec$ attributes alias:'OMP_GET_NESTED'::omp_get_nested -!dec$ attributes alias:'OMP_GET_THREAD_LIMIT'::omp_get_thread_limit -!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS'::omp_set_max_active_levels -!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS'::omp_get_max_active_levels -!dec$ attributes alias:'OMP_GET_LEVEL'::omp_get_level -!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL'::omp_get_active_level -!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM'::omp_get_ancestor_thread_num -!dec$ attributes alias:'OMP_GET_TEAM_SIZE'::omp_get_team_size -!dec$ attributes alias:'OMP_SET_SCHEDULE'::omp_set_schedule -!dec$ attributes alias:'OMP_GET_SCHEDULE'::omp_get_schedule -!dec$ attributes alias:'OMP_GET_WTIME'::omp_get_wtime -!dec$ attributes alias:'OMP_GET_WTICK'::omp_get_wtick - -!dec$ attributes alias:'omp_init_lock'::omp_init_lock -!dec$ attributes alias:'omp_destroy_lock'::omp_destroy_lock -!dec$ attributes alias:'omp_set_lock'::omp_set_lock -!dec$ attributes alias:'omp_unset_lock'::omp_unset_lock -!dec$ attributes alias:'omp_test_lock'::omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock'::omp_init_nest_lock -!dec$ attributes alias:'omp_destroy_nest_lock'::omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock'::omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock'::omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock'::omp_test_nest_lock - -!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'KMP_SET_DEFAULTS'::kmp_set_defaults -!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'KMP_FREE'::kmp_free - -!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ else - -!*** -!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended. -!*** - -!dec$ attributes alias:'_OMP_SET_NUM_THREADS'::omp_set_num_threads -!dec$ attributes alias:'_OMP_SET_DYNAMIC'::omp_set_dynamic -!dec$ attributes alias:'_OMP_SET_NESTED'::omp_set_nested -!dec$ attributes alias:'_OMP_GET_NUM_THREADS'::omp_get_num_threads -!dec$ attributes alias:'_OMP_GET_MAX_THREADS'::omp_get_max_threads -!dec$ attributes alias:'_OMP_GET_THREAD_NUM'::omp_get_thread_num -!dec$ attributes alias:'_OMP_GET_NUM_PROCS'::omp_get_num_procs -!dec$ attributes alias:'_OMP_IN_PARALLEL'::omp_in_parallel -!dec$ attributes alias:'_OMP_IN_FINAL'::omp_in_final -!dec$ attributes alias:'_OMP_GET_DYNAMIC'::omp_get_dynamic -!dec$ attributes alias:'_OMP_GET_NESTED'::omp_get_nested -!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT'::omp_get_thread_limit -!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS'::omp_set_max_active_levels -!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS'::omp_get_max_active_levels -!dec$ attributes alias:'_OMP_GET_LEVEL'::omp_get_level -!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL'::omp_get_active_level -!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM'::omp_get_ancestor_thread_num -!dec$ attributes alias:'_OMP_GET_TEAM_SIZE'::omp_get_team_size -!dec$ attributes alias:'_OMP_SET_SCHEDULE'::omp_set_schedule -!dec$ attributes alias:'_OMP_GET_SCHEDULE'::omp_get_schedule -!dec$ attributes alias:'_OMP_GET_WTIME'::omp_get_wtime -!dec$ attributes alias:'_OMP_GET_WTICK'::omp_get_wtick - -!dec$ attributes alias:'_omp_init_lock'::omp_init_lock -!dec$ attributes alias:'_omp_destroy_lock'::omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock'::omp_set_lock -!dec$ attributes alias:'_omp_unset_lock'::omp_unset_lock -!dec$ attributes alias:'_omp_test_lock'::omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock'::omp_init_nest_lock -!dec$ attributes alias:'_omp_destroy_nest_lock'::omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock'::omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock'::omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock'::omp_test_nest_lock - -!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'_KMP_SET_DEFAULTS'::kmp_set_defaults -!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'_KMP_FREE'::kmp_free - -!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ endif -!dec$ endif - -!dec$ if defined(__linux) - -!*** -!*** The Linux* OS entry points are in lowercase, with an underscore appended. -!*** - -!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'omp_in_final_'::omp_in_final -!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'omp_get_level_'::omp_get_level -!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick - -!dec$ attributes alias:'omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'kmp_set_defaults_'::kmp_set_defaults -!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'kmp_free_'::kmp_free - -!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off - -!dec$ endif - -!dec$ if defined(__APPLE__) - -!*** -!*** The Mac entry points are in lowercase, with an both an underscore -!*** appended and an underscore prepended. -!*** - -!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'_omp_in_final_'::omp_in_final -!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'_omp_get_level_'::omp_get_level -!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick - -!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'_kmp_set_defaults_'::kmp_set_defaults -!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'_kmp_free_'::kmp_free - -!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off - -!dec$ endif - - diff --git a/openmp/runtime/src/include/40/omp.h.var b/openmp/runtime/src/include/40/omp.h.var deleted file mode 100644 index 977699d..0000000 --- a/openmp/runtime/src/include/40/omp.h.var +++ /dev/null @@ -1,160 +0,0 @@ -/* - * include/40/omp.h.var - */ - - -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - - -#ifndef __OMP_H -# define __OMP_H - -# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@ -# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@ -# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@ -# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@" - -# ifdef __cplusplus - extern "C" { -# endif - -# if defined(_WIN32) -# define __KAI_KMPC_CONVENTION __cdecl -# else -# define __KAI_KMPC_CONVENTION -# endif - - /* schedule kind constants */ - typedef enum omp_sched_t { - omp_sched_static = 1, - omp_sched_dynamic = 2, - omp_sched_guided = 3, - omp_sched_auto = 4 - } omp_sched_t; - - /* set API functions */ - extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int); - extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int); - extern void __KAI_KMPC_CONVENTION omp_set_nested (int); - extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int); - extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int); - - /* query API functions */ - extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void); - extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void); - extern int __KAI_KMPC_CONVENTION omp_get_nested (void); - extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void); - extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void); - extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void); - extern int __KAI_KMPC_CONVENTION omp_in_parallel (void); - extern int __KAI_KMPC_CONVENTION omp_in_final (void); - extern int __KAI_KMPC_CONVENTION omp_get_active_level (void); - extern int __KAI_KMPC_CONVENTION omp_get_level (void); - extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int); - extern int __KAI_KMPC_CONVENTION omp_get_team_size (int); - extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void); - extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void); - extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *); - - /* lock API functions */ - typedef struct omp_lock_t { - void * _lk; - } omp_lock_t; - - extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *); - extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *); - - /* nested lock API functions */ - typedef struct omp_nest_lock_t { - void * _lk; - } omp_nest_lock_t; - - extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *); - extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *); - - /* time API functions */ - extern double __KAI_KMPC_CONVENTION omp_get_wtime (void); - extern double __KAI_KMPC_CONVENTION omp_get_wtick (void); - - /* OpenMP 4.0 */ - extern int __KAI_KMPC_CONVENTION omp_get_default_device (void); - extern void __KAI_KMPC_CONVENTION omp_set_default_device (int); - extern int __KAI_KMPC_CONVENTION omp_is_initial_device (void); - extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void); - extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void); - extern int __KAI_KMPC_CONVENTION omp_get_team_num (void); - extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void); - -# include - /* kmp API functions */ - extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void); - extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int); - extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void); - extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t); - extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void); - extern int __KAI_KMPC_CONVENTION kmp_get_library (void); - extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int); - extern void __KAI_KMPC_CONVENTION kmp_set_library (int); - extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void); - extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void); - extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void); - extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *); - - /* Intel affinity API */ - typedef void * kmp_affinity_mask_t; - - extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void); - extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *); - extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *); - - /* OpenMP 4.0 affinity API */ - typedef enum omp_proc_bind_t { - omp_proc_bind_false = 0, - omp_proc_bind_true = 1, - omp_proc_bind_master = 2, - omp_proc_bind_close = 3, - omp_proc_bind_spread = 4 - } omp_proc_bind_t; - - extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void); - - extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t); - extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t); - extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t); - extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t); - extern void __KAI_KMPC_CONVENTION kmp_free (void *); - - extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void); - extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void); - -# undef __KAI_KMPC_CONVENTION - - /* Warning: - The following typedefs are not standard, deprecated and will be removed in a future release. - */ - typedef int omp_int_t; - typedef double omp_wtime_t; - -# ifdef __cplusplus - } -# endif - -#endif /* __OMP_H */ - diff --git a/openmp/runtime/src/include/40/omp_lib.f.var b/openmp/runtime/src/include/40/omp_lib.f.var deleted file mode 100644 index 132d014..0000000 --- a/openmp/runtime/src/include/40/omp_lib.f.var +++ /dev/null @@ -1,773 +0,0 @@ -! include/40/omp_lib.f.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - -!*** -!*** Some of the directives for the following routine extend past column 72, -!*** so process this file in 132-column mode. -!*** - -!dec$ fixedformlinesize:132 - - module omp_lib_kinds - - integer, parameter :: omp_integer_kind = 4 - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = 4 - integer, parameter :: omp_lock_kind = int_ptr_kind() - integer, parameter :: omp_nest_lock_kind = int_ptr_kind() - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: omp_proc_bind_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = int_ptr_kind() - integer, parameter :: kmp_size_t_kind = int_ptr_kind() - integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind() - integer, parameter :: kmp_cancel_kind = omp_integer_kind - - end module omp_lib_kinds - - module omp_lib - - use omp_lib_kinds - - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@' - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4 - - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(num_threads) - use omp_lib_kinds - integer (kind=omp_integer_kind) num_threads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(dynamic_threads) - use omp_lib_kinds - logical (kind=omp_logical_kind) dynamic_threads - end subroutine omp_set_dynamic - - subroutine omp_set_nested(nested) - use omp_lib_kinds - logical (kind=omp_logical_kind) nested - end subroutine omp_set_nested - - function omp_get_num_threads() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) - use omp_lib_kinds - integer (kind=omp_integer_kind) max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) - use omp_lib_kinds - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) - use omp_lib_kinds - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_team_size - end function omp_get_team_size - - subroutine omp_set_schedule(kind, chunk_size) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, chunk_size) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_get_schedule - - function omp_get_proc_bind() - use omp_lib_kinds - integer (kind=omp_proc_bind_kind) omp_get_proc_bind - end function omp_get_proc_bind - - function omp_get_wtime() - double precision omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick () - double precision omp_get_wtick - end function omp_get_wtick - - function omp_get_default_device() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_default_device - end function omp_get_default_device - - subroutine omp_set_default_device(device_num) - use omp_lib_kinds - integer (kind=omp_integer_kind) device_num - end subroutine omp_set_default_device - - function omp_get_num_devices() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_devices - end function omp_get_num_devices - - function omp_get_num_teams() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_teams - end function omp_get_num_teams - - function omp_get_team_num() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_team_num - end function omp_get_team_num - - function omp_get_cancellation() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_cancellation - end function omp_get_cancellation - - function omp_is_initial_device() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_is_initial_device - end function omp_is_initial_device - - subroutine omp_init_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_set_lock - - subroutine omp_unset_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_unset_lock - - function omp_test_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_lock -!DIR$ ENDIF - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) svar - end function omp_test_lock - - subroutine omp_init_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) nvar - end function omp_test_nest_lock - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) - use omp_lib_kinds - integer (kind=omp_integer_kind) size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) - use omp_lib_kinds - integer (kind=kmp_size_t_kind) size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) - use omp_lib_kinds - integer (kind=omp_integer_kind) msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) - use omp_lib_kinds - integer (kind=omp_integer_kind) libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) - character*(*) string - end subroutine kmp_set_defaults - - function kmp_get_stacksize() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() - use omp_lib_kinds - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - function kmp_set_affinity(mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind) size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind) size - integer (kind=kmp_size_t_kind) alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind) nelem - integer (kind=kmp_size_t_kind) elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind) ptr - integer (kind=kmp_size_t_kind) size - end function kmp_realloc - - subroutine kmp_free(ptr) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() - end subroutine kmp_set_warnings_off - - function kmp_get_cancellation_status(cancelkind) - use omp_lib_kinds - integer (kind=kmp_cancel_kind) cancelkind - logical (kind=omp_logical_kind) kmp_get_cancellation_status - end function kmp_get_cancellation_status - - end interface - -!dec$ if defined(_WIN32) -!dec$ if defined(_WIN64) .or. defined(_M_AMD64) - -!*** -!*** The Fortran entry points must be in uppercase, even if the /Qlowercase -!*** option is specified. The alias attribute ensures that the specified -!*** string is used as the entry point. -!*** -!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an -!*** underscore prepended. On the Windows* OS Intel(R) 64 -!*** architecture, no underscore is prepended. -!*** - -!dec$ attributes alias:'OMP_SET_NUM_THREADS' :: omp_set_num_threads -!dec$ attributes alias:'OMP_SET_DYNAMIC' :: omp_set_dynamic -!dec$ attributes alias:'OMP_SET_NESTED' :: omp_set_nested -!dec$ attributes alias:'OMP_GET_NUM_THREADS' :: omp_get_num_threads -!dec$ attributes alias:'OMP_GET_MAX_THREADS' :: omp_get_max_threads -!dec$ attributes alias:'OMP_GET_THREAD_NUM' :: omp_get_thread_num -!dec$ attributes alias:'OMP_GET_NUM_PROCS' :: omp_get_num_procs -!dec$ attributes alias:'OMP_IN_PARALLEL' :: omp_in_parallel -!dec$ attributes alias:'OMP_GET_DYNAMIC' :: omp_get_dynamic -!dec$ attributes alias:'OMP_GET_NESTED' :: omp_get_nested -!dec$ attributes alias:'OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit -!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels -!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels -!dec$ attributes alias:'OMP_GET_LEVEL' :: omp_get_level -!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level -!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num -!dec$ attributes alias:'OMP_GET_TEAM_SIZE' :: omp_get_team_size -!dec$ attributes alias:'OMP_SET_SCHEDULE' :: omp_set_schedule -!dec$ attributes alias:'OMP_GET_SCHEDULE' :: omp_get_schedule -!dec$ attributes alias:'OMP_GET_PROC_BIND' :: omp_get_proc_bind -!dec$ attributes alias:'OMP_GET_WTIME' :: omp_get_wtime -!dec$ attributes alias:'OMP_GET_WTICK' :: omp_get_wtick -!dec$ attributes alias:'OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device -!dec$ attributes alias:'OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device -!dec$ attributes alias:'OMP_GET_NUM_DEVICES' :: omp_get_num_devices -!dec$ attributes alias:'OMP_GET_NUM_TEAMS' :: omp_get_num_teams -!dec$ attributes alias:'OMP_GET_TEAM_NUM' :: omp_get_team_num -!dec$ attributes alias:'OMP_GET_CANCELLATION' :: omp_get_cancellation -!dec$ attributes alias:'OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device - -!dec$ attributes alias:'omp_init_lock' :: omp_init_lock -!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock -!dec$ attributes alias:'omp_set_lock' :: omp_set_lock -!dec$ attributes alias:'omp_unset_lock' :: omp_unset_lock -!dec$ attributes alias:'omp_test_lock' :: omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock' :: omp_init_nest_lock -!dec$ attributes alias:'omp_destroy_nest_lock' :: omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock' :: omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock' :: omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock' :: omp_test_nest_lock - -!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'KMP_FREE'::kmp_free - -!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ attributes alias:'KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status - -!dec$ else - -!*** -!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended. -!*** - -!dec$ attributes alias:'_OMP_SET_NUM_THREADS' :: omp_set_num_threads -!dec$ attributes alias:'_OMP_SET_DYNAMIC' :: omp_set_dynamic -!dec$ attributes alias:'_OMP_SET_NESTED' :: omp_set_nested -!dec$ attributes alias:'_OMP_GET_NUM_THREADS' :: omp_get_num_threads -!dec$ attributes alias:'_OMP_GET_MAX_THREADS' :: omp_get_max_threads -!dec$ attributes alias:'_OMP_GET_THREAD_NUM' :: omp_get_thread_num -!dec$ attributes alias:'_OMP_GET_NUM_PROCS' :: omp_get_num_procs -!dec$ attributes alias:'_OMP_IN_PARALLEL' :: omp_in_parallel -!dec$ attributes alias:'_OMP_GET_DYNAMIC' :: omp_get_dynamic -!dec$ attributes alias:'_OMP_GET_NESTED' :: omp_get_nested -!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit -!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels -!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels -!dec$ attributes alias:'_OMP_GET_LEVEL' :: omp_get_level -!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level -!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num -!dec$ attributes alias:'_OMP_GET_TEAM_SIZE' :: omp_get_team_size -!dec$ attributes alias:'_OMP_SET_SCHEDULE' :: omp_set_schedule -!dec$ attributes alias:'_OMP_GET_SCHEDULE' :: omp_get_schedule -!dec$ attributes alias:'_OMP_GET_PROC_BIND' :: omp_get_proc_bind -!dec$ attributes alias:'_OMP_GET_WTIME' :: omp_get_wtime -!dec$ attributes alias:'_OMP_GET_WTICK' :: omp_get_wtick -!dec$ attributes alias:'_OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device -!dec$ attributes alias:'_OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device -!dec$ attributes alias:'_OMP_GET_NUM_DEVICES' :: omp_get_num_devices -!dec$ attributes alias:'_OMP_GET_NUM_TEAMS' :: omp_get_num_teams -!dec$ attributes alias:'_OMP_GET_TEAM_NUM' :: omp_get_team_num -!dec$ attributes alias:'_OMP_GET_CANCELLATION' :: omp_get_cancellation -!dec$ attributes alias:'_OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device - -!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock -!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock' :: omp_set_lock -!dec$ attributes alias:'_omp_unset_lock' :: omp_unset_lock -!dec$ attributes alias:'_omp_test_lock' :: omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock' :: omp_init_nest_lock -!dec$ attributes alias:'_omp_destroy_nest_lock' :: omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock' :: omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock' :: omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock' :: omp_test_nest_lock - -!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'_KMP_FREE'::kmp_free - -!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ attributes alias:'_KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status - -!dec$ endif -!dec$ endif - -!dec$ if defined(__linux) - -!*** -!*** The Linux* OS entry points are in lowercase, with an underscore appended. -!*** - -!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'omp_get_level_'::omp_get_level -!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'omp_get_proc_bind_' :: omp_get_proc_bind -!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick -!dec$ attributes alias:'omp_get_default_device_'::omp_get_default_device -!dec$ attributes alias:'omp_set_default_device_'::omp_set_default_device -!dec$ attributes alias:'omp_get_num_devices_'::omp_get_num_devices -!dec$ attributes alias:'omp_get_num_teams_'::omp_get_num_teams -!dec$ attributes alias:'omp_get_team_num_'::omp_get_team_num -!dec$ attributes alias:'omp_get_cancellation_'::omp_get_cancellation -!dec$ attributes alias:'omp_is_initial_device_'::omp_is_initial_device - -!dec$ attributes alias:'omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'kmp_free_'::kmp_free - -!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off -!dec$ attributes alias:'kmp_get_cancellation_status_'::kmp_get_cancellation_status - -!dec$ endif - -!dec$ if defined(__APPLE__) - -!*** -!*** The Mac entry points are in lowercase, with an both an underscore -!*** appended and an underscore prepended. -!*** - -!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'_omp_get_level_'::omp_get_level -!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'_omp_get_proc_bind_' :: omp_get_proc_bind -!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick -!dec$ attributes alias:'_omp_get_num_teams_'::omp_get_num_teams -!dec$ attributes alias:'_omp_get_team_num_'::omp_get_team_num -!dec$ attributes alias:'_omp_get_cancellation_'::omp_get_cancellation -!dec$ attributes alias:'_omp_is_initial_device_'::omp_is_initial_device - -!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'_kmp_free_'::kmp_free - -!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off - -!dec$ attributes alias:'_kmp_get_cancellation_status_'::kmp_get_cancellation_status - -!dec$ endif - - end module omp_lib - diff --git a/openmp/runtime/src/include/40/omp_lib.f90.var b/openmp/runtime/src/include/40/omp_lib.f90.var deleted file mode 100644 index c790601..0000000 --- a/openmp/runtime/src/include/40/omp_lib.f90.var +++ /dev/null @@ -1,454 +0,0 @@ -! include/40/omp_lib.f90.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - - module omp_lib_kinds - - use, intrinsic :: iso_c_binding - - integer, parameter :: omp_integer_kind = c_int - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = c_float - integer, parameter :: kmp_double_kind = c_double - integer, parameter :: omp_lock_kind = c_intptr_t - integer, parameter :: omp_nest_lock_kind = c_intptr_t - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: omp_proc_bind_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = c_intptr_t - integer, parameter :: kmp_size_t_kind = c_size_t - integer, parameter :: kmp_affinity_mask_kind = c_intptr_t - integer, parameter :: kmp_cancel_kind = omp_integer_kind - - end module omp_lib_kinds - - module omp_lib - - use omp_lib_kinds - - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*) kmp_build_date - parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' ) - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4 - - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(num_threads) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: num_threads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(dynamic_threads) bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind), value :: dynamic_threads - end subroutine omp_set_dynamic - - subroutine omp_set_nested(nested) bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind), value :: nested - end subroutine omp_set_nested - - function omp_get_num_threads() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - integer (kind=omp_integer_kind), value :: level - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_team_size - integer (kind=omp_integer_kind), value :: level - end function omp_get_team_size - - subroutine omp_set_schedule(kind, chunk_size) bind(c) - use omp_lib_kinds - integer (kind=omp_sched_kind), value :: kind - integer (kind=omp_integer_kind), value :: chunk_size - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, chunk_size) bind(c) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_get_schedule - - function omp_get_proc_bind() bind(c) - use omp_lib_kinds - integer (kind=omp_proc_bind_kind) omp_get_proc_bind - end function omp_get_proc_bind - - function omp_get_wtime() bind(c) - use omp_lib_kinds - real (kind=kmp_double_kind) omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick() bind(c) - use omp_lib_kinds - real (kind=kmp_double_kind) omp_get_wtick - end function omp_get_wtick - - function omp_get_default_device() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_default_device - end function omp_get_default_device - - subroutine omp_set_default_device(device_num) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: device_num - end subroutine omp_set_default_device - - function omp_get_num_devices() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_devices - end function omp_get_num_devices - - function omp_get_num_teams() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_teams - end function omp_get_num_teams - - function omp_get_team_num() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_team_num - end function omp_get_team_num - - function omp_get_cancellation() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_cancellation - end function omp_get_cancellation - - function omp_is_initial_device() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_is_initial_device - end function omp_is_initial_device - - subroutine omp_init_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_set_lock - - subroutine omp_unset_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_unset_lock - - function omp_test_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_lock -!DIR$ ENDIF - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) svar - end function omp_test_lock - - subroutine omp_init_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) nvar - end function omp_test_nest_lock - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) bind(c) - use omp_lib_kinds - integer (kind=kmp_size_t_kind), value :: size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() bind(c) - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() bind(c) - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() bind(c) - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) bind(c) - use, intrinsic :: iso_c_binding - character (kind=c_char) :: string(*) - end subroutine kmp_set_defaults - - function kmp_get_stacksize() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() bind(c) - use omp_lib_kinds - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - function kmp_set_affinity(mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) bind(c) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) bind(c) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind), value :: size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind), value :: size - integer (kind=kmp_size_t_kind), value :: alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind), value :: nelem - integer (kind=kmp_size_t_kind), value :: elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind), value :: ptr - integer (kind=kmp_size_t_kind), value :: size - end function kmp_realloc - - subroutine kmp_free(ptr) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind), value :: ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() bind(c) - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() bind(c) - end subroutine kmp_set_warnings_off - - function kmp_get_cancellation_status(cancelkind) bind(c) - use omp_lib_kinds - integer (kind=kmp_cancel_kind), value :: cancelkind - logical (kind=omp_logical_kind) kmp_get_cancellation_status - end function kmp_get_cancellation_status - - end interface - - end module omp_lib diff --git a/openmp/runtime/src/include/40/omp_lib.h.var b/openmp/runtime/src/include/40/omp_lib.h.var deleted file mode 100644 index af35ceb..0000000 --- a/openmp/runtime/src/include/40/omp_lib.h.var +++ /dev/null @@ -1,566 +0,0 @@ -! include/40/omp_lib.h.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - -!*** -!*** Some of the directives for the following routine extend past column 72, -!*** so process this file in 132-column mode. -!*** - -!DIR$ fixedformlinesize:132 - - integer, parameter :: omp_integer_kind = 4 - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = 4 - integer, parameter :: omp_lock_kind = int_ptr_kind() - integer, parameter :: omp_nest_lock_kind = int_ptr_kind() - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: omp_proc_bind_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = int_ptr_kind() - integer, parameter :: kmp_size_t_kind = int_ptr_kind() - integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind() - - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*) kmp_build_date - parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' ) - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(num_threads) bind(c) - import - integer (kind=omp_integer_kind), value :: num_threads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(dynamic_threads) bind(c) - import - logical (kind=omp_logical_kind), value :: dynamic_threads - end subroutine omp_set_dynamic - - subroutine omp_set_nested(nested) bind(c) - import - logical (kind=omp_logical_kind), value :: nested - end subroutine omp_set_nested - - function omp_get_num_threads() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() bind(c) - import - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() bind(c) - import - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() bind(c) - import - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() bind(c) - import - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() bind(c) - import - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() bind(c) - import - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() bind(c) - import - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) bind(c) - import - integer (kind=omp_integer_kind), value :: max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() bind(c) - import - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() bind(c) - import - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() bind(c) - import - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) bind(c) - import - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - integer (kind=omp_integer_kind), value :: level - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) bind(c) - import - integer (kind=omp_integer_kind) omp_get_team_size - integer (kind=omp_integer_kind), value :: level - end function omp_get_team_size - - subroutine omp_set_schedule(kind, chunk_size) bind(c) - import - integer (kind=omp_sched_kind), value :: kind - integer (kind=omp_integer_kind), value :: chunk_size - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, chunk_size) bind(c) - import - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_get_schedule - - function omp_get_proc_bind() bind(c) - import - integer (kind=omp_proc_bind_kind) omp_get_proc_bind - end function omp_get_proc_bind - - function omp_get_wtime() bind(c) - double precision omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick() bind(c) - double precision omp_get_wtick - end function omp_get_wtick - - function omp_get_default_device() bind(c) - import - integer (kind=omp_integer_kind) omp_get_default_device - end function omp_get_default_device - - subroutine omp_set_default_device(device_num) bind(c) - import - integer (kind=omp_integer_kind), value :: device_num - end subroutine omp_set_default_device - - function omp_get_num_devices() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_devices - end function omp_get_num_devices - - function omp_get_num_teams() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_teams - end function omp_get_num_teams - - function omp_get_team_num() bind(c) - import - integer (kind=omp_integer_kind) omp_get_team_num - end function omp_get_team_num - - function omp_is_initial_device() bind(c) - import - logical (kind=omp_logical_kind) omp_is_initial_device - end function omp_is_initial_device - - subroutine omp_init_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_set_lock - - subroutine omp_unset_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_unset_lock - - function omp_test_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_lock -!DIR$ ENDIF - import - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) svar - end function omp_test_lock - - subroutine omp_init_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) nvar - end function omp_test_nest_lock - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) bind(c) - import - integer (kind=omp_integer_kind), value :: size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) bind(c) - import - integer (kind=kmp_size_t_kind), value :: size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) bind(c) - import - integer (kind=omp_integer_kind), value :: msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() bind(c) - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() bind(c) - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() bind(c) - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) bind(c) - import - integer (kind=omp_integer_kind), value :: libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) bind(c) - character string(*) - end subroutine kmp_set_defaults - - function kmp_get_stacksize() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() bind(c) - import - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - function kmp_set_affinity(mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) bind(c) - import - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) bind(c) - import - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind), value :: size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind), value :: size - integer (kind=kmp_size_t_kind), value :: alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind), value :: nelem - integer (kind=kmp_size_t_kind), value :: elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind), value :: ptr - integer (kind=kmp_size_t_kind), value :: size - end function kmp_realloc - - subroutine kmp_free(ptr) bind(c) - import - integer (kind=kmp_pointer_kind), value :: ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() bind(c) - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() bind(c) - end subroutine kmp_set_warnings_off - - end interface - -!DIR$ IF DEFINED (__INTEL_OFFLOAD) -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_num_threads -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_dynamic -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nested -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_threads -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_threads -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_num -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_procs -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_parallel -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_final -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_dynamic -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_nested -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_limit -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_max_active_levels -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_active_levels -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_level -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_active_level -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_ancestor_thread_num -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_size -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_schedule -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_schedule -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_proc_bind -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtime -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtick -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_default_device -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_default_device -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_is_initial_device -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_devices -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_teams -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_num -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize_s -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_blocktime -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_serial -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_turnaround -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_throughput -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_defaults -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize_s -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_blocktime -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_library -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_max_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_create_affinity_mask -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_destroy_affinity_mask -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity_mask_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_unset_affinity_mask_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_mask_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_malloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_aligned_malloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_calloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_realloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_free -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_on -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_off - -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!$omp declare target(omp_set_num_threads ) -!$omp declare target(omp_set_dynamic ) -!$omp declare target(omp_set_nested ) -!$omp declare target(omp_get_num_threads ) -!$omp declare target(omp_get_max_threads ) -!$omp declare target(omp_get_thread_num ) -!$omp declare target(omp_get_num_procs ) -!$omp declare target(omp_in_parallel ) -!$omp declare target(omp_in_final ) -!$omp declare target(omp_get_dynamic ) -!$omp declare target(omp_get_nested ) -!$omp declare target(omp_get_thread_limit ) -!$omp declare target(omp_set_max_active_levels ) -!$omp declare target(omp_get_max_active_levels ) -!$omp declare target(omp_get_level ) -!$omp declare target(omp_get_active_level ) -!$omp declare target(omp_get_ancestor_thread_num ) -!$omp declare target(omp_get_team_size ) -!$omp declare target(omp_set_schedule ) -!$omp declare target(omp_get_schedule ) -!$omp declare target(omp_get_proc_bind ) -!$omp declare target(omp_get_wtime ) -!$omp declare target(omp_get_wtick ) -!$omp declare target(omp_get_default_device ) -!$omp declare target(omp_set_default_device ) -!$omp declare target(omp_is_initial_device ) -!$omp declare target(omp_get_num_devices ) -!$omp declare target(omp_get_num_teams ) -!$omp declare target(omp_get_team_num ) -!$omp declare target(omp_init_lock ) -!$omp declare target(omp_destroy_lock ) -!$omp declare target(omp_set_lock ) -!$omp declare target(omp_unset_lock ) -!$omp declare target(omp_test_lock ) -!$omp declare target(omp_init_nest_lock ) -!$omp declare target(omp_destroy_nest_lock ) -!$omp declare target(omp_set_nest_lock ) -!$omp declare target(omp_unset_nest_lock ) -!$omp declare target(omp_test_nest_lock ) -!$omp declare target(kmp_set_stacksize ) -!$omp declare target(kmp_set_stacksize_s ) -!$omp declare target(kmp_set_blocktime ) -!$omp declare target(kmp_set_library_serial ) -!$omp declare target(kmp_set_library_turnaround ) -!$omp declare target(kmp_set_library_throughput ) -!$omp declare target(kmp_set_library ) -!$omp declare target(kmp_set_defaults ) -!$omp declare target(kmp_get_stacksize ) -!$omp declare target(kmp_get_stacksize_s ) -!$omp declare target(kmp_get_blocktime ) -!$omp declare target(kmp_get_library ) -!$omp declare target(kmp_set_affinity ) -!$omp declare target(kmp_get_affinity ) -!$omp declare target(kmp_get_affinity_max_proc ) -!$omp declare target(kmp_create_affinity_mask ) -!$omp declare target(kmp_destroy_affinity_mask ) -!$omp declare target(kmp_set_affinity_mask_proc ) -!$omp declare target(kmp_unset_affinity_mask_proc ) -!$omp declare target(kmp_get_affinity_mask_proc ) -!$omp declare target(kmp_malloc ) -!$omp declare target(kmp_aligned_malloc ) -!$omp declare target(kmp_calloc ) -!$omp declare target(kmp_realloc ) -!$omp declare target(kmp_free ) -!$omp declare target(kmp_set_warnings_on ) -!$omp declare target(kmp_set_warnings_off ) -!DIR$ ENDIF -!DIR$ ENDIF - diff --git a/openmp/runtime/src/include/45/omp.h.var b/openmp/runtime/src/include/45/omp.h.var deleted file mode 100644 index 2a1a10a..0000000 --- a/openmp/runtime/src/include/45/omp.h.var +++ /dev/null @@ -1,196 +0,0 @@ -/* - * include/45/omp.h.var - */ - - -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - - -#ifndef __OMP_H -# define __OMP_H - -# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@ -# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@ -# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@ -# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@" - -# ifdef __cplusplus - extern "C" { -# endif - -# if defined(_WIN32) -# define __KAI_KMPC_CONVENTION __cdecl -# else -# define __KAI_KMPC_CONVENTION -# endif - - /* schedule kind constants */ - typedef enum omp_sched_t { - omp_sched_static = 1, - omp_sched_dynamic = 2, - omp_sched_guided = 3, - omp_sched_auto = 4 - } omp_sched_t; - - /* set API functions */ - extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int); - extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int); - extern void __KAI_KMPC_CONVENTION omp_set_nested (int); - extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int); - extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int); - - /* query API functions */ - extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void); - extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void); - extern int __KAI_KMPC_CONVENTION omp_get_nested (void); - extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void); - extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void); - extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void); - extern int __KAI_KMPC_CONVENTION omp_in_parallel (void); - extern int __KAI_KMPC_CONVENTION omp_in_final (void); - extern int __KAI_KMPC_CONVENTION omp_get_active_level (void); - extern int __KAI_KMPC_CONVENTION omp_get_level (void); - extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int); - extern int __KAI_KMPC_CONVENTION omp_get_team_size (int); - extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void); - extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void); - extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *); - extern int __KAI_KMPC_CONVENTION omp_get_max_task_priority (void); - - /* lock API functions */ - typedef struct omp_lock_t { - void * _lk; - } omp_lock_t; - - extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *); - extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *); - - /* nested lock API functions */ - typedef struct omp_nest_lock_t { - void * _lk; - } omp_nest_lock_t; - - extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *); - extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *); - extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *); - - /* lock hint type for dynamic user lock */ - typedef enum omp_lock_hint_t { - omp_lock_hint_none = 0, - omp_lock_hint_uncontended = 1, - omp_lock_hint_contended = (1<<1 ), - omp_lock_hint_nonspeculative = (1<<2 ), - omp_lock_hint_speculative = (1<<3 ), - kmp_lock_hint_hle = (1<<16), - kmp_lock_hint_rtm = (1<<17), - kmp_lock_hint_adaptive = (1<<18) - } omp_lock_hint_t; - - /* hinted lock initializers */ - extern void __KAI_KMPC_CONVENTION omp_init_lock_with_hint(omp_lock_t *, omp_lock_hint_t); - extern void __KAI_KMPC_CONVENTION omp_init_nest_lock_with_hint(omp_nest_lock_t *, omp_lock_hint_t); - - /* time API functions */ - extern double __KAI_KMPC_CONVENTION omp_get_wtime (void); - extern double __KAI_KMPC_CONVENTION omp_get_wtick (void); - - /* OpenMP 4.0 */ - extern int __KAI_KMPC_CONVENTION omp_get_default_device (void); - extern void __KAI_KMPC_CONVENTION omp_set_default_device (int); - extern int __KAI_KMPC_CONVENTION omp_is_initial_device (void); - extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void); - extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void); - extern int __KAI_KMPC_CONVENTION omp_get_team_num (void); - extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void); - -# include - /* OpenMP 4.5 */ - extern int __KAI_KMPC_CONVENTION omp_get_initial_device (void); - extern void* __KAI_KMPC_CONVENTION omp_target_alloc(size_t, int); - extern void __KAI_KMPC_CONVENTION omp_target_free(void *, int); - extern int __KAI_KMPC_CONVENTION omp_target_is_present(void *, int); - extern int __KAI_KMPC_CONVENTION omp_target_memcpy(void *, void *, size_t, size_t, size_t, int, int); - extern int __KAI_KMPC_CONVENTION omp_target_memcpy_rect(void *, void *, size_t, int, const size_t *, - const size_t *, const size_t *, const size_t *, const size_t *, int, int); - extern int __KAI_KMPC_CONVENTION omp_target_associate_ptr(void *, void *, size_t, size_t, int); - extern int __KAI_KMPC_CONVENTION omp_target_disassociate_ptr(void *, int); - - /* kmp API functions */ - extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void); - extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int); - extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void); - extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t); - extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void); - extern int __KAI_KMPC_CONVENTION kmp_get_library (void); - extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int); - extern void __KAI_KMPC_CONVENTION kmp_set_library (int); - extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void); - extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void); - extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void); - extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *); - extern void __KAI_KMPC_CONVENTION kmp_set_disp_num_buffers (int); - - /* Intel affinity API */ - typedef void * kmp_affinity_mask_t; - - extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void); - extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *); - extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *); - extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *); - - /* OpenMP 4.0 affinity API */ - typedef enum omp_proc_bind_t { - omp_proc_bind_false = 0, - omp_proc_bind_true = 1, - omp_proc_bind_master = 2, - omp_proc_bind_close = 3, - omp_proc_bind_spread = 4 - } omp_proc_bind_t; - - extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void); - - /* OpenMP 4.5 affinity API */ - extern int __KAI_KMPC_CONVENTION omp_get_num_places (void); - extern int __KAI_KMPC_CONVENTION omp_get_place_num_procs (int); - extern void __KAI_KMPC_CONVENTION omp_get_place_proc_ids (int, int *); - extern int __KAI_KMPC_CONVENTION omp_get_place_num (void); - extern int __KAI_KMPC_CONVENTION omp_get_partition_num_places (void); - extern void __KAI_KMPC_CONVENTION omp_get_partition_place_nums (int *); - - extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t); - extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t); - extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t); - extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t); - extern void __KAI_KMPC_CONVENTION kmp_free (void *); - - extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void); - extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void); - -# undef __KAI_KMPC_CONVENTION - - /* Warning: - The following typedefs are not standard, deprecated and will be removed in a future release. - */ - typedef int omp_int_t; - typedef double omp_wtime_t; - -# ifdef __cplusplus - } -# endif - -#endif /* __OMP_H */ diff --git a/openmp/runtime/src/include/45/omp_lib.f.var b/openmp/runtime/src/include/45/omp_lib.f.var deleted file mode 100644 index 0123d21..0000000 --- a/openmp/runtime/src/include/45/omp_lib.f.var +++ /dev/null @@ -1,860 +0,0 @@ -! include/45/omp_lib.f.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - -!*** -!*** Some of the directives for the following routine extend past column 72, -!*** so process this file in 132-column mode. -!*** - -!dec$ fixedformlinesize:132 - - module omp_lib_kinds - - integer, parameter :: omp_integer_kind = 4 - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = 4 - integer, parameter :: omp_lock_kind = int_ptr_kind() - integer, parameter :: omp_nest_lock_kind = int_ptr_kind() - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: omp_proc_bind_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = int_ptr_kind() - integer, parameter :: kmp_size_t_kind = int_ptr_kind() - integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind() - integer, parameter :: kmp_cancel_kind = omp_integer_kind - integer, parameter :: omp_lock_hint_kind = omp_integer_kind - - end module omp_lib_kinds - - module omp_lib - - use omp_lib_kinds - - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@' - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4 - - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4 - - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_none = 0 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = 1 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_contended = 2 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = 4 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = 8 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_hle = 65536 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_rtm = 131072 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 262144 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(num_threads) - use omp_lib_kinds - integer (kind=omp_integer_kind) num_threads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(dynamic_threads) - use omp_lib_kinds - logical (kind=omp_logical_kind) dynamic_threads - end subroutine omp_set_dynamic - - subroutine omp_set_nested(nested) - use omp_lib_kinds - logical (kind=omp_logical_kind) nested - end subroutine omp_set_nested - - function omp_get_num_threads() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) - use omp_lib_kinds - integer (kind=omp_integer_kind) max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) - use omp_lib_kinds - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) - use omp_lib_kinds - integer (kind=omp_integer_kind) level - integer (kind=omp_integer_kind) omp_get_team_size - end function omp_get_team_size - - subroutine omp_set_schedule(kind, chunk_size) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, chunk_size) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_get_schedule - - function omp_get_proc_bind() - use omp_lib_kinds - integer (kind=omp_proc_bind_kind) omp_get_proc_bind - end function omp_get_proc_bind - - function omp_get_num_places() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_places - end function omp_get_num_places - - function omp_get_place_num_procs(place_num) - use omp_lib_kinds - integer (kind=omp_integer_kind) place_num - integer (kind=omp_integer_kind) omp_get_place_num_procs - end function omp_get_place_num_procs - - subroutine omp_get_place_proc_ids(place_num, ids) - use omp_lib_kinds - integer (kind=omp_integer_kind) place_num - integer (kind=omp_integer_kind) ids(*) - end subroutine omp_get_place_proc_ids - - function omp_get_place_num() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_place_num - end function omp_get_place_num - - function omp_get_partition_num_places() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_partition_num_places - end function omp_get_partition_num_places - - subroutine omp_get_partition_place_nums(place_nums) - use omp_lib_kinds - integer (kind=omp_integer_kind) place_nums(*) - end subroutine omp_get_partition_place_nums - - function omp_get_wtime() - double precision omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick () - double precision omp_get_wtick - end function omp_get_wtick - - function omp_get_default_device() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_default_device - end function omp_get_default_device - - subroutine omp_set_default_device(device_num) - use omp_lib_kinds - integer (kind=omp_integer_kind) device_num - end subroutine omp_set_default_device - - function omp_get_num_devices() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_devices - end function omp_get_num_devices - - function omp_get_num_teams() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_teams - end function omp_get_num_teams - - function omp_get_team_num() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_team_num - end function omp_get_team_num - - function omp_get_cancellation() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_cancellation - end function omp_get_cancellation - - function omp_is_initial_device() - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_is_initial_device - end function omp_is_initial_device - - function omp_get_initial_device() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_initial_device - end function omp_get_initial_device - - subroutine omp_init_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_set_lock - - subroutine omp_unset_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_unset_lock - - function omp_test_lock(svar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_lock -!DIR$ ENDIF - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) svar - end function omp_test_lock - - subroutine omp_init_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(nvar) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) nvar - end function omp_test_nest_lock - - function omp_get_max_task_priority() - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_task_priority - end function omp_get_max_task_priority - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) - use omp_lib_kinds - integer (kind=omp_integer_kind) size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) - use omp_lib_kinds - integer (kind=kmp_size_t_kind) size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) - use omp_lib_kinds - integer (kind=omp_integer_kind) msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) - use omp_lib_kinds - integer (kind=omp_integer_kind) libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) - character*(*) string - end subroutine kmp_set_defaults - - function kmp_get_stacksize() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() - use omp_lib_kinds - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - subroutine kmp_set_disp_num_buffers(num) - use omp_lib_kinds - integer (kind=omp_integer_kind) num - end subroutine kmp_set_disp_num_buffers - - function kmp_set_affinity(mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind) proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind) size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind) size - integer (kind=kmp_size_t_kind) alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind) nelem - integer (kind=kmp_size_t_kind) elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind) ptr - integer (kind=kmp_size_t_kind) size - end function kmp_realloc - - subroutine kmp_free(ptr) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() - end subroutine kmp_set_warnings_off - - function kmp_get_cancellation_status(cancelkind) - use omp_lib_kinds - integer (kind=kmp_cancel_kind) cancelkind - logical (kind=omp_logical_kind) kmp_get_cancellation_status - end function kmp_get_cancellation_status - - subroutine omp_init_lock_with_hint(svar, hint) - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - integer (kind=omp_lock_hint_kind) hint - end subroutine omp_init_lock_with_hint - - subroutine omp_init_nest_lock_with_hint(nvar, hint) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - integer (kind=omp_lock_hint_kind) hint - end subroutine omp_init_nest_lock_with_hint - - end interface - -!dec$ if defined(_WIN32) -!dec$ if defined(_WIN64) .or. defined(_M_AMD64) - -!*** -!*** The Fortran entry points must be in uppercase, even if the /Qlowercase -!*** option is specified. The alias attribute ensures that the specified -!*** string is used as the entry point. -!*** -!*** On the Windows* OS IA-32 architecture, the Fortran entry points have an -!*** underscore prepended. On the Windows* OS Intel(R) 64 -!*** architecture, no underscore is prepended. -!*** - -!dec$ attributes alias:'OMP_SET_NUM_THREADS' :: omp_set_num_threads -!dec$ attributes alias:'OMP_SET_DYNAMIC' :: omp_set_dynamic -!dec$ attributes alias:'OMP_SET_NESTED' :: omp_set_nested -!dec$ attributes alias:'OMP_GET_NUM_THREADS' :: omp_get_num_threads -!dec$ attributes alias:'OMP_GET_MAX_THREADS' :: omp_get_max_threads -!dec$ attributes alias:'OMP_GET_THREAD_NUM' :: omp_get_thread_num -!dec$ attributes alias:'OMP_GET_NUM_PROCS' :: omp_get_num_procs -!dec$ attributes alias:'OMP_IN_PARALLEL' :: omp_in_parallel -!dec$ attributes alias:'OMP_GET_DYNAMIC' :: omp_get_dynamic -!dec$ attributes alias:'OMP_GET_NESTED' :: omp_get_nested -!dec$ attributes alias:'OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit -!dec$ attributes alias:'OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels -!dec$ attributes alias:'OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels -!dec$ attributes alias:'OMP_GET_LEVEL' :: omp_get_level -!dec$ attributes alias:'OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level -!dec$ attributes alias:'OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num -!dec$ attributes alias:'OMP_GET_TEAM_SIZE' :: omp_get_team_size -!dec$ attributes alias:'OMP_SET_SCHEDULE' :: omp_set_schedule -!dec$ attributes alias:'OMP_GET_SCHEDULE' :: omp_get_schedule -!dec$ attributes alias:'OMP_GET_PROC_BIND' :: omp_get_proc_bind -!dec$ attributes alias:'OMP_GET_WTIME' :: omp_get_wtime -!dec$ attributes alias:'OMP_GET_WTICK' :: omp_get_wtick -!dec$ attributes alias:'OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device -!dec$ attributes alias:'OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device -!dec$ attributes alias:'OMP_GET_NUM_DEVICES' :: omp_get_num_devices -!dec$ attributes alias:'OMP_GET_NUM_TEAMS' :: omp_get_num_teams -!dec$ attributes alias:'OMP_GET_TEAM_NUM' :: omp_get_team_num -!dec$ attributes alias:'OMP_GET_CANCELLATION' :: omp_get_cancellation -!dec$ attributes alias:'OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device -!dec$ attributes alias:'OMP_GET_INITIAL_DEVICE' :: omp_get_initial_device -!dec$ attributes alias:'OMP_GET_MAX_TASK_PRIORITY' :: omp_get_max_task_priority - -!dec$ attributes alias:'omp_init_lock' :: omp_init_lock -!dec$ attributes alias:'omp_init_lock_with_hint' :: omp_init_lock_with_hint -!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock -!dec$ attributes alias:'omp_set_lock' :: omp_set_lock -!dec$ attributes alias:'omp_unset_lock' :: omp_unset_lock -!dec$ attributes alias:'omp_test_lock' :: omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock' :: omp_init_nest_lock -!dec$ attributes alias:'omp_init_nest_lock_with_hint' :: omp_init_nest_lock_with_hint -!dec$ attributes alias:'omp_destroy_nest_lock' :: omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock' :: omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock' :: omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock' :: omp_test_nest_lock - -!dec$ attributes alias:'KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'KMP_FREE'::kmp_free - -!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ attributes alias:'KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status - -!dec$ else - -!*** -!*** On Windows* OS IA-32 architecture, the Fortran entry points have an underscore prepended. -!*** - -!dec$ attributes alias:'_OMP_SET_NUM_THREADS' :: omp_set_num_threads -!dec$ attributes alias:'_OMP_SET_DYNAMIC' :: omp_set_dynamic -!dec$ attributes alias:'_OMP_SET_NESTED' :: omp_set_nested -!dec$ attributes alias:'_OMP_GET_NUM_THREADS' :: omp_get_num_threads -!dec$ attributes alias:'_OMP_GET_MAX_THREADS' :: omp_get_max_threads -!dec$ attributes alias:'_OMP_GET_THREAD_NUM' :: omp_get_thread_num -!dec$ attributes alias:'_OMP_GET_NUM_PROCS' :: omp_get_num_procs -!dec$ attributes alias:'_OMP_IN_PARALLEL' :: omp_in_parallel -!dec$ attributes alias:'_OMP_GET_DYNAMIC' :: omp_get_dynamic -!dec$ attributes alias:'_OMP_GET_NESTED' :: omp_get_nested -!dec$ attributes alias:'_OMP_GET_THREAD_LIMIT' :: omp_get_thread_limit -!dec$ attributes alias:'_OMP_SET_MAX_ACTIVE_LEVELS' :: omp_set_max_active_levels -!dec$ attributes alias:'_OMP_GET_MAX_ACTIVE_LEVELS' :: omp_get_max_active_levels -!dec$ attributes alias:'_OMP_GET_LEVEL' :: omp_get_level -!dec$ attributes alias:'_OMP_GET_ACTIVE_LEVEL' :: omp_get_active_level -!dec$ attributes alias:'_OMP_GET_ANCESTOR_THREAD_NUM' :: omp_get_ancestor_thread_num -!dec$ attributes alias:'_OMP_GET_TEAM_SIZE' :: omp_get_team_size -!dec$ attributes alias:'_OMP_SET_SCHEDULE' :: omp_set_schedule -!dec$ attributes alias:'_OMP_GET_SCHEDULE' :: omp_get_schedule -!dec$ attributes alias:'_OMP_GET_PROC_BIND' :: omp_get_proc_bind -!dec$ attributes alias:'_OMP_GET_WTIME' :: omp_get_wtime -!dec$ attributes alias:'_OMP_GET_WTICK' :: omp_get_wtick -!dec$ attributes alias:'_OMP_GET_DEFAULT_DEVICE' :: omp_get_default_device -!dec$ attributes alias:'_OMP_SET_DEFAULT_DEVICE' :: omp_set_default_device -!dec$ attributes alias:'_OMP_GET_NUM_DEVICES' :: omp_get_num_devices -!dec$ attributes alias:'_OMP_GET_NUM_TEAMS' :: omp_get_num_teams -!dec$ attributes alias:'_OMP_GET_TEAM_NUM' :: omp_get_team_num -!dec$ attributes alias:'_OMP_GET_CANCELLATION' :: omp_get_cancellation -!dec$ attributes alias:'_OMP_IS_INITIAL_DEVICE' :: omp_is_initial_device -!dec$ attributes alias:'_OMP_GET_INITIAL_DEVICE' :: omp_get_initial_device -!dec$ attributes alias:'_OMP_GET_MAX_TASK_PRIORTY' :: omp_get_max_task_priority - -!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock -!dec$ attributes alias:'_omp_init_lock_with_hint' :: omp_init_lock_with_hint -!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock' :: omp_set_lock -!dec$ attributes alias:'_omp_unset_lock' :: omp_unset_lock -!dec$ attributes alias:'_omp_test_lock' :: omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock' :: omp_init_nest_lock -!dec$ attributes alias:'_omp_init_nest_lock_with_hint' :: omp_init_nest_lock_with_hint -!dec$ attributes alias:'_omp_destroy_nest_lock' :: omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock' :: omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock' :: omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock' :: omp_test_nest_lock - -!dec$ attributes alias:'_KMP_SET_STACKSIZE'::kmp_set_stacksize -!dec$ attributes alias:'_KMP_SET_STACKSIZE_S'::kmp_set_stacksize_s -!dec$ attributes alias:'_KMP_SET_BLOCKTIME'::kmp_set_blocktime -!dec$ attributes alias:'_KMP_SET_LIBRARY_SERIAL'::kmp_set_library_serial -!dec$ attributes alias:'_KMP_SET_LIBRARY_TURNAROUND'::kmp_set_library_turnaround -!dec$ attributes alias:'_KMP_SET_LIBRARY_THROUGHPUT'::kmp_set_library_throughput -!dec$ attributes alias:'_KMP_SET_LIBRARY'::kmp_set_library -!dec$ attributes alias:'_KMP_GET_STACKSIZE'::kmp_get_stacksize -!dec$ attributes alias:'_KMP_GET_STACKSIZE_S'::kmp_get_stacksize_s -!dec$ attributes alias:'_KMP_GET_BLOCKTIME'::kmp_get_blocktime -!dec$ attributes alias:'_KMP_GET_LIBRARY'::kmp_get_library -!dec$ attributes alias:'_KMP_SET_AFFINITY'::kmp_set_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY'::kmp_get_affinity -!dec$ attributes alias:'_KMP_GET_AFFINITY_MAX_PROC'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_KMP_CREATE_AFFINITY_MASK'::kmp_create_affinity_mask -!dec$ attributes alias:'_KMP_DESTROY_AFFINITY_MASK'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_KMP_SET_AFFINITY_MASK_PROC'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_KMP_UNSET_AFFINITY_MASK_PROC'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_KMP_GET_AFFINITY_MASK_PROC'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_KMP_MALLOC'::kmp_malloc -!dec$ attributes alias:'_KMP_ALIGNED_MALLOC'::kmp_aligned_malloc -!dec$ attributes alias:'_KMP_CALLOC'::kmp_calloc -!dec$ attributes alias:'_KMP_REALLOC'::kmp_realloc -!dec$ attributes alias:'_KMP_FREE'::kmp_free - -!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on -!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off - -!dec$ attributes alias:'_KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status - -!dec$ endif -!dec$ endif - -!dec$ if defined(__linux) - -!*** -!*** The Linux* OS entry points are in lowercase, with an underscore appended. -!*** - -!dec$ attributes alias:'omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'omp_get_level_'::omp_get_level -!dec$ attributes alias:'omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'omp_get_proc_bind_' :: omp_get_proc_bind -!dec$ attributes alias:'omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'omp_get_wtick_'::omp_get_wtick -!dec$ attributes alias:'omp_get_default_device_'::omp_get_default_device -!dec$ attributes alias:'omp_set_default_device_'::omp_set_default_device -!dec$ attributes alias:'omp_get_num_devices_'::omp_get_num_devices -!dec$ attributes alias:'omp_get_num_teams_'::omp_get_num_teams -!dec$ attributes alias:'omp_get_team_num_'::omp_get_team_num -!dec$ attributes alias:'omp_get_cancellation_'::omp_get_cancellation -!dec$ attributes alias:'omp_is_initial_device_'::omp_is_initial_device -!dec$ attributes alias:'omp_get_initial_device_'::omp_get_initial_device -!dec$ attributes alias:'omp_get_max_task_priority_'::omp_get_max_task_priority - -!dec$ attributes alias:'omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'omp_init_lock_with_hint_'::omp_init_lock_with_hint -!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'omp_init_nest_lock_with_hint_'::omp_init_nest_lock_with_hint -!dec$ attributes alias:'omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'kmp_free_'::kmp_free - -!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off -!dec$ attributes alias:'kmp_get_cancellation_status_'::kmp_get_cancellation_status - -!dec$ endif - -!dec$ if defined(__APPLE__) - -!*** -!*** The Mac entry points are in lowercase, with an both an underscore -!*** appended and an underscore prepended. -!*** - -!dec$ attributes alias:'_omp_set_num_threads_'::omp_set_num_threads -!dec$ attributes alias:'_omp_set_dynamic_'::omp_set_dynamic -!dec$ attributes alias:'_omp_set_nested_'::omp_set_nested -!dec$ attributes alias:'_omp_get_num_threads_'::omp_get_num_threads -!dec$ attributes alias:'_omp_get_max_threads_'::omp_get_max_threads -!dec$ attributes alias:'_omp_get_thread_num_'::omp_get_thread_num -!dec$ attributes alias:'_omp_get_num_procs_'::omp_get_num_procs -!dec$ attributes alias:'_omp_in_parallel_'::omp_in_parallel -!dec$ attributes alias:'_omp_get_dynamic_'::omp_get_dynamic -!dec$ attributes alias:'_omp_get_nested_'::omp_get_nested -!dec$ attributes alias:'_omp_get_thread_limit_'::omp_get_thread_limit -!dec$ attributes alias:'_omp_set_max_active_levels_'::omp_set_max_active_levels -!dec$ attributes alias:'_omp_get_max_active_levels_'::omp_get_max_active_levels -!dec$ attributes alias:'_omp_get_level_'::omp_get_level -!dec$ attributes alias:'_omp_get_active_level_'::omp_get_active_level -!dec$ attributes alias:'_omp_get_ancestor_thread_num_'::omp_get_ancestor_thread_num -!dec$ attributes alias:'_omp_get_team_size_'::omp_get_team_size -!dec$ attributes alias:'_omp_set_schedule_'::omp_set_schedule -!dec$ attributes alias:'_omp_get_schedule_'::omp_get_schedule -!dec$ attributes alias:'_omp_get_proc_bind_' :: omp_get_proc_bind -!dec$ attributes alias:'_omp_get_wtime_'::omp_get_wtime -!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick -!dec$ attributes alias:'_omp_get_default_device_'::omp_get_default_device -!dec$ attributes alias:'_omp_set_default_device_'::omp_set_default_device -!dec$ attributes alias:'_omp_get_num_devices_'::omp_get_num_devices -!dec$ attributes alias:'_omp_get_num_teams_'::omp_get_num_teams -!dec$ attributes alias:'_omp_get_team_num_'::omp_get_team_num -!dec$ attributes alias:'_omp_get_cancellation_'::omp_get_cancellation -!dec$ attributes alias:'_omp_is_initial_device_'::omp_is_initial_device -!dec$ attributes alias:'_omp_get_initial_device_'::omp_get_initial_device -!dec$ attributes alias:'_omp_get_max_task_priorty_'::omp_get_max_task_priority - -!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock -!dec$ attributes alias:'_omp_init_lock_with_hint_'::omp_init_lock_with_hint -!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock -!dec$ attributes alias:'_omp_set_lock_'::omp_set_lock -!dec$ attributes alias:'_omp_unset_lock_'::omp_unset_lock -!dec$ attributes alias:'_omp_test_lock_'::omp_test_lock -!dec$ attributes alias:'_omp_init_nest_lock_'::omp_init_nest_lock -!dec$ attributes alias:'_omp_init_nest_lock_with_hint_'::omp_init_nest_lock_with_hint -!dec$ attributes alias:'_omp_destroy_nest_lock_'::omp_destroy_nest_lock -!dec$ attributes alias:'_omp_set_nest_lock_'::omp_set_nest_lock -!dec$ attributes alias:'_omp_unset_nest_lock_'::omp_unset_nest_lock -!dec$ attributes alias:'_omp_test_nest_lock_'::omp_test_nest_lock - -!dec$ attributes alias:'_kmp_set_stacksize_'::kmp_set_stacksize -!dec$ attributes alias:'_kmp_set_stacksize_s_'::kmp_set_stacksize_s -!dec$ attributes alias:'_kmp_set_blocktime_'::kmp_set_blocktime -!dec$ attributes alias:'_kmp_set_library_serial_'::kmp_set_library_serial -!dec$ attributes alias:'_kmp_set_library_turnaround_'::kmp_set_library_turnaround -!dec$ attributes alias:'_kmp_set_library_throughput_'::kmp_set_library_throughput -!dec$ attributes alias:'_kmp_set_library_'::kmp_set_library -!dec$ attributes alias:'_kmp_get_stacksize_'::kmp_get_stacksize -!dec$ attributes alias:'_kmp_get_stacksize_s_'::kmp_get_stacksize_s -!dec$ attributes alias:'_kmp_get_blocktime_'::kmp_get_blocktime -!dec$ attributes alias:'_kmp_get_library_'::kmp_get_library -!dec$ attributes alias:'_kmp_set_affinity_'::kmp_set_affinity -!dec$ attributes alias:'_kmp_get_affinity_'::kmp_get_affinity -!dec$ attributes alias:'_kmp_get_affinity_max_proc_'::kmp_get_affinity_max_proc -!dec$ attributes alias:'_kmp_create_affinity_mask_'::kmp_create_affinity_mask -!dec$ attributes alias:'_kmp_destroy_affinity_mask_'::kmp_destroy_affinity_mask -!dec$ attributes alias:'_kmp_set_affinity_mask_proc_'::kmp_set_affinity_mask_proc -!dec$ attributes alias:'_kmp_unset_affinity_mask_proc_'::kmp_unset_affinity_mask_proc -!dec$ attributes alias:'_kmp_get_affinity_mask_proc_'::kmp_get_affinity_mask_proc -!dec$ attributes alias:'_kmp_malloc_'::kmp_malloc -!dec$ attributes alias:'_kmp_aligned_malloc_'::kmp_aligned_malloc -!dec$ attributes alias:'_kmp_calloc_'::kmp_calloc -!dec$ attributes alias:'_kmp_realloc_'::kmp_realloc -!dec$ attributes alias:'_kmp_free_'::kmp_free - -!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on -!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off - -!dec$ attributes alias:'_kmp_get_cancellation_status_'::kmp_get_cancellation_status - -!dec$ endif - - end module omp_lib diff --git a/openmp/runtime/src/include/45/omp_lib.f90.var b/openmp/runtime/src/include/45/omp_lib.f90.var deleted file mode 100644 index 87bb4f0..0000000 --- a/openmp/runtime/src/include/45/omp_lib.f90.var +++ /dev/null @@ -1,523 +0,0 @@ -! include/45/omp_lib.f90.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - - module omp_lib_kinds - - use, intrinsic :: iso_c_binding - - integer, parameter :: omp_integer_kind = c_int - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = c_float - integer, parameter :: kmp_double_kind = c_double - integer, parameter :: omp_lock_kind = c_intptr_t - integer, parameter :: omp_nest_lock_kind = c_intptr_t - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: omp_proc_bind_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = c_intptr_t - integer, parameter :: kmp_size_t_kind = c_size_t - integer, parameter :: kmp_affinity_mask_kind = c_intptr_t - integer, parameter :: kmp_cancel_kind = omp_integer_kind - integer, parameter :: omp_lock_hint_kind = omp_integer_kind - - end module omp_lib_kinds - - module omp_lib - - use omp_lib_kinds - - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*) kmp_build_date - parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' ) - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4 - - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3 - integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4 - - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_none = 0 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = 1 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_contended = 2 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = 4 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = 8 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_hle = 65536 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_rtm = 131072 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 262144 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(num_threads) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: num_threads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(dynamic_threads) bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind), value :: dynamic_threads - end subroutine omp_set_dynamic - - subroutine omp_set_nested(nested) bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind), value :: nested - end subroutine omp_set_nested - - function omp_get_num_threads() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - integer (kind=omp_integer_kind), value :: level - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_team_size - integer (kind=omp_integer_kind), value :: level - end function omp_get_team_size - - subroutine omp_set_schedule(kind, chunk_size) bind(c) - use omp_lib_kinds - integer (kind=omp_sched_kind), value :: kind - integer (kind=omp_integer_kind), value :: chunk_size - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, chunk_size) bind(c) - use omp_lib_kinds - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_get_schedule - - function omp_get_proc_bind() bind(c) - use omp_lib_kinds - integer (kind=omp_proc_bind_kind) omp_get_proc_bind - end function omp_get_proc_bind - - function omp_get_num_places() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_places - end function omp_get_num_places - - function omp_get_place_num_procs(place_num) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: place_num - integer (kind=omp_integer_kind) omp_get_place_num_procs - end function omp_get_place_num_procs - - subroutine omp_get_place_proc_ids(place_num, ids) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: place_num - integer (kind=omp_integer_kind) ids(*) - end subroutine omp_get_place_proc_ids - - function omp_get_place_num() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_place_num - end function omp_get_place_num - - function omp_get_partition_num_places() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_partition_num_places - end function omp_get_partition_num_places - - subroutine omp_get_partition_place_nums(place_nums) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) place_nums(*) - end subroutine omp_get_partition_place_nums - - function omp_get_wtime() bind(c) - use omp_lib_kinds - real (kind=kmp_double_kind) omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick() bind(c) - use omp_lib_kinds - real (kind=kmp_double_kind) omp_get_wtick - end function omp_get_wtick - - function omp_get_default_device() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_default_device - end function omp_get_default_device - - subroutine omp_set_default_device(device_num) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: device_num - end subroutine omp_set_default_device - - function omp_get_num_devices() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_devices - end function omp_get_num_devices - - function omp_get_num_teams() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_num_teams - end function omp_get_num_teams - - function omp_get_team_num() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_team_num - end function omp_get_team_num - - function omp_get_cancellation() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_cancellation - end function omp_get_cancellation - - function omp_is_initial_device() bind(c) - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_is_initial_device - end function omp_is_initial_device - - function omp_get_initial_device() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_initial_device - end function omp_get_initial_device - - subroutine omp_init_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_set_lock - - subroutine omp_unset_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - end subroutine omp_unset_lock - - function omp_test_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_lock -!DIR$ ENDIF - use omp_lib_kinds - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) svar - end function omp_test_lock - - subroutine omp_init_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_nest_lock -!DIR$ ENDIF - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) nvar - end function omp_test_nest_lock - - function omp_get_max_task_priority() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) omp_get_max_task_priority - end function omp_get_max_task_priority - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) bind(c) - use omp_lib_kinds - integer (kind=kmp_size_t_kind), value :: size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() bind(c) - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() bind(c) - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() bind(c) - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) bind(c) - use, intrinsic :: iso_c_binding - character (kind=c_char) :: string(*) - end subroutine kmp_set_defaults - - function kmp_get_stacksize() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() bind(c) - use omp_lib_kinds - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - subroutine kmp_set_disp_num_buffers(num) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind), value :: num - end subroutine kmp_set_disp_num_buffers - - function kmp_set_affinity(mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) bind(c) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) bind(c) - use omp_lib_kinds - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) bind(c) - use omp_lib_kinds - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind), value :: size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind), value :: size - integer (kind=kmp_size_t_kind), value :: alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind), value :: nelem - integer (kind=kmp_size_t_kind), value :: elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind), value :: ptr - integer (kind=kmp_size_t_kind), value :: size - end function kmp_realloc - - subroutine kmp_free(ptr) bind(c) - use omp_lib_kinds - integer (kind=kmp_pointer_kind), value :: ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() bind(c) - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() bind(c) - end subroutine kmp_set_warnings_off - - function kmp_get_cancellation_status(cancelkind) bind(c) - use omp_lib_kinds - integer (kind=kmp_cancel_kind), value :: cancelkind - logical (kind=omp_logical_kind) kmp_get_cancellation_status - end function kmp_get_cancellation_status - - subroutine omp_init_lock_with_hint(svar, hint) bind(c) - use omp_lib_kinds - integer (kind=omp_lock_kind) svar - integer (kind=omp_lock_hint_kind), value :: hint - end subroutine omp_init_lock_with_hint - - subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c) - use omp_lib_kinds - integer (kind=omp_nest_lock_kind) nvar - integer (kind=omp_lock_hint_kind), value :: hint - end subroutine omp_init_nest_lock_with_hint - - end interface - - end module omp_lib diff --git a/openmp/runtime/src/include/45/omp_lib.h.var b/openmp/runtime/src/include/45/omp_lib.h.var deleted file mode 100644 index f9ded8c..0000000 --- a/openmp/runtime/src/include/45/omp_lib.h.var +++ /dev/null @@ -1,644 +0,0 @@ -! include/45/omp_lib.h.var - -! -!//===----------------------------------------------------------------------===// -!// -!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -!// See https://llvm.org/LICENSE.txt for license information. -!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -!// -!//===----------------------------------------------------------------------===// -! - -!*** -!*** Some of the directives for the following routine extend past column 72, -!*** so process this file in 132-column mode. -!*** - -!DIR$ fixedformlinesize:132 - - integer, parameter :: omp_integer_kind = 4 - integer, parameter :: omp_logical_kind = 4 - integer, parameter :: omp_real_kind = 4 - integer, parameter :: omp_lock_kind = int_ptr_kind() - integer, parameter :: omp_nest_lock_kind = int_ptr_kind() - integer, parameter :: omp_sched_kind = omp_integer_kind - integer, parameter :: omp_proc_bind_kind = omp_integer_kind - integer, parameter :: kmp_pointer_kind = int_ptr_kind() - integer, parameter :: kmp_size_t_kind = int_ptr_kind() - integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind() - integer, parameter :: omp_lock_hint_kind = omp_integer_kind - - integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@ - integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@ - integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@ - character(*) kmp_build_date - parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' ) - - integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1 - integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2 - integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3 - integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4 - - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3 - integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4 - - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_none = 0 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = 1 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_contended = 2 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = 4 - integer (kind=omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = 8 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_hle = 65536 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_rtm = 131072 - integer (kind=omp_lock_hint_kind), parameter :: kmp_lock_hint_adaptive = 262144 - - interface - -! *** -! *** omp_* entry points -! *** - - subroutine omp_set_num_threads(num_threads) bind(c) - import - integer (kind=omp_integer_kind), value :: num_threads - end subroutine omp_set_num_threads - - subroutine omp_set_dynamic(dynamic_threads) bind(c) - import - logical (kind=omp_logical_kind), value :: dynamic_threads - end subroutine omp_set_dynamic - - subroutine omp_set_nested(nested) bind(c) - import - logical (kind=omp_logical_kind), value :: nested - end subroutine omp_set_nested - - function omp_get_num_threads() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_threads - end function omp_get_num_threads - - function omp_get_max_threads() bind(c) - import - integer (kind=omp_integer_kind) omp_get_max_threads - end function omp_get_max_threads - - function omp_get_thread_num() bind(c) - import - integer (kind=omp_integer_kind) omp_get_thread_num - end function omp_get_thread_num - - function omp_get_num_procs() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_procs - end function omp_get_num_procs - - function omp_in_parallel() bind(c) - import - logical (kind=omp_logical_kind) omp_in_parallel - end function omp_in_parallel - - function omp_in_final() bind(c) - import - logical (kind=omp_logical_kind) omp_in_final - end function omp_in_final - - function omp_get_dynamic() bind(c) - import - logical (kind=omp_logical_kind) omp_get_dynamic - end function omp_get_dynamic - - function omp_get_nested() bind(c) - import - logical (kind=omp_logical_kind) omp_get_nested - end function omp_get_nested - - function omp_get_thread_limit() bind(c) - import - integer (kind=omp_integer_kind) omp_get_thread_limit - end function omp_get_thread_limit - - subroutine omp_set_max_active_levels(max_levels) bind(c) - import - integer (kind=omp_integer_kind), value :: max_levels - end subroutine omp_set_max_active_levels - - function omp_get_max_active_levels() bind(c) - import - integer (kind=omp_integer_kind) omp_get_max_active_levels - end function omp_get_max_active_levels - - function omp_get_level() bind(c) - import - integer (kind=omp_integer_kind) omp_get_level - end function omp_get_level - - function omp_get_active_level() bind(c) - import - integer (kind=omp_integer_kind) omp_get_active_level - end function omp_get_active_level - - function omp_get_ancestor_thread_num(level) bind(c) - import - integer (kind=omp_integer_kind) omp_get_ancestor_thread_num - integer (kind=omp_integer_kind), value :: level - end function omp_get_ancestor_thread_num - - function omp_get_team_size(level) bind(c) - import - integer (kind=omp_integer_kind) omp_get_team_size - integer (kind=omp_integer_kind), value :: level - end function omp_get_team_size - - subroutine omp_set_schedule(kind, chunk_size) bind(c) - import - integer (kind=omp_sched_kind), value :: kind - integer (kind=omp_integer_kind), value :: chunk_size - end subroutine omp_set_schedule - - subroutine omp_get_schedule(kind, chunk_size) bind(c) - import - integer (kind=omp_sched_kind) kind - integer (kind=omp_integer_kind) chunk_size - end subroutine omp_get_schedule - - function omp_get_proc_bind() bind(c) - import - integer (kind=omp_proc_bind_kind) omp_get_proc_bind - end function omp_get_proc_bind - - function omp_get_num_places() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_places - end function omp_get_num_places - - function omp_get_place_num_procs(place_num) bind(c) - import - integer (kind=omp_integer_kind), value :: place_num - integer (kind=omp_integer_kind) omp_get_place_num_procs - end function omp_get_place_num_procs - - subroutine omp_get_place_proc_ids(place_num, ids) bind(c) - import - integer (kind=omp_integer_kind), value :: place_num - integer (kind=omp_integer_kind) ids(*) - end subroutine omp_get_place_proc_ids - - function omp_get_place_num() bind(c) - import - integer (kind=omp_integer_kind) omp_get_place_num - end function omp_get_place_num - - function omp_get_partition_num_places() bind(c) - import - integer (kind=omp_integer_kind) omp_get_partition_num_places - end function omp_get_partition_num_places - - subroutine omp_get_partition_place_nums(place_nums) bind(c) - import - integer (kind=omp_integer_kind) place_nums(*) - end subroutine omp_get_partition_place_nums - - function omp_get_wtime() bind(c) - double precision omp_get_wtime - end function omp_get_wtime - - function omp_get_wtick() bind(c) - double precision omp_get_wtick - end function omp_get_wtick - - function omp_get_default_device() bind(c) - import - integer (kind=omp_integer_kind) omp_get_default_device - end function omp_get_default_device - - subroutine omp_set_default_device(device_num) bind(c) - import - integer (kind=omp_integer_kind), value :: device_num - end subroutine omp_set_default_device - - function omp_get_num_devices() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_devices - end function omp_get_num_devices - - function omp_get_num_teams() bind(c) - import - integer (kind=omp_integer_kind) omp_get_num_teams - end function omp_get_num_teams - - function omp_get_team_num() bind(c) - import - integer (kind=omp_integer_kind) omp_get_team_num - end function omp_get_team_num - - function omp_is_initial_device() bind(c) - import - logical (kind=omp_logical_kind) omp_is_initial_device - end function omp_is_initial_device - - function omp_get_initial_device() bind(c) - import - integer (kind=omp_integer_kind) omp_get_initial_device - end function omp_get_initial_device - - subroutine omp_init_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_init_lock - - subroutine omp_destroy_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_destroy_lock - - subroutine omp_set_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_set_lock - - subroutine omp_unset_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_lock -!DIR$ ENDIF - import - integer (kind=omp_lock_kind) svar - end subroutine omp_unset_lock - - function omp_test_lock(svar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_lock -!DIR$ ENDIF - import - logical (kind=omp_logical_kind) omp_test_lock - integer (kind=omp_lock_kind) svar - end function omp_test_lock - - subroutine omp_init_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_init_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_init_nest_lock - - subroutine omp_destroy_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_destroy_nest_lock - - subroutine omp_set_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_set_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_set_nest_lock - - subroutine omp_unset_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_unset_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_nest_lock_kind) nvar - end subroutine omp_unset_nest_lock - - function omp_test_nest_lock(nvar) bind(c) -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!DIR$ attributes known_intrinsic :: omp_test_nest_lock -!DIR$ ENDIF - import - integer (kind=omp_integer_kind) omp_test_nest_lock - integer (kind=omp_nest_lock_kind) nvar - end function omp_test_nest_lock - - function omp_get_max_task_priority() bind(c) - import - integer (kind=omp_integer_kind) omp_get_max_task_priority - end function omp_get_max_task_priority - -! *** -! *** kmp_* entry points -! *** - - subroutine kmp_set_stacksize(size) bind(c) - import - integer (kind=omp_integer_kind), value :: size - end subroutine kmp_set_stacksize - - subroutine kmp_set_stacksize_s(size) bind(c) - import - integer (kind=kmp_size_t_kind), value :: size - end subroutine kmp_set_stacksize_s - - subroutine kmp_set_blocktime(msec) bind(c) - import - integer (kind=omp_integer_kind), value :: msec - end subroutine kmp_set_blocktime - - subroutine kmp_set_library_serial() bind(c) - end subroutine kmp_set_library_serial - - subroutine kmp_set_library_turnaround() bind(c) - end subroutine kmp_set_library_turnaround - - subroutine kmp_set_library_throughput() bind(c) - end subroutine kmp_set_library_throughput - - subroutine kmp_set_library(libnum) bind(c) - import - integer (kind=omp_integer_kind), value :: libnum - end subroutine kmp_set_library - - subroutine kmp_set_defaults(string) bind(c) - character string(*) - end subroutine kmp_set_defaults - - function kmp_get_stacksize() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_stacksize - end function kmp_get_stacksize - - function kmp_get_stacksize_s() bind(c) - import - integer (kind=kmp_size_t_kind) kmp_get_stacksize_s - end function kmp_get_stacksize_s - - function kmp_get_blocktime() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_blocktime - end function kmp_get_blocktime - - function kmp_get_library() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_library - end function kmp_get_library - - subroutine kmp_set_disp_num_buffers(num) bind(c) - import - integer (kind=omp_integer_kind), value :: num - end subroutine kmp_set_disp_num_buffers - - function kmp_set_affinity(mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_set_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity - - function kmp_get_affinity(mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_get_affinity - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity - - function kmp_get_affinity_max_proc() bind(c) - import - integer (kind=omp_integer_kind) kmp_get_affinity_max_proc - end function kmp_get_affinity_max_proc - - subroutine kmp_create_affinity_mask(mask) bind(c) - import - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_create_affinity_mask - - subroutine kmp_destroy_affinity_mask(mask) bind(c) - import - integer (kind=kmp_affinity_mask_kind) mask - end subroutine kmp_destroy_affinity_mask - - function kmp_set_affinity_mask_proc(proc, mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_set_affinity_mask_proc - - function kmp_unset_affinity_mask_proc(proc, mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_unset_affinity_mask_proc - - function kmp_get_affinity_mask_proc(proc, mask) bind(c) - import - integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc - integer (kind=omp_integer_kind), value :: proc - integer (kind=kmp_affinity_mask_kind) mask - end function kmp_get_affinity_mask_proc - - function kmp_malloc(size) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_malloc - integer (kind=kmp_size_t_kind), value :: size - end function kmp_malloc - - function kmp_aligned_malloc(size, alignment) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_aligned_malloc - integer (kind=kmp_size_t_kind), value :: size - integer (kind=kmp_size_t_kind), value :: alignment - end function kmp_aligned_malloc - - function kmp_calloc(nelem, elsize) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_calloc - integer (kind=kmp_size_t_kind), value :: nelem - integer (kind=kmp_size_t_kind), value :: elsize - end function kmp_calloc - - function kmp_realloc(ptr, size) bind(c) - import - integer (kind=kmp_pointer_kind) kmp_realloc - integer (kind=kmp_pointer_kind), value :: ptr - integer (kind=kmp_size_t_kind), value :: size - end function kmp_realloc - - subroutine kmp_free(ptr) bind(c) - import - integer (kind=kmp_pointer_kind), value :: ptr - end subroutine kmp_free - - subroutine kmp_set_warnings_on() bind(c) - end subroutine kmp_set_warnings_on - - subroutine kmp_set_warnings_off() bind(c) - end subroutine kmp_set_warnings_off - - subroutine omp_init_lock_with_hint(svar, hint) bind(c) - import - integer (kind=omp_lock_kind) svar - integer (kind=omp_lock_hint_kind), value :: hint - end subroutine omp_init_lock_with_hint - - subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c) - import - integer (kind=omp_nest_lock_kind) nvar - integer (kind=omp_lock_hint_kind), value :: hint - end subroutine omp_init_nest_lock_with_hint - - end interface - -!DIR$ IF DEFINED (__INTEL_OFFLOAD) -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_num_threads -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_dynamic -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nested -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_threads -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_threads -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_num -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_procs -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_parallel -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_final -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_dynamic -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_nested -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_limit -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_max_active_levels -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_active_levels -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_level -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_active_level -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_ancestor_thread_num -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_size -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_schedule -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_schedule -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_proc_bind -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtime -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtick -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_default_device -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_default_device -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_is_initial_device -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_initial_device -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_devices -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_teams -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_num -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_nest_lock -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_task_priority -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize_s -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_blocktime -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_serial -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_turnaround -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_throughput -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_defaults -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize_s -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_blocktime -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_library -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_disp_num_buffers -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_max_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_create_affinity_mask -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_destroy_affinity_mask -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity_mask_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_unset_affinity_mask_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_mask_proc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_malloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_aligned_malloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_calloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_realloc -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_free -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_on -!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_off -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock_with_hint -!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock_with_hint - -!DIR$ IF(__INTEL_COMPILER.GE.1400) -!$omp declare target(omp_set_num_threads ) -!$omp declare target(omp_set_dynamic ) -!$omp declare target(omp_set_nested ) -!$omp declare target(omp_get_num_threads ) -!$omp declare target(omp_get_max_threads ) -!$omp declare target(omp_get_thread_num ) -!$omp declare target(omp_get_num_procs ) -!$omp declare target(omp_in_parallel ) -!$omp declare target(omp_in_final ) -!$omp declare target(omp_get_dynamic ) -!$omp declare target(omp_get_nested ) -!$omp declare target(omp_get_thread_limit ) -!$omp declare target(omp_set_max_active_levels ) -!$omp declare target(omp_get_max_active_levels ) -!$omp declare target(omp_get_level ) -!$omp declare target(omp_get_active_level ) -!$omp declare target(omp_get_ancestor_thread_num ) -!$omp declare target(omp_get_team_size ) -!$omp declare target(omp_set_schedule ) -!$omp declare target(omp_get_schedule ) -!$omp declare target(omp_get_proc_bind ) -!$omp declare target(omp_get_wtime ) -!$omp declare target(omp_get_wtick ) -!$omp declare target(omp_get_default_device ) -!$omp declare target(omp_set_default_device ) -!$omp declare target(omp_is_initial_device ) -!$omp declare target(omp_get_initial_device ) -!$omp declare target(omp_get_num_devices ) -!$omp declare target(omp_get_num_teams ) -!$omp declare target(omp_get_team_num ) -!$omp declare target(omp_init_lock ) -!$omp declare target(omp_destroy_lock ) -!$omp declare target(omp_set_lock ) -!$omp declare target(omp_unset_lock ) -!$omp declare target(omp_test_lock ) -!$omp declare target(omp_init_nest_lock ) -!$omp declare target(omp_destroy_nest_lock ) -!$omp declare target(omp_set_nest_lock ) -!$omp declare target(omp_unset_nest_lock ) -!$omp declare target(omp_test_nest_lock ) -!$omp declare target(omp_get_max_task_priority ) -!$omp declare target(kmp_set_stacksize ) -!$omp declare target(kmp_set_stacksize_s ) -!$omp declare target(kmp_set_blocktime ) -!$omp declare target(kmp_set_library_serial ) -!$omp declare target(kmp_set_library_turnaround ) -!$omp declare target(kmp_set_library_throughput ) -!$omp declare target(kmp_set_library ) -!$omp declare target(kmp_set_defaults ) -!$omp declare target(kmp_get_stacksize ) -!$omp declare target(kmp_get_stacksize_s ) -!$omp declare target(kmp_get_blocktime ) -!$omp declare target(kmp_get_library ) -!$omp declare target(kmp_set_disp_num_buffers ) -!$omp declare target(kmp_set_affinity ) -!$omp declare target(kmp_get_affinity ) -!$omp declare target(kmp_get_affinity_max_proc ) -!$omp declare target(kmp_create_affinity_mask ) -!$omp declare target(kmp_destroy_affinity_mask ) -!$omp declare target(kmp_set_affinity_mask_proc ) -!$omp declare target(kmp_unset_affinity_mask_proc ) -!$omp declare target(kmp_get_affinity_mask_proc ) -!$omp declare target(kmp_malloc ) -!$omp declare target(kmp_aligned_malloc ) -!$omp declare target(kmp_calloc ) -!$omp declare target(kmp_realloc ) -!$omp declare target(kmp_free ) -!$omp declare target(kmp_set_warnings_on ) -!$omp declare target(kmp_set_warnings_off ) -!$omp declare target(omp_init_lock_with_hint ) -!$omp declare target(omp_init_nest_lock_with_hint ) -!DIR$ ENDIF -!DIR$ ENDIF diff --git a/openmp/runtime/src/include/50/omp-tools.h.var b/openmp/runtime/src/include/omp-tools.h.var similarity index 99% rename from openmp/runtime/src/include/50/omp-tools.h.var rename to openmp/runtime/src/include/omp-tools.h.var index d04a2b7..190b538 100644 --- a/openmp/runtime/src/include/50/omp-tools.h.var +++ b/openmp/runtime/src/include/omp-tools.h.var @@ -1,5 +1,5 @@ /* - * include/50/omp-tools.h.var + * include/omp-tools.h.var */ //===----------------------------------------------------------------------===// @@ -371,7 +371,7 @@ typedef enum ompt_frame_flag_t { ompt_frame_cfa = 0x10, ompt_frame_framepointer = 0x20, ompt_frame_stackaddress = 0x30 -} ompt_frame_flag_t; +} ompt_frame_flag_t; typedef enum ompt_state_t { ompt_state_work_serial = 0x000, @@ -720,14 +720,14 @@ typedef void (*ompt_callback_dispatch_t) ( ompt_data_t *parallel_data, ompt_data_t *task_data, ompt_dispatch_t kind, - ompt_data_t instance + ompt_data_t instance ); typedef struct ompt_record_dispatch_t { ompt_id_t parallel_id; ompt_id_t task_id; ompt_dispatch_t kind; - ompt_data_t instance; + ompt_data_t instance; } ompt_record_dispatch_t; typedef void (*ompt_callback_task_create_t) ( diff --git a/openmp/runtime/src/include/50/omp.h.var b/openmp/runtime/src/include/omp.h.var similarity index 99% rename from openmp/runtime/src/include/50/omp.h.var rename to openmp/runtime/src/include/omp.h.var index dc237a2..54ba1f5 100644 --- a/openmp/runtime/src/include/50/omp.h.var +++ b/openmp/runtime/src/include/omp.h.var @@ -1,5 +1,5 @@ /* - * include/50/omp.h.var + * include/omp.h.var */ diff --git a/openmp/runtime/src/include/50/omp_lib.f.var b/openmp/runtime/src/include/omp_lib.f.var similarity index 99% rename from openmp/runtime/src/include/50/omp_lib.f.var rename to openmp/runtime/src/include/omp_lib.f.var index 85c1cf0..19f14d7 100644 --- a/openmp/runtime/src/include/50/omp_lib.f.var +++ b/openmp/runtime/src/include/omp_lib.f.var @@ -1,4 +1,4 @@ -! include/50/omp_lib.f.var +! include/omp_lib.f.var ! !//===----------------------------------------------------------------------===// diff --git a/openmp/runtime/src/include/50/omp_lib.f90.var b/openmp/runtime/src/include/omp_lib.f90.var similarity index 99% rename from openmp/runtime/src/include/50/omp_lib.f90.var rename to openmp/runtime/src/include/omp_lib.f90.var index ba266de..ac56848 100644 --- a/openmp/runtime/src/include/50/omp_lib.f90.var +++ b/openmp/runtime/src/include/omp_lib.f90.var @@ -1,4 +1,4 @@ -! include/50/omp_lib.f90.var +! include/omp_lib.f90.var ! !//===----------------------------------------------------------------------===// diff --git a/openmp/runtime/src/include/50/omp_lib.h.var b/openmp/runtime/src/include/omp_lib.h.var similarity index 99% rename from openmp/runtime/src/include/50/omp_lib.h.var rename to openmp/runtime/src/include/omp_lib.h.var index 53964a9..8775128 100644 --- a/openmp/runtime/src/include/50/omp_lib.h.var +++ b/openmp/runtime/src/include/omp_lib.h.var @@ -1,4 +1,4 @@ -! include/50/omp_lib.h.var +! include/omp_lib.h.var ! !//===----------------------------------------------------------------------===// diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h index 3db2754..fdb9dbb 100644 --- a/openmp/runtime/src/kmp.h +++ b/openmp/runtime/src/kmp.h @@ -136,10 +136,8 @@ typedef unsigned int kmp_hwloc_depth_t; #include "ompt-internal.h" #endif -#if OMP_50_ENABLED // Affinity format function #include "kmp_str.h" -#endif // 0 - no fast memory allocation, alignment: 8-byte on x86, 16-byte on x64. // 3 - fast allocation using sync, non-sync free lists of any size, non-self @@ -153,15 +151,8 @@ typedef unsigned int kmp_hwloc_depth_t; #define USE_NESTED_HOT_ARG(x) #else #if KMP_NESTED_HOT_TEAMS -#if OMP_40_ENABLED #define USE_NESTED_HOT_ARG(x) , x #else -// Nested hot teams feature depends on omp 4.0, disable it for earlier versions -#undef KMP_NESTED_HOT_TEAMS -#define KMP_NESTED_HOT_TEAMS 0 -#define USE_NESTED_HOT_ARG(x) -#endif -#else #define USE_NESTED_HOT_ARG(x) #endif #endif @@ -361,12 +352,10 @@ enum sched_type : kmp_int32 { /* accessible only through KMP_SCHEDULE environment variable */ kmp_sch_static_steal = 44, -#if OMP_45_ENABLED /* static with chunk adjustment (e.g., simd) */ kmp_sch_static_balanced_chunked = 45, kmp_sch_guided_simd = 46, /**< guided with chunk adjustment */ kmp_sch_runtime_simd = 47, /**< runtime with chunk adjustment */ -#endif /* accessible only through KMP_SCHEDULE environment variable */ kmp_sch_upper, /**< upper bound for unordered values */ @@ -381,11 +370,9 @@ enum sched_type : kmp_int32 { kmp_ord_trapezoidal = 71, kmp_ord_upper, /**< upper bound for ordered values */ -#if OMP_40_ENABLED /* Schedules for Distribute construct */ kmp_distribute_static_chunked = 91, /**< distribute static chunked */ kmp_distribute_static = 92, /**< distribute static unspecialized */ -#endif /* For the "nomerge" versions, kmp_dispatch_next*() will always return a single iteration/chunk, even if the loop is serialized. For the schedule @@ -420,7 +407,6 @@ enum sched_type : kmp_int32 { kmp_nm_ord_trapezoidal = 199, kmp_nm_upper, /**< upper bound for nomerge values */ -#if OMP_45_ENABLED /* Support for OpenMP 4.5 monotonic and nonmonotonic schedule modifiers. Since we need to distinguish the three possible cases (no modifier, monotonic modifier, nonmonotonic modifier), we need separate bits for each modifier. @@ -452,17 +438,6 @@ enum sched_type : kmp_int32 { (s) & (kmp_sch_modifier_nonmonotonic | kmp_sch_modifier_monotonic))) #define SCHEDULE_SET_MODIFIERS(s, m) \ (s = (enum sched_type)((kmp_int32)s | (kmp_int32)m)) -#else -/* By doing this we hope to avoid multiple tests on OMP_45_ENABLED. Compilers - can now eliminate tests on compile time constants and dead code that results - from them, so we can leave code guarded by such an if in place. */ -#define SCHEDULE_WITHOUT_MODIFIERS(s) (s) -#define SCHEDULE_HAS_MONOTONIC(s) false -#define SCHEDULE_HAS_NONMONOTONIC(s) false -#define SCHEDULE_HAS_NO_MODIFIERS(s) true -#define SCHEDULE_GET_MODIFIERS(s) ((enum sched_type)0) -#define SCHEDULE_SET_MODIFIERS(s, m) /* Nothing */ -#endif #define SCHEDULE_NONMONOTONIC 0 #define SCHEDULE_MONOTONIC 1 @@ -473,32 +448,24 @@ enum sched_type : kmp_int32 { static inline void __kmp_sched_apply_mods_stdkind(kmp_sched_t *kind, enum sched_type internal_kind) { -#if OMP_50_ENABLED if (SCHEDULE_HAS_MONOTONIC(internal_kind)) { *kind = (kmp_sched_t)((int)*kind | (int)kmp_sched_monotonic); } -#endif } // Apply modifiers on standard kind to internal kind static inline void __kmp_sched_apply_mods_intkind(kmp_sched_t kind, enum sched_type *internal_kind) { -#if OMP_50_ENABLED if ((int)kind & (int)kmp_sched_monotonic) { *internal_kind = (enum sched_type)((int)*internal_kind | (int)kmp_sch_modifier_monotonic); } -#endif } // Get standard schedule without modifiers static inline kmp_sched_t __kmp_sched_without_mods(kmp_sched_t kind) { -#if OMP_50_ENABLED return (kmp_sched_t)((int)kind & ~((int)kmp_sched_monotonic)); -#else - return kind; -#endif } /* Type to keep runtime schedule set via OMP_SCHEDULE or omp_set_schedule() */ @@ -828,8 +795,6 @@ extern char *__kmp_cpuinfo_file; #endif /* KMP_AFFINITY_SUPPORTED */ -#if OMP_40_ENABLED - // This needs to be kept in sync with the values in omp.h !!! typedef enum kmp_proc_bind_t { proc_bind_false = 0, @@ -849,13 +814,9 @@ typedef struct kmp_nested_proc_bind_t { extern kmp_nested_proc_bind_t __kmp_nested_proc_bind; -#endif /* OMP_40_ENABLED */ - -#if OMP_50_ENABLED extern int __kmp_display_affinity; extern char *__kmp_affinity_format; static const size_t KMP_AFFINITY_FORMAT_SIZE = 512; -#endif // OMP_50_ENABLED #if KMP_AFFINITY_SUPPORTED #define KMP_PLACE_ALL (-1) @@ -869,7 +830,6 @@ static const size_t KMP_AFFINITY_FORMAT_SIZE = 512; extern int __kmp_affinity_num_places; -#if OMP_40_ENABLED typedef enum kmp_cancel_kind_t { cancel_noreq = 0, cancel_parallel = 1, @@ -877,7 +837,6 @@ typedef enum kmp_cancel_kind_t { cancel_sections = 3, cancel_taskgroup = 4 } kmp_cancel_kind_t; -#endif // OMP_40_ENABLED // KMP_HW_SUBSET support: typedef struct kmp_hws_item { @@ -906,7 +865,6 @@ extern int __kmp_hws_abs_flag; // absolute or per-item number requested #define KMP_GTID_UNKNOWN (-5) /* Is not known */ #define KMP_GTID_MIN (-6) /* Minimal gtid for low bound check in DEBUG */ -#if OMP_50_ENABLED /* OpenMP 5.0 Memory Management support */ #ifndef __OMP_H @@ -1000,7 +958,6 @@ extern void __kmpc_free(int gtid, void *ptr, omp_allocator_handle_t al); extern void __kmp_init_memkind(); extern void __kmp_fini_memkind(); -#endif // OMP_50_ENABLED /* ------------------------------------------------------------------------ */ @@ -1738,11 +1695,9 @@ typedef struct dispatch_shared_info { dispatch_shared_info64_t s64; } u; volatile kmp_uint32 buffer_index; -#if OMP_45_ENABLED volatile kmp_int32 doacross_buf_idx; // teamwise index volatile kmp_uint32 *doacross_flags; // shared array of iteration flags (0/1) kmp_int32 doacross_num_done; // count finished threads -#endif #if KMP_USE_HIER_SCHED void *hier; #endif @@ -1765,7 +1720,6 @@ typedef struct kmp_disp { dispatch_private_info_t *th_disp_buffer; kmp_int32 th_disp_index; -#if OMP_45_ENABLED kmp_int32 th_doacross_buf_idx; // thread's doacross buffer index volatile kmp_uint32 *th_doacross_flags; // pointer to shared array of flags union { // we can use union here because doacross cannot be used in @@ -1773,14 +1727,6 @@ typedef struct kmp_disp { kmp_int64 *th_doacross_info; // info on loop bounds kmp_lock_t *th_steal_lock; // lock used for chunk stealing (8-byte variable) }; -#else -#if KMP_STATIC_STEAL_ENABLED - kmp_lock_t *th_steal_lock; // lock used for chunk stealing (8-byte variable) - void *dummy_padding[1]; // make it 64 bytes on Intel(R) 64 -#else - void *dummy_padding[2]; // make it 64 bytes on Intel(R) 64 -#endif -#endif #if KMP_USE_INTERNODE_ALIGNMENT char more_padding[INTERNODE_CACHE_LINE]; #endif @@ -1868,10 +1814,8 @@ typedef struct kmp_internal_control { int max_active_levels; /* internal control for max_active_levels */ kmp_r_sched_t sched; /* internal control for runtime schedule {sched,chunk} pair */ -#if OMP_40_ENABLED kmp_proc_bind_t proc_bind; /* internal control for affinity */ kmp_int32 default_device; /* internal control for default device */ -#endif // OMP_40_ENABLED struct kmp_internal_control *next; } kmp_internal_control_t; @@ -2100,15 +2044,11 @@ typedef struct kmp_local { #define set__sched(xthread, xval) \ (((xthread)->th.th_current_task->td_icvs.sched) = (xval)) -#if OMP_40_ENABLED - #define set__proc_bind(xthread, xval) \ (((xthread)->th.th_current_task->td_icvs.proc_bind) = (xval)) #define get__proc_bind(xthread) \ ((xthread)->th.th_current_task->td_icvs.proc_bind) -#endif /* OMP_40_ENABLED */ - // OpenMP tasking data structures typedef enum kmp_tasking_mode { @@ -2122,16 +2062,12 @@ extern kmp_tasking_mode_t __kmp_tasking_mode; /* determines how/when to execute tasks */ extern int __kmp_task_stealing_constraint; extern int __kmp_enable_task_throttling; -#if OMP_40_ENABLED extern kmp_int32 __kmp_default_device; // Set via OMP_DEFAULT_DEVICE if // specified, defaults to 0 otherwise -#endif -#if OMP_45_ENABLED // Set via OMP_MAX_TASK_PRIORITY if specified, defaults to 0 otherwise extern kmp_int32 __kmp_max_task_priority; // Set via KMP_TASKLOOP_MIN_TASKS if specified, defaults to 0 otherwise extern kmp_uint64 __kmp_taskloop_min_tasks; -#endif /* NOTE: kmp_taskdata_t and kmp_task_t structures allocated in single block with taskdata first */ @@ -2151,19 +2087,13 @@ extern kmp_uint64 __kmp_taskloop_min_tasks; */ typedef kmp_int32 (*kmp_routine_entry_t)(kmp_int32, void *); -#if OMP_40_ENABLED || OMP_45_ENABLED typedef union kmp_cmplrdata { -#if OMP_45_ENABLED kmp_int32 priority; /**< priority specified by user for the task */ -#endif // OMP_45_ENABLED -#if OMP_40_ENABLED kmp_routine_entry_t destructors; /* pointer to function to invoke deconstructors of firstprivate C++ objects */ -#endif // OMP_40_ENABLED /* future data */ } kmp_cmplrdata_t; -#endif /* sizeof_kmp_task_t passed as arg to kmpc_omp_task call */ /*! @@ -2173,12 +2103,10 @@ typedef struct kmp_task { /* GEH: Shouldn't this be aligned somehow? */ kmp_routine_entry_t routine; /**< pointer to routine to call for executing task */ kmp_int32 part_id; /**< part id for the task */ -#if OMP_40_ENABLED || OMP_45_ENABLED kmp_cmplrdata_t data1; /* Two known optional additions: destructors and priority */ kmp_cmplrdata_t data2; /* Process destructors first, priority second */ -/* future data */ -#endif + /* future data */ /* private vars */ } kmp_task_t; @@ -2186,17 +2114,14 @@ typedef struct kmp_task { /* GEH: Shouldn't this be aligned somehow? */ @} */ -#if OMP_40_ENABLED typedef struct kmp_taskgroup { std::atomic count; // number of allocated and incomplete tasks std::atomic cancel_request; // request for cancellation of this taskgroup struct kmp_taskgroup *parent; // parent taskgroup -#if OMP_50_ENABLED // Block of data to perform task reduction void *reduce_data; // reduction related info kmp_int32 reduce_num_data; // number of data items to reduce -#endif } kmp_taskgroup_t; // forward declarations @@ -2262,7 +2187,6 @@ typedef struct kmp_dephash { #endif } kmp_dephash_t; -#if OMP_50_ENABLED typedef struct kmp_task_affinity_info { kmp_intptr_t base_addr; size_t len; @@ -2285,9 +2209,6 @@ typedef struct { kmp_task_t *task; } ed; } kmp_event_t; -#endif - -#endif #ifdef BUILD_TIED_TASK_STACK @@ -2312,22 +2233,14 @@ typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */ unsigned final : 1; /* task is final(1) so execute immediately */ unsigned merged_if0 : 1; /* no __kmpc_task_{begin/complete}_if0 calls in if0 code path */ -#if OMP_40_ENABLED unsigned destructors_thunk : 1; /* set if the compiler creates a thunk to invoke destructors from the runtime */ -#if OMP_45_ENABLED unsigned proxy : 1; /* task is a proxy task (it will be executed outside the context of the RTL) */ unsigned priority_specified : 1; /* set if the compiler provides priority setting for the task */ unsigned detachable : 1; /* 1 == can detach */ unsigned reserved : 9; /* reserved for compiler use */ -#else - unsigned reserved : 12; /* reserved for compiler use */ -#endif -#else // OMP_40_ENABLED - unsigned reserved : 13; /* reserved for compiler use */ -#endif // OMP_40_ENABLED /* Library flags */ /* Total library flags must be 16 bits */ unsigned tasktype : 1; /* task is either explicit(1) or implicit (0) */ @@ -2368,30 +2281,24 @@ struct kmp_taskdata { /* aligned during dynamic allocation */ deallocated */ std::atomic td_incomplete_child_tasks; /* Child tasks not yet complete */ -#if OMP_40_ENABLED kmp_taskgroup_t *td_taskgroup; // Each task keeps pointer to its current taskgroup kmp_dephash_t *td_dephash; // Dependencies for children tasks are tracked from here kmp_depnode_t *td_depnode; // Pointer to graph node if this task has dependencies -#endif // OMP_40_ENABLED -#if OMP_45_ENABLED kmp_task_team_t *td_task_team; kmp_int32 td_size_alloc; // The size of task structure, including shareds etc. #if defined(KMP_GOMP_COMPAT) // 4 or 8 byte integers for the loop bounds in GOMP_taskloop kmp_int32 td_size_loop_bounds; #endif -#endif // OMP_45_ENABLED kmp_taskdata_t *td_last_tied; // keep tied task for task scheduling constraint -#if defined(KMP_GOMP_COMPAT) && OMP_45_ENABLED +#if defined(KMP_GOMP_COMPAT) // GOMP sends in a copy function for copy constructors void (*td_copy_func)(void *, void *); #endif -#if OMP_50_ENABLED kmp_event_t td_allow_completion_event; -#endif #if OMPT_SUPPORT ompt_task_info_t ompt_task_info; #endif @@ -2445,12 +2352,8 @@ typedef struct kmp_base_task_team { executing this team? */ /* TRUE means tt_threads_data is set up and initialized */ kmp_int32 tt_nproc; /* #threads in team */ - kmp_int32 - tt_max_threads; /* number of entries allocated for threads_data array */ -#if OMP_45_ENABLED - kmp_int32 - tt_found_proxy_tasks; /* Have we found proxy tasks since last barrier */ -#endif + kmp_int32 tt_max_threads; // # entries allocated for threads_data array + kmp_int32 tt_found_proxy_tasks; // found proxy tasks since last barrier kmp_int32 tt_untied_task_encountered; KMP_ALIGN_CACHE @@ -2486,12 +2389,10 @@ typedef struct kmp_hot_team_ptr { kmp_int32 hot_team_nth; // number of threads allocated for the hot_team } kmp_hot_team_ptr_t; #endif -#if OMP_40_ENABLED typedef struct kmp_teams_size { kmp_int32 nteams; // number of teams in a league kmp_int32 nth; // number of threads in each team of the league } kmp_teams_size_t; -#endif // This struct stores a thread that acts as a "root" for a contention // group. Contention groups are rooted at kmp_root threads, but also at @@ -2531,11 +2432,9 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info { int th_team_nproc; /* number of threads in a team */ kmp_info_p *th_team_master; /* the team's master thread */ int th_team_serialized; /* team is serialized */ -#if OMP_40_ENABLED microtask_t th_teams_microtask; /* save entry address for teams construct */ int th_teams_level; /* save initial level of teams construct */ /* it is 0 on device but may be any on host */ -#endif /* The blocktime info is copied from the team struct to the thread sruct */ /* at the start of a barrier, and the values stored in the team are used */ @@ -2551,16 +2450,13 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info { #if KMP_AFFINITY_SUPPORTED kmp_affin_mask_t *th_affin_mask; /* thread's current affinity mask */ #endif -#if OMP_50_ENABLED omp_allocator_handle_t th_def_allocator; /* default allocator */ -#endif /* The data set by the master at reinit, then R/W by the worker */ KMP_ALIGN_CACHE int th_set_nproc; /* if > 0, then only use this request for the next fork */ #if KMP_NESTED_HOT_TEAMS kmp_hot_team_ptr_t *th_hot_teams; /* array of hot teams */ #endif -#if OMP_40_ENABLED kmp_proc_bind_t th_set_proc_bind; /* if != proc_bind_default, use request for next fork */ kmp_teams_size_t @@ -2571,11 +2467,8 @@ typedef struct KMP_ALIGN_CACHE kmp_base_info { int th_first_place; /* first place in partition */ int th_last_place; /* last place in partition */ #endif -#endif -#if OMP_50_ENABLED int th_prev_level; /* previous level for affinity format */ int th_prev_num_threads; /* previous num_threads for affinity format */ -#endif #if USE_ITT_BUILD kmp_uint64 th_bar_arrive_time; /* arrival to barrier timestamp */ kmp_uint64 th_bar_min_time; /* minimum arrival time at the barrier */ @@ -2729,9 +2622,7 @@ typedef struct KMP_ALIGN_CACHE kmp_base_team { kmp_team_p *t_next_pool; // next free team in the team pool kmp_disp_t *t_dispatch; // thread's dispatch data kmp_task_team_t *t_task_team[2]; // Task team struct; switch between 2 -#if OMP_40_ENABLED kmp_proc_bind_t t_proc_bind; // bind type for par region -#endif // OMP_40_ENABLED #if USE_ITT_BUILD kmp_uint64 t_region_time; // region begin timestamp #endif /* USE_ITT_BUILD */ @@ -2770,18 +2661,14 @@ typedef struct KMP_ALIGN_CACHE kmp_base_team { int t_id; // team's id, assigned by debugger. int t_active_level; // nested active parallel level kmp_r_sched_t t_sched; // run-time schedule for the team -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED +#if KMP_AFFINITY_SUPPORTED int t_first_place; // first & last place in parent thread's partition. int t_last_place; // Restore these values to master after par region. -#endif // OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED -#if OMP_50_ENABLED +#endif // KMP_AFFINITY_SUPPORTED int t_display_affinity; -#endif int t_size_changed; // team size was changed?: 0: no, 1: yes, -1: changed via -// omp_set_num_threads() call -#if OMP_50_ENABLED + // omp_set_num_threads() call omp_allocator_handle_t t_def_allocator; /* default allocator */ -#endif // Read/write by workers as well #if (KMP_ARCH_X86 || KMP_ARCH_X86_64) @@ -2793,11 +2680,9 @@ typedef struct KMP_ALIGN_CACHE kmp_base_team { #endif // Internal control stack for additional nested teams. KMP_ALIGN_CACHE kmp_internal_control_t *t_control_stack_top; -// for SERIALIZED teams nested 2 or more levels deep -#if OMP_40_ENABLED + // for SERIALIZED teams nested 2 or more levels deep // typed flag to store request state of cancellation std::atomic t_cancel_request; -#endif int t_master_active; // save on fork, restore on join void *t_copypriv_data; // team specific pointer to copyprivate data array #if KMP_OS_WINDOWS @@ -3129,11 +3014,9 @@ extern const char *__kmp_speculative_statsfile; #endif // KMP_USE_ADAPTIVE_LOCKS -#if OMP_40_ENABLED extern int __kmp_display_env; /* TRUE or FALSE */ extern int __kmp_display_env_verbose; /* TRUE if OMP_DISPLAY_ENV=VERBOSE */ extern int __kmp_omp_cancellation; /* TRUE or FALSE */ -#endif /* ------------------------------------------------------------------------- */ @@ -3326,12 +3209,10 @@ extern void ___kmp_thread_free(kmp_info_t *th, void *ptr KMP_SRC_LOC_DECL); extern void __kmp_push_num_threads(ident_t *loc, int gtid, int num_threads); -#if OMP_40_ENABLED extern void __kmp_push_proc_bind(ident_t *loc, int gtid, kmp_proc_bind_t proc_bind); extern void __kmp_push_num_teams(ident_t *loc, int gtid, int num_teams, int num_threads); -#endif extern void __kmp_yield(); @@ -3452,9 +3333,7 @@ extern void __kmp_affinity_initialize(void); extern void __kmp_affinity_uninitialize(void); extern void __kmp_affinity_set_init_mask( int gtid, int isa_root); /* set affinity according to KMP_AFFINITY */ -#if OMP_40_ENABLED extern void __kmp_affinity_set_place(int gtid); -#endif extern void __kmp_affinity_determine_capable(const char *env_var); extern int __kmp_aux_set_affinity(void **mask); extern int __kmp_aux_get_affinity(void **mask); @@ -3467,14 +3346,12 @@ extern void __kmp_balanced_affinity(kmp_info_t *th, int team_size); extern int kmp_set_thread_affinity_mask_initial(void); #endif #endif /* KMP_AFFINITY_SUPPORTED */ -#if OMP_50_ENABLED // No need for KMP_AFFINITY_SUPPORTED guard as only one field in the // format string is for affinity, so platforms that do not support // affinity can still use the other fields, e.g., %n for num_threads extern size_t __kmp_aux_capture_affinity(int gtid, const char *format, kmp_str_buf_t *buffer); extern void __kmp_aux_display_affinity(int gtid, const char *format); -#endif extern void __kmp_cleanup_hierarchy(); extern void __kmp_get_hierarchy(kmp_uint32 nproc, kmp_bstate_t *thr_bar); @@ -3544,7 +3421,6 @@ extern void __kmp_suspend_uninitialize_thread(kmp_info_t *th); extern kmp_info_t *__kmp_allocate_thread(kmp_root_t *root, kmp_team_t *team, int tid); -#if OMP_40_ENABLED extern kmp_team_t * __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, #if OMPT_SUPPORT @@ -3552,15 +3428,6 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, #endif kmp_proc_bind_t proc_bind, kmp_internal_control_t *new_icvs, int argc USE_NESTED_HOT_ARG(kmp_info_t *thr)); -#else -extern kmp_team_t * -__kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, -#if OMPT_SUPPORT - ompt_id_t ompt_parallel_id, -#endif - kmp_internal_control_t *new_icvs, - int argc USE_NESTED_HOT_ARG(kmp_info_t *thr)); -#endif // OMP_40_ENABLED extern void __kmp_free_thread(kmp_info_t *); extern void __kmp_free_team(kmp_root_t *, kmp_team_t *USE_NESTED_HOT_ARG(kmp_info_t *)); @@ -3611,11 +3478,8 @@ extern void __kmp_join_call(ident_t *loc, int gtid , enum fork_context_e fork_context #endif -#if OMP_40_ENABLED , - int exit_teams = 0 -#endif - ); + int exit_teams = 0); extern void __kmp_serialized_parallel(ident_t *id, kmp_int32 gtid); extern void __kmp_internal_fork(ident_t *id, int gtid, kmp_team_t *team); @@ -3630,12 +3494,10 @@ extern void __kmp_run_after_invoked_task(int gtid, int tid, // should never have been exported KMP_EXPORT int __kmpc_invoke_task_func(int gtid); -#if OMP_40_ENABLED extern int __kmp_invoke_teams_master(int gtid); extern void __kmp_teams_master(int gtid); extern int __kmp_aux_get_team_num(); extern int __kmp_aux_get_num_teams(); -#endif extern void __kmp_save_internal_controls(kmp_info_t *thread); extern void __kmp_user_set_library(enum library_type arg); extern void __kmp_aux_set_library(enum library_type arg); @@ -3663,12 +3525,10 @@ extern void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr, extern void __kmp_finish_implicit_task(kmp_info_t *this_thr); extern void __kmp_free_implicit_task(kmp_info_t *this_thr); -#if OMP_50_ENABLED extern kmp_event_t *__kmpc_task_allow_completion_event(ident_t *loc_ref, int gtid, kmp_task_t *task); extern void __kmp_fulfill_event(kmp_event_t *event); -#endif int __kmp_execute_tasks_32(kmp_info_t *thread, kmp_int32 gtid, kmp_flag_32 *flag, int final_spin, @@ -3767,11 +3627,8 @@ KMP_EXPORT void __kmpc_critical(ident_t *, kmp_int32 global_tid, kmp_critical_name *); KMP_EXPORT void __kmpc_end_critical(ident_t *, kmp_int32 global_tid, kmp_critical_name *); - -#if OMP_45_ENABLED KMP_EXPORT void __kmpc_critical_with_hint(ident_t *, kmp_int32 global_tid, kmp_critical_name *, uint32_t hint); -#endif KMP_EXPORT kmp_int32 __kmpc_barrier_master(ident_t *, kmp_int32 global_tid); KMP_EXPORT void __kmpc_end_barrier_master(ident_t *, kmp_int32 global_tid); @@ -3832,8 +3689,6 @@ void __kmpc_omp_task_complete(ident_t *loc_ref, kmp_int32 gtid, /* ------------------------------------------------------------------------ */ -#if OMP_40_ENABLED - KMP_EXPORT void __kmpc_taskgroup(ident_t *loc, int gtid); KMP_EXPORT void __kmpc_end_taskgroup(ident_t *loc, int gtid); @@ -3846,7 +3701,6 @@ KMP_EXPORT void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_depend_info_t *dep_list, kmp_int32 ndeps_noalias, kmp_depend_info_t *noalias_dep_list); - extern kmp_int32 __kmp_omp_task(kmp_int32 gtid, kmp_task_t *new_task, bool serialize_immediate); @@ -3857,8 +3711,6 @@ KMP_EXPORT kmp_int32 __kmpc_cancellationpoint(ident_t *loc_ref, kmp_int32 gtid, KMP_EXPORT kmp_int32 __kmpc_cancel_barrier(ident_t *loc_ref, kmp_int32 gtid); KMP_EXPORT int __kmp_get_cancellation_status(int cancel_kind); -#if OMP_45_ENABLED - KMP_EXPORT void __kmpc_proxy_task_completed(kmp_int32 gtid, kmp_task_t *ptask); KMP_EXPORT void __kmpc_proxy_task_completed_ooo(kmp_task_t *ptask); KMP_EXPORT void __kmpc_taskloop(ident_t *loc, kmp_int32 gtid, kmp_task_t *task, @@ -3866,8 +3718,6 @@ KMP_EXPORT void __kmpc_taskloop(ident_t *loc, kmp_int32 gtid, kmp_task_t *task, kmp_uint64 *ub, kmp_int64 st, kmp_int32 nogroup, kmp_int32 sched, kmp_uint64 grainsize, void *task_dup); -#endif -#if OMP_50_ENABLED KMP_EXPORT void *__kmpc_task_reduction_init(int gtid, int num_data, void *data); KMP_EXPORT void *__kmpc_taskred_init(int gtid, int num_data, void *data); KMP_EXPORT void *__kmpc_task_reduction_get_th_data(int gtid, void *tg, void *d); @@ -3881,9 +3731,6 @@ KMP_EXPORT void __kmpc_task_reduction_modifier_fini(ident_t *loc, int gtid, KMP_EXPORT kmp_int32 __kmpc_omp_reg_task_with_affinity( ident_t *loc_ref, kmp_int32 gtid, kmp_task_t *new_task, kmp_int32 naffins, kmp_task_affinity_info_t *affin_list); -#endif - -#endif /* Lock interface routines (fast versions with gtid passed in) */ KMP_EXPORT void __kmpc_init_lock(ident_t *loc, kmp_int32 gtid, @@ -3905,13 +3752,11 @@ KMP_EXPORT int __kmpc_test_lock(ident_t *loc, kmp_int32 gtid, void **user_lock); KMP_EXPORT int __kmpc_test_nest_lock(ident_t *loc, kmp_int32 gtid, void **user_lock); -#if OMP_45_ENABLED KMP_EXPORT void __kmpc_init_lock_with_hint(ident_t *loc, kmp_int32 gtid, void **user_lock, uintptr_t hint); KMP_EXPORT void __kmpc_init_nest_lock_with_hint(ident_t *loc, kmp_int32 gtid, void **user_lock, uintptr_t hint); -#endif /* Interface to fast scalable reduce methods routines */ @@ -3949,7 +3794,6 @@ KMP_EXPORT void __kmpc_pop_num_threads(ident_t *loc, kmp_int32 global_tid); KMP_EXPORT void __kmpc_push_num_threads(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads); -#if OMP_40_ENABLED KMP_EXPORT void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid, int proc_bind); KMP_EXPORT void __kmpc_push_num_teams(ident_t *loc, kmp_int32 global_tid, @@ -3957,8 +3801,6 @@ KMP_EXPORT void __kmpc_push_num_teams(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_threads); KMP_EXPORT void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...); -#endif -#if OMP_45_ENABLED struct kmp_dim { // loop bounds info casted to kmp_int64 kmp_int64 lo; // lower kmp_int64 up; // upper @@ -3972,7 +3814,6 @@ KMP_EXPORT void __kmpc_doacross_wait(ident_t *loc, kmp_int32 gtid, KMP_EXPORT void __kmpc_doacross_post(ident_t *loc, kmp_int32 gtid, const kmp_int64 *vec); KMP_EXPORT void __kmpc_doacross_fini(ident_t *loc, kmp_int32 gtid); -#endif KMP_EXPORT void *__kmpc_threadprivate_cached(ident_t *loc, kmp_int32 global_tid, void *data, size_t size, @@ -4029,7 +3870,6 @@ KMP_EXPORT void KMPC_CONVENTION kmpc_set_library(int); KMP_EXPORT void KMPC_CONVENTION kmpc_set_defaults(char const *); KMP_EXPORT void KMPC_CONVENTION kmpc_set_disp_num_buffers(int); -#if OMP_50_ENABLED enum kmp_target_offload_kind { tgt_disabled = 0, tgt_default = 1, @@ -4039,16 +3879,12 @@ typedef enum kmp_target_offload_kind kmp_target_offload_kind_t; // Set via OMP_TARGET_OFFLOAD if specified, defaults to tgt_default otherwise extern kmp_target_offload_kind_t __kmp_target_offload; extern int __kmpc_get_target_offload(); -#endif -#if OMP_40_ENABLED // Constants used in libomptarget #define KMP_DEVICE_DEFAULT -1 // This is libomptarget's default device. #define KMP_HOST_DEVICE -10 // This is what it is in libomptarget, go figure. #define KMP_DEVICE_ALL -11 // This is libomptarget's "all devices". -#endif // OMP_40_ENABLED -#if OMP_50_ENABLED // OMP Pause Resource // The following enum is used both to set the status in __kmp_pause_status, and @@ -4073,7 +3909,6 @@ static inline void __kmp_resume_if_hard_paused() { __kmp_pause_status = kmp_not_paused; } } -#endif // OMP_50_ENABLED #ifdef __cplusplus } diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp index d86de7e..372c300 100644 --- a/openmp/runtime/src/kmp_affinity.cpp +++ b/openmp/runtime/src/kmp_affinity.cpp @@ -3019,8 +3019,6 @@ static void __kmp_affinity_process_proclist(kmp_affin_mask_t **out_masks, KMP_CPU_FREE(sumMask); } -#if OMP_40_ENABLED - /*----------------------------------------------------------------------------- Re-parse the OMP_PLACES proc id list, forming the newMasks for the different places. Again, Here is the grammar: @@ -3041,7 +3039,6 @@ signed := num signed := + signed signed := - signed -----------------------------------------------------------------------------*/ - static void __kmp_process_subplace_list(const char **scan, kmp_affin_mask_t *osId2Mask, int maxOsId, kmp_affin_mask_t *tempMask, @@ -3360,8 +3357,6 @@ void __kmp_affinity_process_placelist(kmp_affin_mask_t **out_masks, KMP_CPU_INTERNAL_FREE_ARRAY(newMasks, numNewMasks); } -#endif /* OMP_40_ENABLED */ - #undef ADD_MASK #undef ADD_MASK_OSID @@ -4486,21 +4481,15 @@ static void __kmp_aux_affinity_initialize(void) { case affinity_explicit: KMP_DEBUG_ASSERT(__kmp_affinity_proclist != NULL); -#if OMP_40_ENABLED - if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_intel) -#endif - { + if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_intel) { __kmp_affinity_process_proclist( &__kmp_affinity_masks, &__kmp_affinity_num_masks, __kmp_affinity_proclist, osId2Mask, maxIndex); - } -#if OMP_40_ENABLED - else { + } else { __kmp_affinity_process_placelist( &__kmp_affinity_masks, &__kmp_affinity_num_masks, __kmp_affinity_proclist, osId2Mask, maxIndex); } -#endif if (__kmp_affinity_num_masks == 0) { if (__kmp_affinity_verbose || (__kmp_affinity_warnings && (__kmp_affinity_type != affinity_none))) { @@ -4616,13 +4605,11 @@ static void __kmp_aux_affinity_initialize(void) { __kmp_affinity_num_masks = numUnique; } -#if OMP_40_ENABLED if ((__kmp_nested_proc_bind.bind_types[0] != proc_bind_intel) && (__kmp_affinity_num_places > 0) && ((unsigned)__kmp_affinity_num_places < __kmp_affinity_num_masks)) { __kmp_affinity_num_masks = __kmp_affinity_num_places; } -#endif KMP_CPU_ALLOC_ARRAY(__kmp_affinity_masks, __kmp_affinity_num_masks); @@ -4692,9 +4679,7 @@ void __kmp_affinity_uninitialize(void) { } __kmp_affinity_num_masks = 0; __kmp_affinity_type = affinity_default; -#if OMP_40_ENABLED __kmp_affinity_num_places = 0; -#endif if (__kmp_affinity_proclist != NULL) { __kmp_free(__kmp_affinity_proclist); __kmp_affinity_proclist = NULL; @@ -4735,10 +4720,7 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) { kmp_affin_mask_t *mask; int i; -#if OMP_40_ENABLED - if (KMP_AFFINITY_NON_PROC_BIND) -#endif - { + if (KMP_AFFINITY_NON_PROC_BIND) { if ((__kmp_affinity_type == affinity_none) || (__kmp_affinity_type == affinity_balanced)) { #if KMP_GROUP_AFFINITY @@ -4754,9 +4736,7 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) { i = (gtid + __kmp_affinity_offset) % __kmp_affinity_num_masks; mask = KMP_CPU_INDEX(__kmp_affinity_masks, i); } - } -#if OMP_40_ENABLED - else { + } else { if ((!isa_root) || (__kmp_nested_proc_bind.bind_types[0] == proc_bind_false)) { #if KMP_GROUP_AFFINITY @@ -4775,9 +4755,7 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) { mask = KMP_CPU_INDEX(__kmp_affinity_masks, i); } } -#endif -#if OMP_40_ENABLED th->th.th_current_place = i; if (isa_root) { th->th.th_new_place = i; @@ -4797,17 +4775,6 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) { KA_TRACE(100, ("__kmp_affinity_set_init_mask: binding T#%d to place %d\n", gtid, i)); } -#else - if (i == -1) { - KA_TRACE( - 100, - ("__kmp_affinity_set_init_mask: binding T#%d to __kmp_affin_fullMask\n", - gtid)); - } else { - KA_TRACE(100, ("__kmp_affinity_set_init_mask: binding T#%d to mask %d\n", - gtid, i)); - } -#endif /* OMP_40_ENABLED */ KMP_CPU_COPY(th->th.th_affin_mask, mask); @@ -4833,8 +4800,6 @@ void __kmp_affinity_set_init_mask(int gtid, int isa_root) { __kmp_set_system_affinity(th->th.th_affin_mask, TRUE); } -#if OMP_40_ENABLED - void __kmp_affinity_set_place(int gtid) { if (!KMP_AFFINITY_CAPABLE()) { return; @@ -4875,8 +4840,6 @@ void __kmp_affinity_set_place(int gtid) { __kmp_set_system_affinity(th->th.th_affin_mask, TRUE); } -#endif /* OMP_40_ENABLED */ - int __kmp_aux_set_affinity(void **mask) { int gtid; kmp_info_t *th; @@ -4931,7 +4894,6 @@ int __kmp_aux_set_affinity(void **mask) { KMP_CPU_COPY(th->th.th_affin_mask, (kmp_affin_mask_t *)(*mask)); } -#if OMP_40_ENABLED th->th.th_current_place = KMP_PLACE_UNDEFINED; th->th.th_new_place = KMP_PLACE_UNDEFINED; th->th.th_first_place = 0; @@ -4939,7 +4901,6 @@ int __kmp_aux_set_affinity(void **mask) { // Turn off 4.0 affinity for the current tread at this parallel level. th->th.th_current_task->td_icvs.proc_bind = proc_bind_false; -#endif return retval; } diff --git a/openmp/runtime/src/kmp_alloc.cpp b/openmp/runtime/src/kmp_alloc.cpp index c269fb9..8619401 100644 --- a/openmp/runtime/src/kmp_alloc.cpp +++ b/openmp/runtime/src/kmp_alloc.cpp @@ -33,7 +33,7 @@ typedef kmp_int64 bufsize; #endif #else typedef ssize_t bufsize; -#endif +#endif // KMP_OS_WINDOWS /* The three modes of operation are, fifo search, lifo search, and best-fit */ @@ -1220,7 +1220,6 @@ void ___kmp_thread_free(kmp_info_t *th, void *ptr KMP_SRC_LOC_DECL) { KE_TRACE(30, ("<- __kmp_thread_free()\n")); } -#if OMP_50_ENABLED /* OMP 5.0 Memory Management support */ static const char *kmp_mk_lib_name; static void *h_memkind; @@ -1630,8 +1629,6 @@ void __kmpc_free(int gtid, void *ptr, const omp_allocator_handle_t allocator) { allocator)); } -#endif - /* If LEAK_MEMORY is defined, __kmp_free() will *not* free memory. It causes memory leaks, but it may be useful for debugging memory corruptions, used freed pointers, etc. */ diff --git a/openmp/runtime/src/kmp_atomic.cpp b/openmp/runtime/src/kmp_atomic.cpp index 9940797..f1ee3d2 100644 --- a/openmp/runtime/src/kmp_atomic.cpp +++ b/openmp/runtime/src/kmp_atomic.cpp @@ -674,7 +674,7 @@ static inline void operator/=(kmp_cmplx128_a16_t &lhs, lhs.q /= rhs.q; } -#endif +#endif // (KMP_ARCH_X86) && KMP_HAVE_QUAD // ATOMIC implementation routines ----------------------------------------- // One routine for each operation and operand type. @@ -843,7 +843,7 @@ static inline void operator/=(kmp_cmplx128_a16_t &lhs, OP_CMPXCHG_WORKAROUND(TYPE, BITS, OP) \ } // end of the second part of the workaround for C78287 -#endif +#endif // USE_CMPXCHG_FIX #else // ------------------------------------------------------------------------- @@ -1193,8 +1193,8 @@ MIN_MAX_CRITICAL(float16, max_a16, Quad_a16_t, <, 16r, 1) // __kmpc_atomic_float16_max_a16 MIN_MAX_CRITICAL(float16, min_a16, Quad_a16_t, >, 16r, 1) // __kmpc_atomic_float16_min_a16 -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // ------------------------------------------------------------------------ // Need separate macros for .EQV. because of the need of complement (~) // OP ignored for critical sections, ^=~ used instead @@ -1289,8 +1289,8 @@ ATOMIC_CRITICAL(float16, mul_a16, Quad_a16_t, *, 16r, 1) // __kmpc_atomic_float16_mul_a16 ATOMIC_CRITICAL(float16, div_a16, Quad_a16_t, /, 16r, 1) // __kmpc_atomic_float16_div_a16 -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // routines for complex types #if USE_CMPXCHG_FIX @@ -1341,10 +1341,8 @@ ATOMIC_CRITICAL(cmplx16, mul_a16, kmp_cmplx128_a16_t, *, 32c, 1) // __kmpc_atomic_cmplx16_mul_a16 ATOMIC_CRITICAL(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c, 1) // __kmpc_atomic_cmplx16_div_a16 -#endif -#endif - -#if OMP_40_ENABLED +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // OpenMP 4.0: x = expr binop x for non-commutative operations. // Supported only on IA-32 architecture and Intel(R) 64 @@ -1523,8 +1521,8 @@ ATOMIC_CRITICAL_REV(float16, sub_a16, Quad_a16_t, -, 16r, 1) // __kmpc_atomic_float16_sub_a16_rev ATOMIC_CRITICAL_REV(float16, div_a16, Quad_a16_t, /, 16r, 1) // __kmpc_atomic_float16_div_a16_rev -#endif -#endif +#endif // KMP_ARCH_X86 +#endif // KMP_HAVE_QUAD // routines for complex types ATOMIC_CRITICAL_REV(cmplx4, sub, kmp_cmplx32, -, 8c, @@ -1549,14 +1547,12 @@ ATOMIC_CRITICAL_REV(cmplx16, sub_a16, kmp_cmplx128_a16_t, -, 32c, 1) // __kmpc_atomic_cmplx16_sub_a16_rev ATOMIC_CRITICAL_REV(cmplx16, div_a16, kmp_cmplx128_a16_t, /, 32c, 1) // __kmpc_atomic_cmplx16_div_a16_rev -#endif -#endif +#endif // KMP_ARCH_X86 +#endif // KMP_HAVE_QUAD #endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 // End of OpenMP 4.0: x = expr binop x for non-commutative operations. -#endif // OMP_40_ENABLED - /* ------------------------------------------------------------------------ */ /* Routines for mixed types of LHS and RHS, when RHS is "larger" */ /* Note: in order to reduce the total number of types combinations */ @@ -1806,7 +1802,7 @@ ATOMIC_CRITICAL_REV_FP(float10, long double, div_rev, /, fp, _Quad, 10r, 1) // __kmpc_atomic_float10_div_rev_fp #endif /* KMP_ARCH_X86 || KMP_ARCH_X86_64 */ -#endif +#endif // KMP_HAVE_QUAD #if KMP_ARCH_X86 || KMP_ARCH_X86_64 // ------------------------------------------------------------------------ @@ -2020,7 +2016,7 @@ ATOMIC_CRITICAL_READ_WRK(cmplx4, rd, kmp_cmplx32, +, 8c, #else ATOMIC_CRITICAL_READ(cmplx4, rd, kmp_cmplx32, +, 8c, 1) // __kmpc_atomic_cmplx4_rd -#endif +#endif // (KMP_OS_WINDOWS) ATOMIC_CRITICAL_READ(cmplx8, rd, kmp_cmplx64, +, 16c, 1) // __kmpc_atomic_cmplx8_rd ATOMIC_CRITICAL_READ(cmplx10, rd, kmp_cmplx80, +, 20c, @@ -2033,8 +2029,8 @@ ATOMIC_CRITICAL_READ(float16, a16_rd, Quad_a16_t, +, 16r, 1) // __kmpc_atomic_float16_a16_rd ATOMIC_CRITICAL_READ(cmplx16, a16_rd, kmp_cmplx128_a16_t, +, 32c, 1) // __kmpc_atomic_cmplx16_a16_rd -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // ------------------------------------------------------------------------ // Atomic WRITE routines @@ -2108,7 +2104,7 @@ ATOMIC_CMPXCHG_WR(fixed8, wr, kmp_int64, 64, =, #else ATOMIC_XCHG_WR(fixed8, wr, kmp_int64, 64, =, KMP_ARCH_X86) // __kmpc_atomic_fixed8_wr -#endif +#endif // (KMP_ARCH_X86) ATOMIC_XCHG_FLOAT_WR(float4, wr, kmp_real32, 32, =, KMP_ARCH_X86) // __kmpc_atomic_float4_wr @@ -2118,14 +2114,14 @@ ATOMIC_CMPXCHG_WR(float8, wr, kmp_real64, 64, =, #else ATOMIC_XCHG_FLOAT_WR(float8, wr, kmp_real64, 64, =, KMP_ARCH_X86) // __kmpc_atomic_float8_wr -#endif +#endif // (KMP_ARCH_X86) ATOMIC_CRITICAL_WR(float10, wr, long double, =, 10r, 1) // __kmpc_atomic_float10_wr #if KMP_HAVE_QUAD ATOMIC_CRITICAL_WR(float16, wr, QUAD_LEGACY, =, 16r, 1) // __kmpc_atomic_float16_wr -#endif +#endif // KMP_HAVE_QUAD ATOMIC_CRITICAL_WR(cmplx4, wr, kmp_cmplx32, =, 8c, 1) // __kmpc_atomic_cmplx4_wr ATOMIC_CRITICAL_WR(cmplx8, wr, kmp_cmplx64, =, 16c, 1) // __kmpc_atomic_cmplx8_wr @@ -2139,8 +2135,8 @@ ATOMIC_CRITICAL_WR(float16, a16_wr, Quad_a16_t, =, 16r, 1) // __kmpc_atomic_float16_a16_wr ATOMIC_CRITICAL_WR(cmplx16, a16_wr, kmp_cmplx128_a16_t, =, 32c, 1) // __kmpc_atomic_cmplx16_a16_wr -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // ------------------------------------------------------------------------ // Atomic CAPTURE routines @@ -2660,8 +2656,8 @@ MIN_MAX_CRITICAL_CPT(float16, max_a16_cpt, Quad_a16_t, <, 16r, 1) // __kmpc_atomic_float16_max_a16_cpt MIN_MAX_CRITICAL_CPT(float16, min_a16_cpt, Quad_a16_t, >, 16r, 1) // __kmpc_atomic_float16_mix_a16_cpt -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // ------------------------------------------------------------------------ #ifdef KMP_GOMP_COMPAT @@ -2785,8 +2781,8 @@ ATOMIC_CRITICAL_CPT(float16, mul_a16_cpt, Quad_a16_t, *, 16r, 1) // __kmpc_atomic_float16_mul_a16_cpt ATOMIC_CRITICAL_CPT(float16, div_a16_cpt, Quad_a16_t, /, 16r, 1) // __kmpc_atomic_float16_div_a16_cpt -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // routines for complex types @@ -2834,10 +2830,8 @@ ATOMIC_CRITICAL_CPT(cmplx16, mul_a16_cpt, kmp_cmplx128_a16_t, *, 32c, 1) // __kmpc_atomic_cmplx16_mul_a16_cpt ATOMIC_CRITICAL_CPT(cmplx16, div_a16_cpt, kmp_cmplx128_a16_t, /, 32c, 1) // __kmpc_atomic_cmplx16_div_a16_cpt -#endif -#endif - -#if OMP_40_ENABLED +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // OpenMP 4.0: v = x = expr binop x; { v = x; x = expr binop x; } { x = expr // binop x; v = x; } for non-commutative operations. @@ -3000,8 +2994,8 @@ ATOMIC_CRITICAL_CPT_REV(float16, sub_a16_cpt_rev, Quad_a16_t, -, 16r, 1) // __kmpc_atomic_float16_sub_a16_cpt_rev ATOMIC_CRITICAL_CPT_REV(float16, div_a16_cpt_rev, Quad_a16_t, /, 16r, 1) // __kmpc_atomic_float16_div_a16_cpt_rev -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // routines for complex types @@ -3067,8 +3061,8 @@ ATOMIC_CRITICAL_CPT_REV(cmplx16, sub_a16_cpt_rev, kmp_cmplx128_a16_t, -, 32c, 1) // __kmpc_atomic_cmplx16_sub_a16_cpt_rev ATOMIC_CRITICAL_CPT_REV(cmplx16, div_a16_cpt_rev, kmp_cmplx128_a16_t, /, 32c, 1) // __kmpc_atomic_cmplx16_div_a16_cpt_rev -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // Capture reverse for mixed type: RHS=float16 #if KMP_HAVE_QUAD @@ -3247,7 +3241,7 @@ ATOMIC_CMPXCHG_SWP(float8, kmp_real64, 64, ATOMIC_XCHG_SWP(fixed8, kmp_int64, 64, KMP_ARCH_X86) // __kmpc_atomic_fixed8_swp ATOMIC_XCHG_FLOAT_SWP(float8, kmp_real64, 64, KMP_ARCH_X86) // __kmpc_atomic_float8_swp -#endif +#endif // (KMP_ARCH_X86) // ------------------------------------------------------------------------ // Routines for Extended types: long double, _Quad, complex flavours (use @@ -3302,7 +3296,7 @@ ATOMIC_XCHG_FLOAT_SWP(float8, kmp_real64, 64, ATOMIC_CRITICAL_SWP(float10, long double, 10r, 1) // __kmpc_atomic_float10_swp #if KMP_HAVE_QUAD ATOMIC_CRITICAL_SWP(float16, QUAD_LEGACY, 16r, 1) // __kmpc_atomic_float16_swp -#endif +#endif // KMP_HAVE_QUAD // cmplx4 routine to return void ATOMIC_CRITICAL_SWP_WRK(cmplx4, kmp_cmplx32, 8c, 1) // __kmpc_atomic_cmplx4_swp @@ -3318,13 +3312,11 @@ ATOMIC_CRITICAL_SWP(float16_a16, Quad_a16_t, 16r, 1) // __kmpc_atomic_float16_a16_swp ATOMIC_CRITICAL_SWP(cmplx16_a16, kmp_cmplx128_a16_t, 32c, 1) // __kmpc_atomic_cmplx16_a16_swp -#endif -#endif +#endif // (KMP_ARCH_X86) +#endif // KMP_HAVE_QUAD // End of OpenMP 4.0 Capture -#endif // OMP_40_ENABLED - #endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 #undef OP_CRITICAL @@ -3341,7 +3333,7 @@ void __kmpc_atomic_1(ident_t *id_ref, int gtid, void *lhs, void *rhs, FALSE /* must use lock */ #else TRUE -#endif +#endif // KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT) ) { kmp_int8 old_value, new_value; @@ -3388,7 +3380,7 @@ void __kmpc_atomic_2(ident_t *id_ref, int gtid, void *lhs, void *rhs, TRUE /* no alignment problems */ #else !((kmp_uintptr_t)lhs & 0x1) /* make sure address is 2-byte aligned */ -#endif +#endif // KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT) ) { kmp_int16 old_value, new_value; @@ -3437,7 +3429,7 @@ void __kmpc_atomic_4(ident_t *id_ref, int gtid, void *lhs, void *rhs, TRUE /* no alignment problems */ #else !((kmp_uintptr_t)lhs & 0x3) /* make sure address is 4-byte aligned */ -#endif +#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 ) { kmp_int32 old_value, new_value; @@ -3487,7 +3479,7 @@ void __kmpc_atomic_8(ident_t *id_ref, int gtid, void *lhs, void *rhs, TRUE /* no alignment problems */ #else !((kmp_uintptr_t)lhs & 0x7) /* make sure address is 8-byte aligned */ -#endif +#endif // KMP_ARCH_X86 && defined(KMP_GOMP_COMPAT) ) { kmp_int64 old_value, new_value; diff --git a/openmp/runtime/src/kmp_atomic.h b/openmp/runtime/src/kmp_atomic.h index eeb2d5c..bb01c31 100644 --- a/openmp/runtime/src/kmp_atomic.h +++ b/openmp/runtime/src/kmp_atomic.h @@ -687,8 +687,6 @@ void __kmpc_atomic_cmplx16_div_a16(ident_t *id_ref, int gtid, #endif #endif -#if OMP_40_ENABLED - // OpenMP 4.0: x = expr binop x for non-commutative operations. // Supported only on IA-32 architecture and Intel(R) 64 #if KMP_ARCH_X86 || KMP_ARCH_X86_64 @@ -793,8 +791,6 @@ void __kmpc_atomic_cmplx16_div_a16_rev(ident_t *id_ref, int gtid, #endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 -#endif // OMP_40_ENABLED - // routines for mixed types // RHS=float8 @@ -1403,8 +1399,6 @@ kmp_cmplx128_a16_t __kmpc_atomic_cmplx16_div_a16_cpt(ident_t *id_ref, int gtid, void __kmpc_atomic_start(void); void __kmpc_atomic_end(void); -#if OMP_40_ENABLED - // OpenMP 4.0: v = x = expr binop x; { v = x; x = expr binop x; } { x = expr // binop x; v = x; } for non-commutative operations. @@ -1760,8 +1754,6 @@ long double __kmpc_atomic_float10_div_cpt_rev_fp(ident_t *id_ref, int gtid, // End of OpenMP 4.0 capture -#endif // OMP_40_ENABLED - #endif // KMP_ARCH_X86 || KMP_ARCH_X86_64 /* ------------------------------------------------------------------------ */ diff --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp index 0fd96e7..e17986b 100644 --- a/openmp/runtime/src/kmp_barrier.cpp +++ b/openmp/runtime/src/kmp_barrier.cpp @@ -869,12 +869,10 @@ static void __kmp_hierarchical_barrier_gather( kmp_uint64 new_state; int level = team->t.t_level; -#if OMP_40_ENABLED if (other_threads[0] ->th.th_teams_microtask) // are we inside the teams construct? if (this_thr->th.th_teams_size.nteams > 1) ++level; // level was not increased in teams construct for team_of_masters -#endif if (level == 1) thr_bar->use_oncore_barrier = 1; else @@ -1099,7 +1097,6 @@ static void __kmp_hierarchical_barrier_release( nproc = this_thr->th.th_team_nproc; int level = team->t.t_level; -#if OMP_40_ENABLED if (team->t.t_threads[0] ->th.th_teams_microtask) { // are we inside the teams construct? if (team->t.t_pkfn != (microtask_t)__kmp_teams_master && @@ -1108,7 +1105,6 @@ static void __kmp_hierarchical_barrier_release( if (this_thr->th.th_teams_size.nteams > 1) ++level; // level was not increased in teams construct for team_of_masters } -#endif if (level == 1) thr_bar->use_oncore_barrier = 1; else @@ -1425,7 +1421,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split, team->t.t_bar[bt].b_team_arrived += 1; #endif -#if OMP_40_ENABLED if (__kmp_omp_cancellation) { kmp_int32 cancel_request = KMP_ATOMIC_LD_RLX(&team->t.t_cancel_request); // Reset cancellation flag for worksharing constructs @@ -1434,7 +1429,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split, KMP_ATOMIC_ST_RLX(&team->t.t_cancel_request, cancel_noreq); } } -#endif #if USE_ITT_BUILD /* TODO: In case of split reduction barrier, master thread may send acquired event early, before the final summation into the shared @@ -1447,9 +1441,7 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split, // Barrier - report frame end (only if active_level == 1) if ((__itt_frame_submit_v3_ptr || KMP_ITT_DEBUG) && __kmp_forkjoin_frames_mode && -#if OMP_40_ENABLED this_thr->th.th_teams_microtask == NULL && -#endif team->t.t_active_level == 1) { ident_t *loc = __kmp_threads[gtid]->th.th_ident; kmp_uint64 cur_time = __itt_get_timestamp(); @@ -1540,7 +1532,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split, } else { // Team is serialized. status = 0; if (__kmp_tasking_mode != tskm_immediate_exec) { -#if OMP_45_ENABLED if (this_thr->th.th_task_team != NULL) { #if USE_ITT_NOTIFY void *itt_sync_obj = NULL; @@ -1560,12 +1551,6 @@ static int __kmp_barrier_template(enum barrier_type bt, int gtid, int is_split, __kmp_itt_barrier_finished(gtid, itt_sync_obj); #endif /* USE_ITT_BUILD */ } -#else - // The task team should be NULL for serialized code (tasks will be - // executed immediately) - KMP_DEBUG_ASSERT(team->t.t_task_team[this_thr->th.th_task_state] == NULL); - KMP_DEBUG_ASSERT(this_thr->th.th_task_team == NULL); -#endif } } KA_TRACE(15, ("__kmp_barrier: T#%d(%d:%d) is leaving with return value %d\n", @@ -1816,11 +1801,9 @@ void __kmp_join_barrier(int gtid) { if (__kmp_tasking_mode != tskm_immediate_exec) { __kmp_task_team_wait(this_thr, team USE_ITT_BUILD_ARG(itt_sync_obj)); } -#if OMP_50_ENABLED if (__kmp_display_affinity) { KMP_CHECK_UPDATE(team->t.t_display_affinity, 0); } -#endif #if KMP_STATS_ENABLED // Have master thread flag the workers to indicate they are now waiting for // next parallel region, Also wake them up so they switch their timers to @@ -1844,10 +1827,7 @@ void __kmp_join_barrier(int gtid) { #if USE_ITT_BUILD && USE_ITT_NOTIFY // Join barrier - report frame end if ((__itt_frame_submit_v3_ptr || KMP_ITT_DEBUG) && - __kmp_forkjoin_frames_mode && -#if OMP_40_ENABLED - this_thr->th.th_teams_microtask == NULL && -#endif + __kmp_forkjoin_frames_mode && this_thr->th.th_teams_microtask == NULL && team->t.t_active_level == 1) { kmp_uint64 cur_time = __itt_get_timestamp(); ident_t *loc = team->t.t_ident; @@ -2088,17 +2068,13 @@ void __kmp_fork_barrier(int gtid, int tid) { __kmp_task_team_sync(this_thr, team); } -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED +#if KMP_AFFINITY_SUPPORTED kmp_proc_bind_t proc_bind = team->t.t_proc_bind; if (proc_bind == proc_bind_intel) { -#endif -#if KMP_AFFINITY_SUPPORTED // Call dynamic affinity settings if (__kmp_affinity_type == affinity_balanced && team->t.t_size_changed) { __kmp_balanced_affinity(this_thr, team->t.t_nproc); } -#endif // KMP_AFFINITY_SUPPORTED -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED } else if (proc_bind != proc_bind_false) { if (this_thr->th.th_new_place == this_thr->th.th_current_place) { KA_TRACE(100, ("__kmp_fork_barrier: T#%d already in correct place %d\n", @@ -2108,8 +2084,7 @@ void __kmp_fork_barrier(int gtid, int tid) { __kmp_affinity_set_place(gtid); } } -#endif -#if OMP_50_ENABLED +#endif // KMP_AFFINITY_SUPPORTED // Perform the display affinity functionality if (__kmp_display_affinity) { if (team->t.t_display_affinity @@ -2125,7 +2100,6 @@ void __kmp_fork_barrier(int gtid, int tid) { } if (!KMP_MASTER_TID(tid)) KMP_CHECK_UPDATE(this_thr->th.th_def_allocator, team->t.t_def_allocator); -#endif #if USE_ITT_BUILD && USE_ITT_NOTIFY if (__itt_sync_create_ptr || KMP_ITT_DEBUG) { diff --git a/openmp/runtime/src/kmp_cancel.cpp b/openmp/runtime/src/kmp_cancel.cpp index 23432f3..d129049 100644 --- a/openmp/runtime/src/kmp_cancel.cpp +++ b/openmp/runtime/src/kmp_cancel.cpp @@ -15,8 +15,6 @@ #include "ompt-specific.h" #endif -#if OMP_40_ENABLED - /*! @ingroup CANCELLATION @param loc_ref location of the original task directive @@ -71,7 +69,7 @@ kmp_int32 __kmpc_cancel(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 cncl_kind) { task_data, type | ompt_cancel_activated, OMPT_GET_RETURN_ADDRESS(0)); } -#endif +#endif // OMPT_SUPPORT && OMPT_OPTIONAL return 1 /* true */; } break; @@ -331,5 +329,3 @@ int __kmp_get_cancellation_status(int cancel_kind) { return 0 /* false */; } - -#endif diff --git a/openmp/runtime/src/kmp_config.h.cmake b/openmp/runtime/src/kmp_config.h.cmake index b4b76a2..e3a1a8d 100644 --- a/openmp/runtime/src/kmp_config.h.cmake +++ b/openmp/runtime/src/kmp_config.h.cmake @@ -64,11 +64,6 @@ #define KMP_LIBRARY_FILE "@LIBOMP_LIB_FILE@" #define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@ #define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@ -#define LIBOMP_OMP_VERSION @LIBOMP_OMP_VERSION@ -#define OMP_50_ENABLED (LIBOMP_OMP_VERSION >= 50) -#define OMP_45_ENABLED (LIBOMP_OMP_VERSION >= 45) -#define OMP_40_ENABLED (LIBOMP_OMP_VERSION >= 40) -#define OMP_30_ENABLED (LIBOMP_OMP_VERSION >= 30) #cmakedefine01 LIBOMP_TSAN_SUPPORT #if LIBOMP_TSAN_SUPPORT #define TSAN_SUPPORT diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp index eff84e1..c778c97 100644 --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -244,8 +244,6 @@ void __kmpc_pop_num_threads(ident_t *loc, kmp_int32 global_tid) { /* the num_threads are automatically popped */ } -#if OMP_40_ENABLED - void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid, kmp_int32 proc_bind) { KA_TRACE(20, ("__kmpc_push_proc_bind: enter T#%d proc_bind=%d\n", global_tid, @@ -254,8 +252,6 @@ void __kmpc_push_proc_bind(ident_t *loc, kmp_int32 global_tid, __kmp_push_proc_bind(loc, global_tid, (kmp_proc_bind_t)proc_bind); } -#endif /* OMP_40_ENABLED */ - /*! @ingroup PARALLEL @param loc source location information @@ -344,7 +340,6 @@ void __kmpc_fork_call(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, ...) { #endif // KMP_STATS_ENABLED } -#if OMP_40_ENABLED /*! @ingroup PARALLEL @param loc source location information @@ -462,7 +457,6 @@ void __kmpc_fork_teams(ident_t *loc, kmp_int32 argc, kmpc_micro microtask, } #endif // KMP_STATS_ENABLED } -#endif /* OMP_40_ENABLED */ // I don't think this function should ever have been exported. // The __kmpc_ prefix was misapplied. I'm fairly certain that no generated @@ -516,20 +510,15 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif this_thr = __kmp_threads[global_tid]; serial_team = this_thr->th.th_serial_team; -#if OMP_45_ENABLED kmp_task_team_t *task_team = this_thr->th.th_task_team; - // we need to wait for the proxy tasks before finishing the thread if (task_team != NULL && task_team->tt.tt_found_proxy_tasks) __kmp_task_team_wait(this_thr, serial_team USE_ITT_BUILD_ARG(NULL)); -#endif KMP_MB(); KMP_DEBUG_ASSERT(serial_team); @@ -584,9 +573,7 @@ void __kmpc_end_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { serial_team->t.t_dispatch->th_disp_buffer->next; __kmp_free(disp_buffer); } -#if OMP_50_ENABLED this_thr->th.th_def_allocator = serial_team->t.t_def_allocator; // restore -#endif --serial_team->t.t_serialized; if (serial_team->t.t_serialized == 0) { @@ -731,15 +718,12 @@ void __kmpc_barrier(ident_t *loc, kmp_int32 global_tid) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif if (__kmp_env_consistency_check) { if (loc == 0) { KMP_WARNING(ConstructIdentInvalid); // ??? What does it mean for the user? } - __kmp_check_barrier(global_tid, ct_barrier, loc); } @@ -783,9 +767,7 @@ kmp_int32 __kmpc_master(ident_t *loc, kmp_int32 global_tid) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif if (KMP_MASTER_GTID(global_tid)) { KMP_COUNT_BLOCK(OMP_MASTER); @@ -877,9 +859,7 @@ void __kmpc_ordered(ident_t *loc, kmp_int32 gtid) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif #if USE_ITT_BUILD __kmp_itt_ordered_prep(gtid); @@ -1634,9 +1614,7 @@ kmp_int32 __kmpc_barrier_master(ident_t *loc, kmp_int32 global_tid) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif if (__kmp_env_consistency_check) __kmp_check_barrier(global_tid, ct_barrier, loc); @@ -1696,9 +1674,7 @@ kmp_int32 __kmpc_barrier_master_nowait(ident_t *loc, kmp_int32 global_tid) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif if (__kmp_env_consistency_check) { if (loc == 0) { @@ -1919,7 +1895,6 @@ int ompc_get_team_size(int level) { return __kmp_get_team_size(__kmp_entry_gtid(), level); } -#if OMP_50_ENABLED /* OpenMP 5.0 Affinity Format API */ void ompc_set_affinity_format(char const *format) { @@ -1970,7 +1945,6 @@ size_t ompc_capture_affinity(char *buffer, size_t buf_size, __kmp_str_buf_free(&capture_buf); return num_required; } -#endif /* OMP_50_ENABLED */ void kmpc_set_stacksize(int arg) { // __kmp_aux_set_stacksize initializes the library if needed @@ -3345,7 +3319,6 @@ __kmp_end_critical_section_reduce_block(ident_t *loc, kmp_int32 global_tid, #endif // KMP_USE_DYNAMIC_LOCK } // __kmp_end_critical_section_reduce_block -#if OMP_40_ENABLED static __forceinline int __kmp_swap_teams_for_teams_reduction(kmp_info_t *th, kmp_team_t **team_p, int *task_state) { @@ -3380,7 +3353,6 @@ __kmp_restore_swapped_teams(kmp_info_t *th, kmp_team_t *team, int task_state) { th->th.th_task_team = team->t.t_task_team[task_state]; th->th.th_task_state = task_state; } -#endif /* 2.a.i. Reduce Block without a terminating barrier */ /*! @@ -3407,11 +3379,9 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, KMP_COUNT_BLOCK(REDUCE_nowait); int retval = 0; PACKED_REDUCTION_METHOD_T packed_reduction_method; -#if OMP_40_ENABLED kmp_info_t *th; kmp_team_t *team; int teams_swapped = 0, task_state; -#endif KA_TRACE(10, ("__kmpc_reduce_nowait() enter: called T#%d\n", global_tid)); // why do we need this initialization here at all? @@ -3423,9 +3393,7 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif // check correctness of reduce block nesting #if KMP_USE_DYNAMIC_LOCK @@ -3436,10 +3404,8 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, __kmp_push_sync(global_tid, ct_reduce, loc, NULL); #endif -#if OMP_40_ENABLED th = __kmp_thread_from_gtid(global_tid); teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); -#endif // OMP_40_ENABLED // packed_reduction_method value will be reused by __kmp_end_reduce* function, // the value should be kept in a variable @@ -3540,11 +3506,9 @@ __kmpc_reduce_nowait(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, // should never reach this block KMP_ASSERT(0); // "unexpected method" } -#if OMP_40_ENABLED if (teams_swapped) { __kmp_restore_swapped_teams(th, team, task_state); } -#endif KA_TRACE( 10, ("__kmpc_reduce_nowait() exit: called T#%d: method %08x, returns %08x\n", @@ -3630,11 +3594,9 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, KMP_COUNT_BLOCK(REDUCE_wait); int retval = 0; PACKED_REDUCTION_METHOD_T packed_reduction_method; -#if OMP_40_ENABLED kmp_info_t *th; kmp_team_t *team; int teams_swapped = 0, task_state; -#endif KA_TRACE(10, ("__kmpc_reduce() enter: called T#%d\n", global_tid)); @@ -3647,9 +3609,7 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif // check correctness of reduce block nesting #if KMP_USE_DYNAMIC_LOCK @@ -3660,10 +3620,8 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, __kmp_push_sync(global_tid, ct_reduce, loc, NULL); #endif -#if OMP_40_ENABLED th = __kmp_thread_from_gtid(global_tid); teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); -#endif // OMP_40_ENABLED packed_reduction_method = __kmp_determine_reduction_method( loc, global_tid, num_vars, reduce_size, reduce_data, reduce_func, lck); @@ -3726,16 +3684,13 @@ kmp_int32 __kmpc_reduce(ident_t *loc, kmp_int32 global_tid, kmp_int32 num_vars, // should never reach this block KMP_ASSERT(0); // "unexpected method" } -#if OMP_40_ENABLED if (teams_swapped) { __kmp_restore_swapped_teams(th, team, task_state); } -#endif KA_TRACE(10, ("__kmpc_reduce() exit: called T#%d: method %08x, returns %08x\n", global_tid, packed_reduction_method, retval)); - return retval; } @@ -3753,18 +3708,14 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid, kmp_critical_name *lck) { PACKED_REDUCTION_METHOD_T packed_reduction_method; -#if OMP_40_ENABLED kmp_info_t *th; kmp_team_t *team; int teams_swapped = 0, task_state; -#endif KA_TRACE(10, ("__kmpc_end_reduce() enter: called T#%d\n", global_tid)); -#if OMP_40_ENABLED th = __kmp_thread_from_gtid(global_tid); teams_swapped = __kmp_swap_teams_for_teams_reduction(th, &team, &task_state); -#endif // OMP_40_ENABLED packed_reduction_method = __KMP_GET_REDUCTION_METHOD(global_tid); @@ -3772,7 +3723,6 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid, // tool (it's a terminating barrier on constructs if NOWAIT not specified) if (packed_reduction_method == critical_reduce_block) { - __kmp_end_critical_section_reduce_block(loc, global_tid, lck); // TODO: implicit barrier: should be exposed @@ -3853,11 +3803,9 @@ void __kmpc_end_reduce(ident_t *loc, kmp_int32 global_tid, // should never reach this block KMP_ASSERT(0); // "unexpected method" } -#if OMP_40_ENABLED if (teams_swapped) { __kmp_restore_swapped_teams(th, team, task_state); } -#endif if (__kmp_env_consistency_check) __kmp_pop_sync(global_tid, ct_reduce, loc); @@ -3903,7 +3851,6 @@ kmp_uint64 __kmpc_get_parent_taskid() { } // __kmpc_get_parent_taskid -#if OMP_45_ENABLED /*! @ingroup WORK_SHARING @param loc source location information. @@ -4215,9 +4162,7 @@ void __kmpc_doacross_fini(ident_t *loc, int gtid) { pr_buf->th_doacross_info = NULL; KA_TRACE(20, ("__kmpc_doacross_fini() exit: T#%d\n", gtid)); } -#endif -#if OMP_50_ENABLED /* omp_alloc/omp_free only defined for C/C++, not for Fortran */ void *omp_alloc(size_t size, omp_allocator_handle_t allocator) { return __kmpc_alloc(__kmp_entry_gtid(), size, allocator); @@ -4240,6 +4185,3 @@ int __kmpc_pause_resource(kmp_pause_status_t level) { } return __kmp_pause_resource(level); } -#endif // OMP_50_ENABLED - -// end of file // diff --git a/openmp/runtime/src/kmp_debugger.cpp b/openmp/runtime/src/kmp_debugger.cpp index 96b879f..490300f 100644 --- a/openmp/runtime/src/kmp_debugger.cpp +++ b/openmp/runtime/src/kmp_debugger.cpp @@ -101,13 +101,11 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = { offset_and_size_of(kmp_base_info_t, th_bar), offset_and_size_of(kmp_bstate_t, b_worker_arrived), -#if OMP_40_ENABLED // teams information offset_and_size_of(kmp_base_info_t, th_teams_microtask), offset_and_size_of(kmp_base_info_t, th_teams_level), offset_and_size_of(kmp_teams_size_t, nteams), offset_and_size_of(kmp_teams_size_t, nth), -#endif // kmp_desc structure (for info field above) sizeof(kmp_desc_base_t), @@ -133,9 +131,7 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = { offset_and_size_of(kmp_base_team_t, t_pkfn), offset_and_size_of(kmp_base_team_t, t_task_team), offset_and_size_of(kmp_base_team_t, t_implicit_task_taskdata), -#if OMP_40_ENABLED offset_and_size_of(kmp_base_team_t, t_cancel_request), -#endif offset_and_size_of(kmp_base_team_t, t_bar), offset_and_size_of(kmp_balign_team_t, b_master_arrived), offset_and_size_of(kmp_balign_team_t, b_team_arrived), @@ -195,7 +191,6 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = { offset_and_size_of(kmp_taskdata_t, td_taskwait_counter), offset_and_size_of(kmp_taskdata_t, td_taskwait_thread), -#if OMP_40_ENABLED offset_and_size_of(kmp_taskdata_t, td_taskgroup), offset_and_size_of(kmp_taskgroup_t, count), offset_and_size_of(kmp_taskgroup_t, cancel_request), @@ -207,7 +202,6 @@ kmp_omp_struct_info_t __kmp_omp_debug_struct_info = { offset_and_size_of(kmp_base_depnode_t, task), offset_and_size_of(kmp_base_depnode_t, npredecessors), offset_and_size_of(kmp_base_depnode_t, nrefs), -#endif offset_and_size_of(kmp_task_t, routine), // thread_data_t. diff --git a/openmp/runtime/src/kmp_dispatch.cpp b/openmp/runtime/src/kmp_dispatch.cpp index 6ae8234..161a2c6 100644 --- a/openmp/runtime/src/kmp_dispatch.cpp +++ b/openmp/runtime/src/kmp_dispatch.cpp @@ -133,13 +133,10 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid, active = !team->t.t_serialized; #if USE_ITT_BUILD - int itt_need_metadata_reporting = __itt_metadata_add_ptr && - __kmp_forkjoin_frames_mode == 3 && - KMP_MASTER_GTID(gtid) && -#if OMP_40_ENABLED - th->th.th_teams_microtask == NULL && -#endif - team->t.t_active_level == 1; + int itt_need_metadata_reporting = + __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 && + KMP_MASTER_GTID(gtid) && th->th.th_teams_microtask == NULL && + team->t.t_active_level == 1; #endif #if KMP_USE_HIER_SCHED @@ -244,7 +241,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid, schedule = kmp_sch_guided_iterative_chunked; KMP_WARNING(DispatchManyThreads); } -#if OMP_45_ENABLED if (schedule == kmp_sch_runtime_simd) { // compiler provides simd_width in the chunk parameter schedule = team->t.t_sched.r_sched_type; @@ -278,7 +274,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid, } #endif } -#endif // OMP_45_ENABLED pr->u.p.parm1 = chunk; } KMP_ASSERT2((kmp_sch_lower < schedule && schedule < kmp_sch_upper), @@ -461,7 +456,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid, } break; } // case -#if OMP_45_ENABLED case kmp_sch_static_balanced_chunked: { // similar to balanced, but chunk adjusted to multiple of simd width T nth = nproc; @@ -476,7 +470,6 @@ void __kmp_dispatch_init_algorithm(ident_t *loc, int gtid, break; } // case case kmp_sch_guided_simd: -#endif // OMP_45_ENABLED case kmp_sch_guided_iterative_chunked: { KD_TRACE( 100, @@ -783,9 +776,7 @@ __kmp_dispatch_init(ident_t *loc, int gtid, enum sched_type schedule, T lb, if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif #if INCLUDE_SSC_MARKS SSC_MARK_DISPATCH_INIT(); @@ -851,13 +842,10 @@ __kmp_dispatch_init(ident_t *loc, int gtid, enum sched_type schedule, T lb, #if USE_ITT_BUILD kmp_uint64 cur_chunk = chunk; - int itt_need_metadata_reporting = __itt_metadata_add_ptr && - __kmp_forkjoin_frames_mode == 3 && - KMP_MASTER_GTID(gtid) && -#if OMP_40_ENABLED - th->th.th_teams_microtask == NULL && -#endif - team->t.t_active_level == 1; + int itt_need_metadata_reporting = + __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 && + KMP_MASTER_GTID(gtid) && th->th.th_teams_microtask == NULL && + team->t.t_active_level == 1; #endif if (!active) { pr = reinterpret_cast *>( @@ -933,9 +921,7 @@ __kmp_dispatch_init(ident_t *loc, int gtid, enum sched_type schedule, T lb, break; case kmp_sch_guided_iterative_chunked: case kmp_sch_guided_analytical_chunked: -#if OMP_45_ENABLED case kmp_sch_guided_simd: -#endif schedtype = 2; break; default: @@ -1594,7 +1580,6 @@ int __kmp_dispatch_next_algorithm(int gtid, } // case break; -#if OMP_45_ENABLED case kmp_sch_guided_simd: { // same as iterative but curr-chunk adjusted to be multiple of given // chunk @@ -1667,7 +1652,6 @@ int __kmp_dispatch_next_algorithm(int gtid, } // if } // case break; -#endif // OMP_45_ENABLED case kmp_sch_guided_analytical_chunked: { T chunkspec = pr->u.p.parm1; @@ -2203,10 +2187,8 @@ static void __kmp_dist_get_bounds(ident_t *loc, kmp_int32 gtid, } th = __kmp_threads[gtid]; team = th->th.th_team; -#if OMP_40_ENABLED KMP_DEBUG_ASSERT(th->th.th_teams_microtask); // we are in the teams construct nteams = th->th.th_teams_size.nteams; -#endif team_id = team->t.t_master_tid; KMP_DEBUG_ASSERT(nteams == (kmp_uint32)team->t.t_parent->t.t_nproc); diff --git a/openmp/runtime/src/kmp_dispatch.h b/openmp/runtime/src/kmp_dispatch.h index 98979fa..8b3e984 100644 --- a/openmp/runtime/src/kmp_dispatch.h +++ b/openmp/runtime/src/kmp_dispatch.h @@ -171,11 +171,9 @@ template struct dispatch_shared_info_template { dispatch_shared_info64_t s64; } u; volatile kmp_uint32 buffer_index; -#if OMP_45_ENABLED volatile kmp_int32 doacross_buf_idx; // teamwise index kmp_uint32 *doacross_flags; // array of iteration flags (0/1) kmp_int32 doacross_num_done; // count finished threads -#endif #if KMP_USE_HIER_SCHED kmp_hier_t *hier; #endif diff --git a/openmp/runtime/src/kmp_dispatch_hier.h b/openmp/runtime/src/kmp_dispatch_hier.h index dfcee94..24a6d66 100644 --- a/openmp/runtime/src/kmp_dispatch_hier.h +++ b/openmp/runtime/src/kmp_dispatch_hier.h @@ -941,9 +941,7 @@ void __kmp_dispatch_init_hierarchy(ident_t *loc, int n, KMP_DEBUG_ASSERT(new_chunks); if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif th = __kmp_threads[gtid]; team = th->th.th_team; diff --git a/openmp/runtime/src/kmp_ftn_entry.h b/openmp/runtime/src/kmp_ftn_entry.h index abc1a6b..e480e01 100644 --- a/openmp/runtime/src/kmp_ftn_entry.h +++ b/openmp/runtime/src/kmp_ftn_entry.h @@ -20,11 +20,9 @@ #include "kmp_i18n.h" -#if OMP_50_ENABLED // For affinity format functions #include "kmp_io.h" #include "kmp_str.h" -#endif #if OMPT_SUPPORT #include "ompt-specific.h" @@ -349,7 +347,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_THREADS)(void) { #endif } -#if OMP_50_ENABLED int FTN_STDCALL FTN_CONTROL_TOOL(int command, int modifier, void *arg) { #if defined(KMP_STUB) || !OMPT_SUPPORT return -2; @@ -526,7 +523,6 @@ size_t FTN_STDCALL FTN_CAPTURE_AFFINITY(char *buffer, char const *format, return num_required; #endif } -#endif /* OMP_50_ENABLED */ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_THREAD_NUM)(void) { #ifdef KMP_STUB @@ -651,7 +647,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_PARALLEL)(void) { return 0; #else kmp_info_t *th = __kmp_entry_thread(); -#if OMP_40_ENABLED if (th->th.th_teams_microtask) { // AC: r_in_parallel does not work inside teams construct where real // parallel is inactive, but all threads have same root, so setting it in @@ -659,7 +654,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_PARALLEL)(void) { // The solution is to use per-team nesting level return (th->th.th_team->t.t_active_level ? 1 : 0); } else -#endif /* OMP_40_ENABLED */ return (th->th.th_root->r.r_in_parallel ? FTN_TRUE : FTN_FALSE); #endif } @@ -764,8 +758,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IN_FINAL)(void) { #endif } -#if OMP_40_ENABLED - kmp_proc_bind_t FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_PROC_BIND)(void) { #ifdef KMP_STUB return __kmps_get_proc_bind(); @@ -774,7 +766,6 @@ kmp_proc_bind_t FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_PROC_BIND)(void) { #endif } -#if OMP_45_ENABLED int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NUM_PLACES)(void) { #if defined(KMP_STUB) || !KMP_AFFINITY_SUPPORTED return 0; @@ -912,7 +903,6 @@ void } #endif } -#endif int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_NUM_TEAMS)(void) { #ifdef KMP_STUB @@ -972,11 +962,6 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_IS_INITIAL_DEVICE)(void) { return 1; // This is the host } -#endif // OMP_40_ENABLED - -#if OMP_45_ENABLED -// OpenMP 4.5 entries - // libomptarget, if loaded, provides this function int FTN_STDCALL FTN_GET_INITIAL_DEVICE(void) KMP_WEAK_ATTRIBUTE; int FTN_STDCALL FTN_GET_INITIAL_DEVICE(void) { @@ -1025,7 +1010,6 @@ int FTN_STDCALL FTN_TARGET_DISASSOCIATE_PTR(void *host_ptr, int device_num) { return -1; } #endif // defined(KMP_STUB) -#endif // OMP_45_ENABLED #ifdef KMP_STUB typedef enum { UNINIT = -1, UNLOCKED, LOCKED } kmp_stub_lock_t; @@ -1298,7 +1282,6 @@ void FTN_STDCALL FTN_SET_DEFAULTS(char const *str /* ------------------------------------------------------------------------ */ -#if OMP_40_ENABLED /* returns the status of cancellation */ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_CANCELLATION)(void) { #ifdef KMP_STUB @@ -1320,9 +1303,6 @@ int FTN_STDCALL FTN_GET_CANCELLATION_STATUS(int cancel_kind) { #endif } -#endif // OMP_40_ENABLED - -#if OMP_45_ENABLED /* returns the maximum allowed task priority */ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_TASK_PRIORITY)(void) { #ifdef KMP_STUB @@ -1334,9 +1314,7 @@ int FTN_STDCALL KMP_EXPAND_NAME(FTN_GET_MAX_TASK_PRIORITY)(void) { return __kmp_max_task_priority; #endif } -#endif -#if OMP_50_ENABLED // This function will be defined in libomptarget. When libomptarget is not // loaded, we assume we are on the host and return KMP_HOST_DEVICE. // Compiler/libomptarget will handle this if called inside target. @@ -1393,8 +1371,6 @@ void FTN_STDCALL FTN_FULFILL_EVENT(kmp_event_t *event) { #endif } -#endif // OMP_50_ENABLED - // GCC compatibility (versioned symbols) #ifdef KMP_USE_VERSION_SYMBOLS @@ -1469,7 +1445,6 @@ KMP_VERSION_SYMBOL(FTN_TEST_NEST_LOCK, 30, "OMP_3.0"); // OMP_3.1 versioned symbol KMP_VERSION_SYMBOL(FTN_IN_FINAL, 31, "OMP_3.1"); -#if OMP_40_ENABLED // OMP_4.0 versioned symbols KMP_VERSION_SYMBOL(FTN_GET_PROC_BIND, 40, "OMP_4.0"); KMP_VERSION_SYMBOL(FTN_GET_NUM_TEAMS, 40, "OMP_4.0"); @@ -1479,9 +1454,7 @@ KMP_VERSION_SYMBOL(FTN_GET_DEFAULT_DEVICE, 40, "OMP_4.0"); KMP_VERSION_SYMBOL(FTN_SET_DEFAULT_DEVICE, 40, "OMP_4.0"); KMP_VERSION_SYMBOL(FTN_IS_INITIAL_DEVICE, 40, "OMP_4.0"); KMP_VERSION_SYMBOL(FTN_GET_NUM_DEVICES, 40, "OMP_4.0"); -#endif /* OMP_40_ENABLED */ -#if OMP_45_ENABLED // OMP_4.5 versioned symbols KMP_VERSION_SYMBOL(FTN_GET_MAX_TASK_PRIORITY, 45, "OMP_4.5"); KMP_VERSION_SYMBOL(FTN_GET_NUM_PLACES, 45, "OMP_4.5"); @@ -1491,16 +1464,13 @@ KMP_VERSION_SYMBOL(FTN_GET_PLACE_NUM, 45, "OMP_4.5"); KMP_VERSION_SYMBOL(FTN_GET_PARTITION_NUM_PLACES, 45, "OMP_4.5"); KMP_VERSION_SYMBOL(FTN_GET_PARTITION_PLACE_NUMS, 45, "OMP_4.5"); // KMP_VERSION_SYMBOL(FTN_GET_INITIAL_DEVICE, 45, "OMP_4.5"); -#endif -#if OMP_50_ENABLED // OMP_5.0 versioned symbols // KMP_VERSION_SYMBOL(FTN_GET_DEVICE_NUM, 50, "OMP_5.0"); // KMP_VERSION_SYMBOL(FTN_PAUSE_RESOURCE, 50, "OMP_5.0"); // KMP_VERSION_SYMBOL(FTN_PAUSE_RESOURCE_ALL, 50, "OMP_5.0"); // KMP_VERSION_SYMBOL(FTN_GET_SUPPORTED_ACTIVE_LEVELS, 50, "OMP_5.0"); // KMP_VERSION_SYMBOL(FTN_FULFILL_EVENT, 50, "OMP_5.0"); -#endif #endif // KMP_USE_VERSION_SYMBOLS diff --git a/openmp/runtime/src/kmp_ftn_os.h b/openmp/runtime/src/kmp_ftn_os.h index 462c60c..856479c 100644 --- a/openmp/runtime/src/kmp_ftn_os.h +++ b/openmp/runtime/src/kmp_ftn_os.h @@ -71,10 +71,8 @@ #define FTN_GET_TEAM_SIZE omp_get_team_size #define FTN_IN_FINAL omp_in_final #define FTN_GET_PROC_BIND omp_get_proc_bind -#if OMP_40_ENABLED #define FTN_GET_NUM_TEAMS omp_get_num_teams #define FTN_GET_TEAM_NUM omp_get_team_num -#endif #define FTN_INIT_LOCK omp_init_lock #if KMP_USE_DYNAMIC_LOCK #define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint @@ -96,19 +94,14 @@ #define FTN_GET_WTIME omp_get_wtime #define FTN_GET_WTICK omp_get_wtick -#if OMP_40_ENABLED #define FTN_GET_NUM_DEVICES omp_get_num_devices #define FTN_GET_DEFAULT_DEVICE omp_get_default_device #define FTN_SET_DEFAULT_DEVICE omp_set_default_device #define FTN_IS_INITIAL_DEVICE omp_is_initial_device -#endif -#if OMP_40_ENABLED #define FTN_GET_CANCELLATION omp_get_cancellation #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status -#endif -#if OMP_45_ENABLED #define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority #define FTN_GET_NUM_PLACES omp_get_num_places #define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs @@ -126,9 +119,7 @@ #define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr #define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr #endif -#endif -#if OMP_50_ENABLED #define FTN_CONTROL_TOOL omp_control_tool #define FTN_INIT_ALLOCATOR omp_init_allocator #define FTN_DESTROY_ALLOCATOR omp_destroy_allocator @@ -143,7 +134,6 @@ #define FTN_PAUSE_RESOURCE_ALL omp_pause_resource_all #define FTN_GET_SUPPORTED_ACTIVE_LEVELS omp_get_supported_active_levels #define FTN_FULFILL_EVENT omp_fulfill_event -#endif #endif /* KMP_FTN_PLAIN */ @@ -202,10 +192,8 @@ #define FTN_GET_TEAM_SIZE omp_get_team_size_ #define FTN_IN_FINAL omp_in_final_ #define FTN_GET_PROC_BIND omp_get_proc_bind_ -#if OMP_40_ENABLED #define FTN_GET_NUM_TEAMS omp_get_num_teams_ #define FTN_GET_TEAM_NUM omp_get_team_num_ -#endif #define FTN_INIT_LOCK omp_init_lock_ #if KMP_USE_DYNAMIC_LOCK #define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint_ @@ -227,19 +215,14 @@ #define FTN_GET_WTIME omp_get_wtime_ #define FTN_GET_WTICK omp_get_wtick_ -#if OMP_40_ENABLED #define FTN_GET_NUM_DEVICES omp_get_num_devices_ #define FTN_GET_DEFAULT_DEVICE omp_get_default_device_ #define FTN_SET_DEFAULT_DEVICE omp_set_default_device_ #define FTN_IS_INITIAL_DEVICE omp_is_initial_device_ -#endif -#if OMP_40_ENABLED #define FTN_GET_CANCELLATION omp_get_cancellation_ #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status_ -#endif -#if OMP_45_ENABLED #define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority_ #define FTN_GET_NUM_PLACES omp_get_num_places_ #define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs_ @@ -257,9 +240,7 @@ #define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr_ #define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr_ #endif -#endif -#if OMP_50_ENABLED #define FTN_CONTROL_TOOL omp_control_tool_ #define FTN_INIT_ALLOCATOR omp_init_allocator_ #define FTN_DESTROY_ALLOCATOR omp_destroy_allocator_ @@ -276,7 +257,6 @@ #define FTN_PAUSE_RESOURCE_ALL omp_pause_resource_all_ #define FTN_GET_SUPPORTED_ACTIVE_LEVELS omp_get_supported_active_levels_ #define FTN_FULFILL_EVENT omp_fulfill_event_ -#endif #endif /* KMP_FTN_APPEND */ @@ -335,10 +315,8 @@ #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE #define FTN_IN_FINAL OMP_IN_FINAL #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND -#if OMP_40_ENABLED #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM -#endif #define FTN_INIT_LOCK OMP_INIT_LOCK #if KMP_USE_DYNAMIC_LOCK #define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT @@ -360,19 +338,14 @@ #define FTN_GET_WTIME OMP_GET_WTIME #define FTN_GET_WTICK OMP_GET_WTICK -#if OMP_40_ENABLED #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE -#endif -#if OMP_40_ENABLED #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS -#endif -#if OMP_45_ENABLED #define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY #define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES #define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS @@ -390,9 +363,7 @@ #define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR #define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR #endif -#endif -#if OMP_50_ENABLED #define FTN_CONTROL_TOOL OMP_CONTROL_TOOL #define FTN_INIT_ALLOCATOR OMP_INIT_ALLOCATOR #define FTN_DESTROY_ALLOCATOR OMP_DESTROY_ALLOCATOR @@ -407,7 +378,6 @@ #define FTN_PAUSE_RESOURCE_ALL OMP_PAUSE_RESOURCE_ALL #define FTN_GET_SUPPORTED_ACTIVE_LEVELS OMP_GET_SUPPORTED_ACTIVE_LEVELS #define FTN_FULFILL_EVENT OMP_FULFILL_EVENT -#endif #endif /* KMP_FTN_UPPER */ @@ -466,10 +436,8 @@ #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE_ #define FTN_IN_FINAL OMP_IN_FINAL_ #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND_ -#if OMP_40_ENABLED #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS_ #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM_ -#endif #define FTN_INIT_LOCK OMP_INIT_LOCK_ #if KMP_USE_DYNAMIC_LOCK #define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT_ @@ -491,19 +459,14 @@ #define FTN_GET_WTIME OMP_GET_WTIME_ #define FTN_GET_WTICK OMP_GET_WTICK_ -#if OMP_40_ENABLED #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES_ #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE_ #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE_ #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE_ -#endif -#if OMP_40_ENABLED #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION_ #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS_ -#endif -#if OMP_45_ENABLED #define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY_ #define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES_ #define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS_ @@ -521,9 +484,7 @@ #define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR_ #define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR_ #endif -#endif -#if OMP_50_ENABLED #define FTN_CONTROL_TOOL OMP_CONTROL_TOOL_ #define FTN_INIT_ALLOCATOR OMP_INIT_ALLOCATOR_ #define FTN_DESTROY_ALLOCATOR OMP_DESTROY_ALLOCATOR_ @@ -540,7 +501,6 @@ #define FTN_PAUSE_RESOURCE_ALL OMP_PAUSE_RESOURCE_ALL_ #define FTN_GET_SUPPORTED_ACTIVE_LEVELS OMP_GET_SUPPORTED_ACTIVE_LEVELS_ #define FTN_FULFILL_EVENT OMP_FULFILL_EVENT_ -#endif #endif /* KMP_FTN_UAPPEND */ diff --git a/openmp/runtime/src/kmp_global.cpp b/openmp/runtime/src/kmp_global.cpp index 1cfb62d..1ec73b8 100644 --- a/openmp/runtime/src/kmp_global.cpp +++ b/openmp/runtime/src/kmp_global.cpp @@ -202,11 +202,9 @@ const char *__kmp_speculative_statsfile = "-"; #endif // KMP_USE_ADAPTIVE_LOCKS -#if OMP_40_ENABLED int __kmp_display_env = FALSE; int __kmp_display_env_verbose = FALSE; int __kmp_omp_cancellation = FALSE; -#endif /* map OMP 3.0 schedule types with our internal schedule types */ enum sched_type __kmp_sch_map[kmp_sched_upper - kmp_sched_lower_ext + @@ -270,15 +268,10 @@ char *__kmp_cpuinfo_file = NULL; #endif /* KMP_AFFINITY_SUPPORTED */ -#if OMP_40_ENABLED kmp_nested_proc_bind_t __kmp_nested_proc_bind = {NULL, 0, 0}; int __kmp_affinity_num_places = 0; -#endif - -#if OMP_50_ENABLED int __kmp_display_affinity = FALSE; char *__kmp_affinity_format = NULL; -#endif // OMP_50_ENABLED kmp_hws_item_t __kmp_hws_socket = {0, 0}; kmp_hws_item_t __kmp_hws_node = {0, 0}; @@ -288,17 +281,12 @@ kmp_hws_item_t __kmp_hws_proc = {0, 0}; int __kmp_hws_requested = 0; int __kmp_hws_abs_flag = 0; // absolute or per-item number requested -#if OMP_40_ENABLED kmp_int32 __kmp_default_device = 0; -#endif kmp_tasking_mode_t __kmp_tasking_mode = tskm_task_teams; -#if OMP_45_ENABLED kmp_int32 __kmp_max_task_priority = 0; kmp_uint64 __kmp_taskloop_min_tasks = 0; -#endif -#if OMP_50_ENABLED int __kmp_memkind_available = 0; omp_allocator_handle_t const omp_null_allocator = NULL; omp_allocator_handle_t const omp_default_mem_alloc = @@ -331,7 +319,6 @@ omp_memspace_handle_t const omp_high_bw_mem_space = (omp_memspace_handle_t const)3; omp_memspace_handle_t const omp_low_lat_mem_space = (omp_memspace_handle_t const)4; -#endif /* This check ensures that the compiler is passing the correct data type for the flags formal parameter of the function kmpc_omp_task_alloc(). If the type is @@ -539,11 +526,9 @@ int _You_must_link_with_Intel_OpenMP_library = 1; int _You_must_link_with_Microsoft_OpenMP_library = 1; #endif -#if OMP_50_ENABLED kmp_target_offload_kind_t __kmp_target_offload = tgt_default; // OMP Pause Resources kmp_pause_status_t __kmp_pause_status = kmp_not_paused; -#endif // OMP_50_ENABLED // end of file // diff --git a/openmp/runtime/src/kmp_gsupport.cpp b/openmp/runtime/src/kmp_gsupport.cpp index 5d9c44d..d41e027 100644 --- a/openmp/runtime/src/kmp_gsupport.cpp +++ b/openmp/runtime/src/kmp_gsupport.cpp @@ -118,10 +118,7 @@ int KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_START)(void) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); - -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif // 3rd parameter == FALSE prevents kmp_enter_single from pushing a // workshare when USE_CHECKS is defined. We need to avoid the push, @@ -170,10 +167,7 @@ void *KMP_EXPAND_NAME(KMP_API_NAME_GOMP_SINGLE_COPY_START)(void) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); - -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif // If this is the first thread to enter, return NULL. The generated code will // then call GOMP_single_copy_end() for this thread only, with the @@ -595,14 +589,10 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL_END)(void) { return status; \ } -#if OMP_45_ENABLED #define KMP_DOACROSS_FINI(status, gtid) \ if (!status && __kmp_threads[gtid]->th.th_dispatch->th_doacross_flags) { \ __kmpc_doacross_fini(NULL, gtid); \ } -#else -#define KMP_DOACROSS_FINI(status, gtid) /* Nothing */ -#endif #define LOOP_NEXT(func, fini_code) \ int func(long *p_lb, long *p_ub) { \ @@ -658,7 +648,6 @@ LOOP_RUNTIME_START( LOOP_NEXT(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT), { KMP_DISPATCH_FINI_CHUNK(&loc, gtid); }) -#if OMP_45_ENABLED #define LOOP_DOACROSS_START(func, schedule) \ bool func(unsigned ncounts, long *counts, long chunk_sz, long *p_lb, \ long *p_ub) { \ @@ -764,7 +753,6 @@ LOOP_DOACROSS_START( LOOP_DOACROSS_RUNTIME_START( KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_DOACROSS_RUNTIME_START), kmp_sch_runtime) -#endif // OMP_45_ENABLED void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_END)(void) { int gtid = __kmp_get_gtid(); @@ -927,7 +915,6 @@ LOOP_RUNTIME_START_ULL( LOOP_NEXT_ULL(KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT), { KMP_DISPATCH_FINI_CHUNK_ULL(&loc, gtid); }) -#if OMP_45_ENABLED #define LOOP_DOACROSS_START_ULL(func, schedule) \ int func(unsigned ncounts, unsigned long long *counts, \ unsigned long long chunk_sz, unsigned long long *p_lb, \ @@ -1037,7 +1024,6 @@ LOOP_DOACROSS_START_ULL( LOOP_DOACROSS_RUNTIME_START_ULL( KMP_EXPAND_NAME(KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START), kmp_sch_runtime) -#endif // Combined parallel / loop worksharing constructs // @@ -1120,12 +1106,8 @@ PARALLEL_LOOP_START( void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data, void (*copy_func)(void *, void *), long arg_size, long arg_align, - bool if_cond, unsigned gomp_flags -#if OMP_40_ENABLED - , - void **depend -#endif - ) { + bool if_cond, unsigned gomp_flags, + void **depend) { MKLOC(loc, "GOMP_task"); int gtid = __kmp_entry_gtid(); kmp_int32 flags = 0; @@ -1176,7 +1158,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data, #endif if (if_cond) { -#if OMP_40_ENABLED if (gomp_flags & 8) { KMP_ASSERT(depend); const size_t ndeps = (kmp_intptr_t)depend[0]; @@ -1191,7 +1172,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data, } __kmpc_omp_task_with_deps(&loc, gtid, task, ndeps, dep_list, 0, NULL); } else { -#endif __kmpc_omp_task(&loc, gtid, task); } } else { @@ -1376,8 +1356,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TASKYIELD)(void) { return; } -#if OMP_40_ENABLED // these are new GOMP_4.0 entry points - void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_PARALLEL)(void (*task)(void *), void *data, unsigned num_threads, @@ -1635,9 +1613,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_TEAMS)(unsigned int num_teams, unsigned int thread_limit) { return; } -#endif // OMP_40_ENABLED - -#if OMP_45_ENABLED // Task duplication function which copies src to dest (both are // preallocated task structures) @@ -1838,8 +1813,6 @@ void KMP_EXPAND_NAME(KMP_API_NAME_GOMP_DOACROSS_ULL_WAIT)( va_end(args); } -#endif // OMP_45_ENABLED - /* The following sections of code create aliases for the GOMP_* functions, then create versioned symbols using the assembler directive .symver. This is only pertinent for ELF .so library. The KMP_VERSION_SYMBOL macro is defined in @@ -1927,7 +1900,6 @@ KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START, 20, "GOMP_2.0"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKYIELD, 30, "GOMP_3.0"); // GOMP_4.0 versioned symbols -#if OMP_40_ENABLED KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL, 40, "GOMP_4.0"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_SECTIONS, 40, "GOMP_4.0"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC, 40, "GOMP_4.0"); @@ -1946,10 +1918,8 @@ KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_DATA, 40, "GOMP_4.0"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_END_DATA, 40, "GOMP_4.0"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TARGET_UPDATE, 40, "GOMP_4.0"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TEAMS, 40, "GOMP_4.0"); -#endif // GOMP_4.5 versioned symbols -#if OMP_45_ENABLED KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKLOOP, 45, "GOMP_4.5"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_TASKLOOP_ULL, 45, "GOMP_4.5"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_DOACROSS_POST, 45, "GOMP_4.5"); @@ -1972,7 +1942,6 @@ KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_GUIDED_START, 45, "GOMP_4.5"); KMP_VERSION_SYMBOL(KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START, 45, "GOMP_4.5"); -#endif #endif // KMP_USE_VERSION_SYMBOLS diff --git a/openmp/runtime/src/kmp_omp.h b/openmp/runtime/src/kmp_omp.h index bd0c698..27b550d 100644 --- a/openmp/runtime/src/kmp_omp.h +++ b/openmp/runtime/src/kmp_omp.h @@ -106,16 +106,14 @@ typedef struct { th_task_state; // alternating 0/1 for task team identification offset_and_size_t th_bar; offset_and_size_t th_b_worker_arrived; // the worker increases it by 1 when it -// arrives to the barrier + // arrives to the barrier -#if OMP_40_ENABLED /* teams information */ offset_and_size_t th_teams_microtask; // entry address for teams construct offset_and_size_t th_teams_level; // initial level of teams construct offset_and_size_t th_teams_nteams; // number of teams in a league offset_and_size_t th_teams_nth; // number of threads in each team of the league -#endif /* kmp_desc structure (for info field above) */ kmp_int32 ds_sizeof_struct; @@ -135,9 +133,7 @@ typedef struct { offset_and_size_t t_pkfn; offset_and_size_t t_task_team; // task team structure offset_and_size_t t_implicit_task; // taskdata for the thread's implicit task -#if OMP_40_ENABLED offset_and_size_t t_cancel_request; -#endif offset_and_size_t t_bar; offset_and_size_t t_b_master_arrived; // increased by 1 when master arrives to a barrier @@ -203,7 +199,6 @@ typedef struct { offset_and_size_t td_taskwait_thread; // gtid + 1 of thread encountered taskwait -#if OMP_40_ENABLED /* Taskgroup */ offset_and_size_t td_taskgroup; // pointer to the current taskgroup offset_and_size_t @@ -219,7 +214,6 @@ typedef struct { offset_and_size_t dn_task; offset_and_size_t dn_npredecessors; offset_and_size_t dn_nrefs; -#endif offset_and_size_t dn_routine; /* kmp_thread_data_t */ diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h index a738816..c4c7bcf 100644 --- a/openmp/runtime/src/kmp_os.h +++ b/openmp/runtime/src/kmp_os.h @@ -965,9 +965,7 @@ typedef void (*microtask_t)(int *gtid, int *npr, ...); #endif // Enable dynamic user lock -#if OMP_45_ENABLED #define KMP_USE_DYNAMIC_LOCK 1 -#endif // Enable Intel(R) Transactional Synchronization Extensions (Intel(R) TSX) if // dynamic user lock is turned on diff --git a/openmp/runtime/src/kmp_runtime.cpp b/openmp/runtime/src/kmp_runtime.cpp index 4167d19..7f6c149 100644 --- a/openmp/runtime/src/kmp_runtime.cpp +++ b/openmp/runtime/src/kmp_runtime.cpp @@ -46,16 +46,8 @@ char const __kmp_version_alt_comp[] = KMP_VERSION_PREFIX "alternative compiler support: yes"; #endif /* defined(KMP_GOMP_COMPAT) */ -char const __kmp_version_omp_api[] = KMP_VERSION_PREFIX "API version: " -#if OMP_50_ENABLED - "5.0 (201611)"; -#elif OMP_45_ENABLED - "4.5 (201511)"; -#elif OMP_40_ENABLED - "4.0 (201307)"; -#else - "3.1 (201107)"; -#endif +char const __kmp_version_omp_api[] = + KMP_VERSION_PREFIX "API version: 5.0 (201611)"; #ifdef KMP_DEBUG char const __kmp_version_lock[] = @@ -79,7 +71,7 @@ static void __kmp_initialize_info(kmp_info_t *, kmp_team_t *, int tid, static void __kmp_initialize_team(kmp_team_t *team, int new_nproc, kmp_internal_control_t *new_icvs, ident_t *loc); -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED +#if KMP_AFFINITY_SUPPORTED static void __kmp_partition_places(kmp_team_t *team, int update_master_only = 0); #endif @@ -534,16 +526,8 @@ static void __kmp_print_team_storage_map(const char *header, kmp_team_t *team, "%s_%d.t_disp_buffer", header, team_id); } -static void __kmp_init_allocator() { -#if OMP_50_ENABLED - __kmp_init_memkind(); -#endif -} -static void __kmp_fini_allocator() { -#if OMP_50_ENABLED - __kmp_fini_memkind(); -#endif -} +static void __kmp_init_allocator() { __kmp_init_memkind(); } +static void __kmp_fini_allocator() { __kmp_fini_memkind(); } /* ------------------------------------------------------------------------ */ @@ -728,10 +712,7 @@ int __kmp_enter_single(int gtid, ident_t *id_ref, int push_ws) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); - -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif th = __kmp_threads[gtid]; team = th->th.th_team; @@ -754,10 +735,7 @@ int __kmp_enter_single(int gtid, ident_t *id_ref, int push_ws) { } #if USE_ITT_BUILD if (__itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 && - KMP_MASTER_GTID(gtid) && -#if OMP_40_ENABLED - th->th.th_teams_microtask == NULL && -#endif + KMP_MASTER_GTID(gtid) && th->th.th_teams_microtask == NULL && team->t.t_active_level == 1) { // Only report metadata by master of active team at level 1 __kmp_itt_metadata_single(id_ref); @@ -795,12 +773,8 @@ void __kmp_exit_single(int gtid) { * otherwise the number of threads to use * The forkjoin lock is held by the caller. */ static int __kmp_reserve_threads(kmp_root_t *root, kmp_team_t *parent_team, - int master_tid, int set_nthreads -#if OMP_40_ENABLED - , - int enter_teams -#endif /* OMP_40_ENABLED */ - ) { + int master_tid, int set_nthreads, + int enter_teams) { int capacity; int new_nthreads; KMP_DEBUG_ASSERT(__kmp_init_serial); @@ -1053,11 +1027,9 @@ static void __kmp_fork_team_threads(kmp_root_t *root, kmp_team_t *team, __kmp_gtid_from_tid(i, team), team->t.t_id, i, team->t.t_bar[bs_forkjoin_barrier].b_arrived, team->t.t_bar[bs_plain_barrier].b_arrived)); -#if OMP_40_ENABLED thr->th.th_teams_microtask = master_th->th.th_teams_microtask; thr->th.th_teams_level = master_th->th.th_teams_level; thr->th.th_teams_size = master_th->th.th_teams_size; -#endif { // Initialize threads' barrier data. int b; kmp_balign_t *balign = team->t.t_threads[i]->th.th_bar; @@ -1071,12 +1043,11 @@ static void __kmp_fork_team_threads(kmp_root_t *root, kmp_team_t *team, } } -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED +#if KMP_AFFINITY_SUPPORTED __kmp_partition_places(team); #endif } -#if OMP_50_ENABLED if (__kmp_display_affinity && team->t.t_display_affinity != 1) { for (i = 0; i < team->t.t_nproc; i++) { kmp_info_t *thr = team->t.t_threads[i]; @@ -1087,7 +1058,6 @@ static void __kmp_fork_team_threads(kmp_root_t *root, kmp_team_t *team, } } } -#endif KMP_MB(); } @@ -1172,10 +1142,7 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); - -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif this_thr = __kmp_threads[global_tid]; serial_team = this_thr->th.th_serial_team; @@ -1196,7 +1163,6 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { this_thr->th.th_task_team = NULL; } -#if OMP_40_ENABLED kmp_proc_bind_t proc_bind = this_thr->th.th_set_proc_bind; if (this_thr->th.th_current_task->td_icvs.proc_bind == proc_bind_false) { proc_bind = proc_bind_false; @@ -1207,7 +1173,6 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { } // Reset for next parallel region this_thr->th.th_set_proc_bind = proc_bind_default; -#endif /* OMP_40_ENABLED */ #if OMPT_SUPPORT ompt_data_t ompt_parallel_data = ompt_data_none; @@ -1242,15 +1207,13 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { __kmp_acquire_bootstrap_lock(&__kmp_forkjoin_lock); - new_team = __kmp_allocate_team(this_thr->th.th_root, 1, 1, + new_team = + __kmp_allocate_team(this_thr->th.th_root, 1, 1, #if OMPT_SUPPORT - ompt_parallel_data, -#endif -#if OMP_40_ENABLED - proc_bind, + ompt_parallel_data, #endif - &this_thr->th.th_current_task->td_icvs, - 0 USE_NESTED_HOT_ARG(NULL)); + proc_bind, &this_thr->th.th_current_task->td_icvs, + 0 USE_NESTED_HOT_ARG(NULL)); __kmp_release_bootstrap_lock(&__kmp_forkjoin_lock); KMP_ASSERT(new_team); @@ -1307,13 +1270,11 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { __kmp_nested_nth.nth[level + 1]; } -#if OMP_40_ENABLED if (__kmp_nested_proc_bind.used && (level + 1 < __kmp_nested_proc_bind.used)) { this_thr->th.th_current_task->td_icvs.proc_bind = __kmp_nested_proc_bind.bind_types[level + 1]; } -#endif /* OMP_40_ENABLED */ #if USE_DEBUGGER serial_team->t.t_pkfn = (microtask_t)(~0); // For the debugger. @@ -1327,9 +1288,7 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { serial_team->t.t_level = serial_team->t.t_parent->t.t_level + 1; serial_team->t.t_active_level = serial_team->t.t_parent->t.t_active_level; -#if OMP_50_ENABLED serial_team->t.t_def_allocator = this_thr->th.th_def_allocator; // save -#endif propagateFPControl(serial_team); @@ -1379,11 +1338,8 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { KMP_MB(); } -#if OMP_40_ENABLED KMP_CHECK_UPDATE(serial_team->t.t_cancel_request, cancel_noreq); -#endif -#if OMP_50_ENABLED // Perform the display affinity functionality for // serialized parallel regions if (__kmp_display_affinity) { @@ -1395,7 +1351,6 @@ void __kmp_serialized_parallel(ident_t *loc, kmp_int32 global_tid) { this_thr->th.th_prev_num_threads = 1; } } -#endif if (__kmp_env_consistency_check) __kmp_push_parallel(global_tid, NULL); @@ -1453,10 +1408,8 @@ int __kmp_fork_call(ident_t *loc, int gtid, int master_active; int master_set_numthreads; int level; -#if OMP_40_ENABLED int active_level; int teams_level; -#endif #if KMP_NESTED_HOT_TEAMS kmp_hot_team_ptr_t **p_hot_teams; #endif @@ -1479,10 +1432,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, __kmp_init_serial); // AC: potentially unsafe, not in sync with shutdown if (!TCR_4(__kmp_init_parallel)) __kmp_parallel_initialize(); - -#if OMP_50_ENABLED __kmp_resume_if_soft_paused(); -#endif /* setup current data */ master_th = __kmp_threads[gtid]; // AC: potentially unsafe, not in sync with @@ -1512,10 +1462,8 @@ int __kmp_fork_call(ident_t *loc, int gtid, level = parent_team->t.t_level; // used to launch non-serial teams even if nested is not allowed active_level = parent_team->t.t_active_level; -#if OMP_40_ENABLED // needed to check nesting inside the teams teams_level = master_th->th.th_teams_level; -#endif #if KMP_NESTED_HOT_TEAMS p_hot_teams = &master_th->th.th_hot_teams; if (*p_hot_teams == NULL && __kmp_hot_teams_max_level > 0) { @@ -1543,7 +1491,6 @@ int __kmp_fork_call(ident_t *loc, int gtid, master_th->th.th_ident = loc; -#if OMP_40_ENABLED if (master_th->th.th_teams_microtask && ap && microtask != (microtask_t)__kmp_teams_master && level == teams_level) { // AC: This is start of parallel that is nested inside teams construct. @@ -1637,9 +1584,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, KMP_ATOMIC_INC(&root->r.r_in_parallel); parent_team->t.t_active_level++; parent_team->t.t_level++; -#if OMP_50_ENABLED parent_team->t.t_def_allocator = master_th->th.th_def_allocator; // save -#endif /* Change number of threads in the team if requested */ if (master_set_numthreads) { // The parallel has num_threads clause @@ -1687,7 +1632,6 @@ int __kmp_fork_call(ident_t *loc, int gtid, return TRUE; } // Parallel closely nested in teams construct -#endif /* OMP_40_ENABLED */ #if KMP_DEBUG if (__kmp_tasking_mode != tskm_immediate_exec) { @@ -1700,10 +1644,8 @@ int __kmp_fork_call(ident_t *loc, int gtid, master_th->th.th_current_task->td_icvs.max_active_levels) { nthreads = 1; } else { -#if OMP_40_ENABLED int enter_teams = ((ap == NULL && active_level == 0) || (ap && teams_level > 0 && teams_level == level)); -#endif nthreads = master_set_numthreads ? master_set_numthreads @@ -1715,11 +1657,8 @@ int __kmp_fork_call(ident_t *loc, int gtid, // parallel out of teams construct). This code moved here from // __kmp_reserve_threads() to speedup nested serialized parallels. if (nthreads > 1) { - if ((get__max_active_levels(master_th) == 1 && (root->r.r_in_parallel -#if OMP_40_ENABLED - && !enter_teams -#endif /* OMP_40_ENABLED */ - )) || + if ((get__max_active_levels(master_th) == 1 && + (root->r.r_in_parallel && !enter_teams)) || (__kmp_library == library_serial)) { KC_TRACE(10, ("__kmp_fork_call: T#%d serializing team; requested %d" " threads\n", @@ -1730,18 +1669,12 @@ int __kmp_fork_call(ident_t *loc, int gtid, if (nthreads > 1) { /* determine how many new threads we can use */ __kmp_acquire_bootstrap_lock(&__kmp_forkjoin_lock); - nthreads = __kmp_reserve_threads( - root, parent_team, master_tid, nthreads -#if OMP_40_ENABLED - /* AC: If we execute teams from parallel region (on host), then - teams should be created but each can only have 1 thread if - nesting is disabled. If teams called from serial region, then - teams and their threads should be created regardless of the - nesting setting. */ - , - enter_teams -#endif /* OMP_40_ENABLED */ - ); + /* AC: If we execute teams from parallel region (on host), then teams + should be created but each can only have 1 thread if nesting is + disabled. If teams called from serial region, then teams and their + threads should be created regardless of the nesting setting. */ + nthreads = __kmp_reserve_threads(root, parent_team, master_tid, + nthreads, enter_teams); if (nthreads == 1) { // Free lock for single thread execution here; for multi-thread // execution it will be freed later after team of threads created @@ -1774,7 +1707,6 @@ int __kmp_fork_call(ident_t *loc, int gtid, if (call_context == fork_context_intel) { /* TODO this sucks, use the compiler itself to pass args! :) */ master_th->th.th_serial_team->t.t_ident = loc; -#if OMP_40_ENABLED if (!ap) { // revert change made in __kmpc_serialized_parallel() master_th->th.th_serial_team->t.t_level--; @@ -1869,14 +1801,13 @@ int __kmp_fork_call(ident_t *loc, int gtid, // AC: call special invoker for outer "parallel" of teams construct invoker(gtid); } else { -#endif /* OMP_40_ENABLED */ argv = args; for (i = argc - 1; i >= 0; --i) // TODO: revert workaround for Intel(R) 64 tracker #96 #if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX *argv++ = va_arg(*ap, void *); #else - *argv++ = va_arg(ap, void *); + *argv++ = va_arg(ap, void *); #endif KMP_MB(); @@ -1942,9 +1873,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, master_th->th.ompt_thread_info.state = ompt_state_overhead; } #endif -#if OMP_40_ENABLED } -#endif /* OMP_40_ENABLED */ } else if (call_context == fork_context_gnu) { #if OMPT_SUPPORT ompt_lw_taskteam_t lwt; @@ -1981,10 +1910,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, // KMP_ASSERT( master_th->th.th_current_task->td_flags.executing == 1 ); master_th->th.th_current_task->td_flags.executing = 0; -#if OMP_40_ENABLED - if (!master_th->th.th_teams_microtask || level > teams_level) -#endif /* OMP_40_ENABLED */ - { + if (!master_th->th.th_teams_microtask || level > teams_level) { /* Increment our nested depth level */ KMP_ATOMIC_INC(&root->r.r_in_parallel); } @@ -1998,7 +1924,6 @@ int __kmp_fork_call(ident_t *loc, int gtid, nthreads_icv = 0; // don't update } -#if OMP_40_ENABLED // Figure out the proc_bind_policy for the new team. kmp_proc_bind_t proc_bind = master_th->th.th_set_proc_bind; kmp_proc_bind_t proc_bind_icv = @@ -2024,25 +1949,17 @@ int __kmp_fork_call(ident_t *loc, int gtid, // Reset for next parallel region master_th->th.th_set_proc_bind = proc_bind_default; -#endif /* OMP_40_ENABLED */ - if ((nthreads_icv > 0) -#if OMP_40_ENABLED - || (proc_bind_icv != proc_bind_default) -#endif /* OMP_40_ENABLED */ - ) { + if ((nthreads_icv > 0) || (proc_bind_icv != proc_bind_default)) { kmp_internal_control_t new_icvs; copy_icvs(&new_icvs, &master_th->th.th_current_task->td_icvs); new_icvs.next = NULL; if (nthreads_icv > 0) { new_icvs.nproc = nthreads_icv; } - -#if OMP_40_ENABLED if (proc_bind_icv != proc_bind_default) { new_icvs.proc_bind = proc_bind_icv; } -#endif /* OMP_40_ENABLED */ /* allocate a new parallel team */ KF_TRACE(10, ("__kmp_fork_call: before __kmp_allocate_team\n")); @@ -2050,10 +1967,8 @@ int __kmp_fork_call(ident_t *loc, int gtid, #if OMPT_SUPPORT ompt_parallel_data, #endif -#if OMP_40_ENABLED - proc_bind, -#endif - &new_icvs, argc USE_NESTED_HOT_ARG(master_th)); + proc_bind, &new_icvs, + argc USE_NESTED_HOT_ARG(master_th)); } else { /* allocate a new parallel team */ KF_TRACE(10, ("__kmp_fork_call: before __kmp_allocate_team\n")); @@ -2061,9 +1976,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, #if OMPT_SUPPORT ompt_parallel_data, #endif -#if OMP_40_ENABLED proc_bind, -#endif &master_th->th.th_current_task->td_icvs, argc USE_NESTED_HOT_ARG(master_th)); } @@ -2081,15 +1994,12 @@ int __kmp_fork_call(ident_t *loc, int gtid, return_address); #endif KMP_CHECK_UPDATE(team->t.t_invoke, invoker); // TODO move to root, maybe -// TODO: parent_team->t.t_level == INT_MAX ??? -#if OMP_40_ENABLED + // TODO: parent_team->t.t_level == INT_MAX ??? if (!master_th->th.th_teams_microtask || level > teams_level) { -#endif /* OMP_40_ENABLED */ int new_level = parent_team->t.t_level + 1; KMP_CHECK_UPDATE(team->t.t_level, new_level); new_level = parent_team->t.t_active_level + 1; KMP_CHECK_UPDATE(team->t.t_active_level, new_level); -#if OMP_40_ENABLED } else { // AC: Do not increase parallel level at start of the teams construct int new_level = parent_team->t.t_level; @@ -2097,17 +2007,12 @@ int __kmp_fork_call(ident_t *loc, int gtid, new_level = parent_team->t.t_active_level; KMP_CHECK_UPDATE(team->t.t_active_level, new_level); } -#endif /* OMP_40_ENABLED */ kmp_r_sched_t new_sched = get__sched_2(parent_team, master_tid); // set master's schedule as new run-time schedule KMP_CHECK_UPDATE(team->t.t_sched.sched, new_sched.sched); -#if OMP_40_ENABLED KMP_CHECK_UPDATE(team->t.t_cancel_request, cancel_noreq); -#endif -#if OMP_50_ENABLED KMP_CHECK_UPDATE(team->t.t_def_allocator, master_th->th.th_def_allocator); -#endif // Update the floating point rounding in the team if required. propagateFPControl(team); @@ -2183,27 +2088,23 @@ int __kmp_fork_call(ident_t *loc, int gtid, /* now, setup the arguments */ argv = (void **)team->t.t_argv; -#if OMP_40_ENABLED if (ap) { -#endif /* OMP_40_ENABLED */ for (i = argc - 1; i >= 0; --i) { // TODO: revert workaround for Intel(R) 64 tracker #96 #if (KMP_ARCH_X86_64 || KMP_ARCH_ARM || KMP_ARCH_AARCH64) && KMP_OS_LINUX void *new_argv = va_arg(*ap, void *); #else - void *new_argv = va_arg(ap, void *); + void *new_argv = va_arg(ap, void *); #endif KMP_CHECK_UPDATE(*argv, new_argv); argv++; } -#if OMP_40_ENABLED } else { for (i = 0; i < argc; ++i) { // Get args from parent team for teams construct KMP_CHECK_UPDATE(argv[i], team->t.t_parent->t.t_argv[i]); } } -#endif /* OMP_40_ENABLED */ /* now actually fork the threads */ KMP_CHECK_UPDATE(team->t.t_master_active, master_active); @@ -2222,10 +2123,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, #if USE_ITT_BUILD if (team->t.t_active_level == 1 // only report frames at level 1 -#if OMP_40_ENABLED - && !master_th->th.th_teams_microtask // not in teams construct -#endif /* OMP_40_ENABLED */ - ) { + && !master_th->th.th_teams_microtask) { // not in teams construct #if USE_ITT_NOTIFY if ((__itt_frame_submit_v3_ptr || KMP_ITT_DEBUG) && (__kmp_forkjoin_frames_mode == 3 || @@ -2263,12 +2161,9 @@ int __kmp_fork_call(ident_t *loc, int gtid, } #endif /* USE_ITT_BUILD */ -#if OMP_40_ENABLED // AC: skip __kmp_internal_fork at teams construct, let only master // threads execute - if (ap) -#endif /* OMP_40_ENABLED */ - { + if (ap) { __kmp_internal_fork(loc, gtid, team); KF_TRACE(10, ("__kmp_internal_fork : after : root=%p, team=%p, " "master_th=%p, gtid=%d\n", @@ -2285,7 +2180,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, team->t.t_id, team->t.t_pkfn)); } // END of timer KMP_fork_call block -#if KMP_STATS_ENABLED && OMP_40_ENABLED +#if KMP_STATS_ENABLED // If beginning a teams construct, then change thread state stats_state_e previous_state = KMP_GET_THREAD_STATE(); if (!ap) { @@ -2297,7 +2192,7 @@ int __kmp_fork_call(ident_t *loc, int gtid, KMP_ASSERT2(0, "cannot invoke microtask for MASTER thread"); } -#if KMP_STATS_ENABLED && OMP_40_ENABLED +#if KMP_STATS_ENABLED // If was beginning of a teams construct, then reset thread state if (!ap) { KMP_SET_THREAD_STATE(previous_state); @@ -2348,11 +2243,8 @@ void __kmp_join_call(ident_t *loc, int gtid , enum fork_context_e fork_context #endif -#if OMP_40_ENABLED , - int exit_teams -#endif /* OMP_40_ENABLED */ - ) { + int exit_teams) { KMP_TIME_DEVELOPER_PARTITIONED_BLOCK(KMP_join_call); kmp_team_t *team; kmp_team_t *parent_team; @@ -2389,7 +2281,6 @@ void __kmp_join_call(ident_t *loc, int gtid #endif if (team->t.t_serialized) { -#if OMP_40_ENABLED if (master_th->th.th_teams_microtask) { // We are in teams construct int level = team->t.t_level; @@ -2405,7 +2296,6 @@ void __kmp_join_call(ident_t *loc, int gtid team->t.t_serialized++; } } -#endif /* OMP_40_ENABLED */ __kmpc_end_serialized_parallel(loc, gtid); #if OMPT_SUPPORT @@ -2419,20 +2309,14 @@ void __kmp_join_call(ident_t *loc, int gtid master_active = team->t.t_master_active; -#if OMP_40_ENABLED - if (!exit_teams) -#endif /* OMP_40_ENABLED */ - { + if (!exit_teams) { // AC: No barrier for internal teams at exit from teams construct. // But there is barrier for external team (league). __kmp_internal_join(loc, gtid, team); - } -#if OMP_40_ENABLED - else { + } else { master_th->th.th_task_state = 0; // AC: no tasking in teams (out of any parallel) } -#endif /* OMP_40_ENABLED */ KMP_MB(); @@ -2449,11 +2333,8 @@ void __kmp_join_call(ident_t *loc, int gtid } // Mark end of "parallel" region for Intel(R) VTune(TM) analyzer. - if (team->t.t_active_level == 1 -#if OMP_40_ENABLED - && !master_th->th.th_teams_microtask /* not in teams construct */ -#endif /* OMP_40_ENABLED */ - ) { + if (team->t.t_active_level == 1 && + !master_th->th.th_teams_microtask) { /* not in teams construct */ master_th->th.th_ident = loc; // only one notification scheme (either "submit" or "forking/joined", not // both) @@ -2468,7 +2349,6 @@ void __kmp_join_call(ident_t *loc, int gtid } // active_level == 1 #endif /* USE_ITT_BUILD */ -#if OMP_40_ENABLED if (master_th->th.th_teams_microtask && !exit_teams && team->t.t_pkfn != (microtask_t)__kmp_teams_master && team->t.t_level == master_th->th.th_teams_level + 1) { @@ -2521,7 +2401,6 @@ void __kmp_join_call(ident_t *loc, int gtid return; } -#endif /* OMP_40_ENABLED */ /* do cleanup and restore the parent team */ master_th->th.th_info.ds.ds_tid = team->t.t_master_tid; @@ -2534,11 +2413,8 @@ void __kmp_join_call(ident_t *loc, int gtid from the serial user code called after this function returns. */ __kmp_acquire_bootstrap_lock(&__kmp_forkjoin_lock); -#if OMP_40_ENABLED if (!master_th->th.th_teams_microtask || - team->t.t_level > master_th->th.th_teams_level) -#endif /* OMP_40_ENABLED */ - { + team->t.t_level > master_th->th.th_teams_level) { /* Decrement our nested depth level */ KMP_ATOMIC_DEC(&root->r.r_in_parallel); } @@ -2563,14 +2439,12 @@ void __kmp_join_call(ident_t *loc, int gtid master_th, team)); __kmp_pop_current_task_from_thread(master_th); -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED +#if KMP_AFFINITY_SUPPORTED // Restore master thread's partition. master_th->th.th_first_place = team->t.t_first_place; master_th->th.th_last_place = team->t.t_last_place; -#endif /* OMP_40_ENABLED */ -#if OMP_50_ENABLED +#endif // KMP_AFFINITY_SUPPORTED master_th->th.th_def_allocator = team->t.t_def_allocator; -#endif updateHWFPControl(team); @@ -2930,7 +2804,6 @@ int __kmp_get_ancestor_thread_num(int gtid, int level) { if (level > ii) return -1; -#if OMP_40_ENABLED if (thr->th.th_teams_microtask) { // AC: we are in teams region where multiple nested teams have same level int tlevel = thr->th.th_teams_level; // the level of the teams construct @@ -2946,7 +2819,6 @@ int __kmp_get_ancestor_thread_num(int gtid, int level) { } } } -#endif if (ii == level) return __kmp_tid_from_gtid(gtid); @@ -2990,7 +2862,6 @@ int __kmp_get_team_size(int gtid, int level) { if (level > ii) return -1; -#if OMP_40_ENABLED if (thr->th.th_teams_microtask) { // AC: we are in teams region where multiple nested teams have same level int tlevel = thr->th.th_teams_level; // the level of the teams construct @@ -3006,7 +2877,6 @@ int __kmp_get_team_size(int gtid, int level) { } } } -#endif while (ii > level) { for (dd = team->t.t_serialized; (dd > 0) && (ii > level); dd--, ii--) { @@ -3036,9 +2906,7 @@ kmp_r_sched_t __kmp_get_schedule_global() { // KMP_SCHEDULE multiple times, and thus have different run-time schedules in // different roots (even in OMP 2.5) enum sched_type s = SCHEDULE_WITHOUT_MODIFIERS(__kmp_sched); -#if OMP_45_ENABLED enum sched_type sched_modifiers = SCHEDULE_GET_MODIFIERS(__kmp_sched); -#endif if (s == kmp_sch_static) { // replace STATIC with more detailed schedule (balanced or greedy) r_sched.r_sched_type = __kmp_static; @@ -3048,9 +2916,7 @@ kmp_r_sched_t __kmp_get_schedule_global() { } else { // (STATIC_CHUNKED), or (DYNAMIC_CHUNKED), or other r_sched.r_sched_type = __kmp_sched; } -#if OMP_45_ENABLED SCHEDULE_SET_MODIFIERS(r_sched.r_sched_type, sched_modifiers); -#endif if (__kmp_chunk < KMP_DEFAULT_CHUNK) { // __kmp_chunk may be wrong here (if it was not ever set) @@ -3126,9 +2992,7 @@ static void __kmp_allocate_team_arrays(kmp_team_t *team, int max_nth) { /* setup dispatch buffers */ for (i = 0; i < num_disp_buff; ++i) { team->t.t_disp_buffer[i].buffer_index = i; -#if OMP_45_ENABLED team->t.t_disp_buffer[i].doacross_buf_idx = i; -#endif } } @@ -3173,9 +3037,7 @@ static kmp_internal_control_t __kmp_get_global_icvs(void) { kmp_r_sched_t r_sched = __kmp_get_schedule_global(); // get current state of scheduling globals -#if OMP_40_ENABLED KMP_DEBUG_ASSERT(__kmp_nested_proc_bind.used > 0); -#endif /* OMP_40_ENABLED */ kmp_internal_control_t g_icvs = { 0, // int serial_nesting_level; //corresponds to value of th_team_serialized @@ -3195,11 +3057,9 @@ static kmp_internal_control_t __kmp_get_global_icvs(void) { __kmp_dflt_max_active_levels, // int max_active_levels; //internal control // for max_active_levels r_sched, // kmp_r_sched_t sched; //internal control for runtime schedule -// {sched,chunk} pair -#if OMP_40_ENABLED + // {sched,chunk} pair __kmp_nested_proc_bind.bind_types[0], __kmp_default_device, -#endif /* OMP_40_ENABLED */ NULL // struct kmp_internal_control *next; }; @@ -3246,10 +3106,7 @@ static void __kmp_initialize_root(kmp_root_t *root) { #if OMPT_SUPPORT ompt_data_none, // root parallel id #endif -#if OMP_40_ENABLED - __kmp_nested_proc_bind.bind_types[0], -#endif - &r_icvs, + __kmp_nested_proc_bind.bind_types[0], &r_icvs, 0 // argc USE_NESTED_HOT_ARG(NULL) // master thread is unknown ); @@ -3286,10 +3143,7 @@ static void __kmp_initialize_root(kmp_root_t *root) { #if OMPT_SUPPORT ompt_data_none, // root parallel id #endif -#if OMP_40_ENABLED - __kmp_nested_proc_bind.bind_types[0], -#endif - &r_icvs, + __kmp_nested_proc_bind.bind_types[0], &r_icvs, 0 // argc USE_NESTED_HOT_ARG(NULL) // master thread is unknown ); @@ -3430,9 +3284,7 @@ void __kmp_print_structure(void) { thread->th.th_team_master); __kmp_printf(" Serialized?: %2d\n", thread->th.th_team_serialized); __kmp_printf(" Set NProc: %2d\n", thread->th.th_set_nproc); -#if OMP_40_ENABLED __kmp_printf(" Set Proc Bind: %2d\n", thread->th.th_set_proc_bind); -#endif __kmp_print_structure_thread(" Next in pool: ", thread->th.th_next_pool); __kmp_printf("\n"); @@ -3798,15 +3650,12 @@ int __kmp_register_root(int initial_thread) { if (!root_thread->th.th_serial_team) { kmp_internal_control_t r_icvs = __kmp_get_global_icvs(); KF_TRACE(10, ("__kmp_register_root: before serial_team\n")); - root_thread->th.th_serial_team = - __kmp_allocate_team(root, 1, 1, + root_thread->th.th_serial_team = __kmp_allocate_team( + root, 1, 1, #if OMPT_SUPPORT - ompt_data_none, // root parallel id + ompt_data_none, // root parallel id #endif -#if OMP_40_ENABLED - proc_bind_default, -#endif - &r_icvs, 0 USE_NESTED_HOT_ARG(NULL)); + proc_bind_default, &r_icvs, 0 USE_NESTED_HOT_ARG(NULL)); } KMP_ASSERT(root_thread->th.th_serial_team); KF_TRACE(10, ("__kmp_register_root: after serial_team = %p\n", @@ -3857,21 +3706,17 @@ int __kmp_register_root(int initial_thread) { KMP_INIT_BARRIER_STATE); #if KMP_AFFINITY_SUPPORTED -#if OMP_40_ENABLED root_thread->th.th_current_place = KMP_PLACE_UNDEFINED; root_thread->th.th_new_place = KMP_PLACE_UNDEFINED; root_thread->th.th_first_place = KMP_PLACE_UNDEFINED; root_thread->th.th_last_place = KMP_PLACE_UNDEFINED; -#endif if (TCR_4(__kmp_init_middle)) { __kmp_affinity_set_init_mask(gtid, TRUE); } #endif /* KMP_AFFINITY_SUPPORTED */ -#if OMP_50_ENABLED root_thread->th.th_def_allocator = __kmp_def_allocator; root_thread->th.th_prev_level = 0; root_thread->th.th_prev_num_threads = 1; -#endif kmp_cg_root_t *tmp = (kmp_cg_root_t *)__kmp_allocate(sizeof(kmp_cg_root_t)); tmp->cg_root = root_thread; @@ -4052,7 +3897,6 @@ void __kmp_unregister_root_current_thread(int gtid) { KMP_MB(); -#if OMP_45_ENABLED kmp_info_t *thread = __kmp_threads[gtid]; kmp_team_t *team = thread->th.th_team; kmp_task_team_t *task_team = thread->th.th_task_team; @@ -4065,7 +3909,6 @@ void __kmp_unregister_root_current_thread(int gtid) { #endif __kmp_task_team_wait(thread, team USE_ITT_BUILD_ARG(NULL)); } -#endif __kmp_reset_root(gtid, root); @@ -4149,12 +3992,10 @@ static void __kmp_initialize_info(kmp_info_t *this_thr, kmp_team_t *team, this_thr->th.th_reap_state = KMP_NOT_SAFE_TO_REAP; else // no tasking --> always safe to reap this_thr->th.th_reap_state = KMP_SAFE_TO_REAP; -#if OMP_40_ENABLED this_thr->th.th_set_proc_bind = proc_bind_default; #if KMP_AFFINITY_SUPPORTED this_thr->th.th_new_place = this_thr->th.th_current_place; #endif -#endif this_thr->th.th_root = master->th.th_root; /* setup the thread's cache of the team structure */ @@ -4233,9 +4074,7 @@ static void __kmp_initialize_info(kmp_info_t *this_thr, kmp_team_t *team, KMP_DEBUG_ASSERT(dispatch == &team->t.t_dispatch[tid]); dispatch->th_disp_index = 0; -#if OMP_45_ENABLED dispatch->th_doacross_buf_idx = 0; -#endif if (!dispatch->th_disp_buffer) { dispatch->th_disp_buffer = (dispatch_private_info_t *)__kmp_allocate(disp_size); @@ -4414,10 +4253,8 @@ kmp_info_t *__kmp_allocate_thread(kmp_root_t *root, kmp_team_t *team, #if OMPT_SUPPORT ompt_data_none, // root parallel id #endif -#if OMP_40_ENABLED - proc_bind_default, -#endif - &r_icvs, 0 USE_NESTED_HOT_ARG(NULL)); + proc_bind_default, &r_icvs, + 0 USE_NESTED_HOT_ARG(NULL)); } KMP_ASSERT(serial_team); serial_team->t.t_serialized = 0; // AC: the team created in reserve, not for @@ -4461,17 +4298,15 @@ kmp_info_t *__kmp_allocate_thread(kmp_root_t *root, kmp_team_t *team, new_thr->th.th_blocking = false; #endif -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED +#if KMP_AFFINITY_SUPPORTED new_thr->th.th_current_place = KMP_PLACE_UNDEFINED; new_thr->th.th_new_place = KMP_PLACE_UNDEFINED; new_thr->th.th_first_place = KMP_PLACE_UNDEFINED; new_thr->th.th_last_place = KMP_PLACE_UNDEFINED; #endif -#if OMP_50_ENABLED new_thr->th.th_def_allocator = __kmp_def_allocator; new_thr->th.th_prev_level = 0; new_thr->th.th_prev_num_threads = 1; -#endif TCW_4(new_thr->th.th_in_pool, FALSE); new_thr->th.th_active_in_pool = FALSE; @@ -4616,7 +4451,7 @@ __kmp_set_thread_affinity_mask_full_tmp(kmp_affin_mask_t *old_mask) { } #endif -#if OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED +#if KMP_AFFINITY_SUPPORTED // __kmp_partition_places() is the heart of the OpenMP 4.0 affinity mechanism. // It calculats the worker + master thread's partition based upon the parent @@ -4655,12 +4490,10 @@ static void __kmp_partition_places(kmp_team_t *team, int update_master_only) { th->th.th_first_place = first_place; th->th.th_last_place = last_place; th->th.th_new_place = masters_place; -#if OMP_50_ENABLED if (__kmp_display_affinity && masters_place != th->th.th_current_place && team->t.t_display_affinity != 1) { team->t.t_display_affinity = 1; } -#endif KA_TRACE(100, ("__kmp_partition_places: master: T#%d(%d:%d) place %d " "partition = [%d,%d]\n", @@ -4694,12 +4527,10 @@ static void __kmp_partition_places(kmp_team_t *team, int update_master_only) { th->th.th_first_place = first_place; th->th.th_last_place = last_place; th->th.th_new_place = place; -#if OMP_50_ENABLED if (__kmp_display_affinity && place != th->th.th_current_place && team->t.t_display_affinity != 1) { team->t.t_display_affinity = 1; } -#endif KA_TRACE(100, ("__kmp_partition_places: close: T#%d(%d:%d) place %d " "partition = [%d,%d]\n", @@ -4721,12 +4552,10 @@ static void __kmp_partition_places(kmp_team_t *team, int update_master_only) { th->th.th_first_place = first_place; th->th.th_last_place = last_place; th->th.th_new_place = place; -#if OMP_50_ENABLED if (__kmp_display_affinity && place != th->th.th_current_place && team->t.t_display_affinity != 1) { team->t.t_display_affinity = 1; } -#endif s_count++; if ((s_count == S) && rem && (gap_ct == gap)) { @@ -4795,12 +4624,10 @@ static void __kmp_partition_places(kmp_team_t *team, int update_master_only) { th->th.th_first_place = place; th->th.th_new_place = place; -#if OMP_50_ENABLED if (__kmp_display_affinity && place != th->th.th_current_place && team->t.t_display_affinity != 1) { team->t.t_display_affinity = 1; } -#endif s_count = 1; while (s_count < S) { if (place == last_place) { @@ -4892,12 +4719,10 @@ static void __kmp_partition_places(kmp_team_t *team, int update_master_only) { th->th.th_first_place = first; th->th.th_new_place = place; th->th.th_last_place = last; -#if OMP_50_ENABLED if (__kmp_display_affinity && place != th->th.th_current_place && team->t.t_display_affinity != 1) { team->t.t_display_affinity = 1; } -#endif KA_TRACE(100, ("__kmp_partition_places: spread: T#%d(%d:%d) place %d " "partition = [%d,%d], spacing = %.4f\n", @@ -4926,12 +4751,10 @@ static void __kmp_partition_places(kmp_team_t *team, int update_master_only) { th->th.th_first_place = place; th->th.th_last_place = place; th->th.th_new_place = place; -#if OMP_50_ENABLED if (__kmp_display_affinity && place != th->th.th_current_place && team->t.t_display_affinity != 1) { team->t.t_display_affinity = 1; } -#endif s_count++; if ((s_count == S) && rem && (gap_ct == gap)) { @@ -4977,7 +4800,7 @@ static void __kmp_partition_places(kmp_team_t *team, int update_master_only) { KA_TRACE(20, ("__kmp_partition_places: exit T#%d\n", team->t.t_id)); } -#endif /* OMP_40_ENABLED && KMP_AFFINITY_SUPPORTED */ +#endif // KMP_AFFINITY_SUPPORTED /* allocate a new team data structure to use. take one off of the free pool if available */ @@ -4986,9 +4809,7 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, #if OMPT_SUPPORT ompt_data_t ompt_parallel_data, #endif -#if OMP_40_ENABLED kmp_proc_bind_t new_proc_bind, -#endif kmp_internal_control_t *new_icvs, int argc USE_NESTED_HOT_ARG(kmp_info_t *master)) { KMP_TIME_DEVELOPER_PARTITIONED_BLOCK(KMP_allocate_team); @@ -5069,7 +4890,6 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, team->t.t_threads[0], team)); __kmp_push_current_task_to_thread(team->t.t_threads[0], team, 0); -#if OMP_40_ENABLED #if KMP_AFFINITY_SUPPORTED if ((team->t.t_size_changed == 0) && (team->t.t_proc_bind == new_proc_bind)) { @@ -5088,7 +4908,6 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, #else KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind); #endif /* KMP_AFFINITY_SUPPORTED */ -#endif /* OMP_40_ENABLED */ } else if (team->t.t_nproc > new_nproc) { KA_TRACE(20, ("__kmp_allocate_team: decreasing hot team thread count to %d\n", @@ -5156,12 +4975,10 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, } #endif -#if OMP_40_ENABLED KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind); #if KMP_AFFINITY_SUPPORTED __kmp_partition_places(team); #endif -#endif } else { // team->t.t_nproc < new_nproc #if KMP_OS_LINUX && KMP_AFFINITY_SUPPORTED kmp_affin_mask_t *old_mask; @@ -5293,15 +5110,12 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, } #endif -#if OMP_40_ENABLED KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind); #if KMP_AFFINITY_SUPPORTED __kmp_partition_places(team); #endif -#endif } // Check changes in number of threads -#if OMP_40_ENABLED kmp_info_t *master = team->t.t_threads[0]; if (master->th.th_teams_microtask) { for (f = 1; f < new_nproc; ++f) { @@ -5312,7 +5126,6 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, thr->th.th_teams_size = master->th.th_teams_size; } } -#endif /* OMP_40_ENABLED */ #if KMP_NESTED_HOT_TEAMS if (level) { // Sync barrier state for nested hot teams, not needed for outermost hot @@ -5393,9 +5206,7 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, } } -#if OMP_40_ENABLED team->t.t_proc_bind = new_proc_bind; -#endif KA_TRACE(20, ("__kmp_allocate_team: using team from pool %d.\n", team->t.t_id)); @@ -5460,9 +5271,7 @@ __kmp_allocate_team(kmp_root_t *root, int new_nproc, int max_nproc, } } -#if OMP_40_ENABLED team->t.t_proc_bind = new_proc_bind; -#endif #if OMPT_SUPPORT __ompt_team_assign_id(team, ompt_parallel_data); @@ -6395,9 +6204,7 @@ void __kmp_internal_end_thread(int gtid_req) { } } #if KMP_DYNAMIC_LIB -#if OMP_50_ENABLED if (__kmp_pause_status != kmp_hard_paused) -#endif // AC: lets not shutdown the dynamic library at the exit of uber thread, // because we will better shutdown later in the library destructor. { @@ -6878,11 +6685,9 @@ static void __kmp_do_serial_initialize(void) { __kmp_env_print(); } -#if OMP_40_ENABLED if (__kmp_display_env || __kmp_display_env_verbose) { __kmp_env_print_2(); } -#endif // OMP_40_ENABLED #if OMPT_SUPPORT ompt_post_init(); @@ -7050,10 +6855,7 @@ void __kmp_parallel_initialize(void) { if (!__kmp_init_middle) { __kmp_do_middle_initialize(); } - -#if OMP_50_ENABLED __kmp_resume_if_hard_paused(); -#endif /* begin initialization */ KA_TRACE(10, ("__kmp_parallel_initialize: enter\n")); @@ -7119,10 +6921,7 @@ void __kmp_run_before_invoked_task(int gtid, int tid, kmp_info_t *this_thr, // this_thr->th.th_info.ds.ds_tid ] ); dispatch->th_disp_index = 0; /* reset the dispatch buffer counter */ -#if OMP_45_ENABLED - dispatch->th_doacross_buf_idx = - 0; /* reset the doacross dispatch buffer counter */ -#endif + dispatch->th_doacross_buf_idx = 0; // reset doacross dispatch buffer counter if (__kmp_env_consistency_check) __kmp_push_parallel(gtid, team->t.t_ident); @@ -7221,7 +7020,6 @@ int __kmp_invoke_task_func(int gtid) { return rc; } -#if OMP_40_ENABLED void __kmp_teams_master(int gtid) { // This routine is called by all master threads in teams construct kmp_info_t *thr = __kmp_threads[gtid]; @@ -7283,7 +7081,6 @@ int __kmp_invoke_teams_master(int gtid) { __kmp_run_after_invoked_task(gtid, 0, this_thr, team); return 1; } -#endif /* OMP_40_ENABLED */ /* this sets the requested number of threads for the next parallel region encountered by this team. since this should be enclosed in the forkjoin @@ -7297,8 +7094,6 @@ void __kmp_push_num_threads(ident_t *id, int gtid, int num_threads) { thr->th.th_set_nproc = num_threads; } -#if OMP_40_ENABLED - /* this sets the requested number of teams for the teams region and/or the number of threads for the next parallel region encountered */ void __kmp_push_num_teams(ident_t *id, int gtid, int num_teams, @@ -7356,8 +7151,6 @@ void __kmp_push_proc_bind(ident_t *id, int gtid, kmp_proc_bind_t proc_bind) { thr->th.th_set_proc_bind = proc_bind; } -#endif /* OMP_40_ENABLED */ - /* Launch the worker threads into the microtask. */ void __kmp_internal_fork(ident_t *id, int gtid, kmp_team_t *team) { @@ -7382,15 +7175,11 @@ void __kmp_internal_fork(ident_t *id, int gtid, kmp_team_t *team) { int i; for (i = 0; i < __kmp_dispatch_num_buffers; ++i) { team->t.t_disp_buffer[i].buffer_index = i; -#if OMP_45_ENABLED team->t.t_disp_buffer[i].doacross_buf_idx = i; -#endif } } else { team->t.t_disp_buffer[0].buffer_index = 0; -#if OMP_45_ENABLED team->t.t_disp_buffer[0].doacross_buf_idx = 0; -#endif } KMP_MB(); /* Flush all pending memory write invalidates. */ @@ -7644,12 +7433,10 @@ void __kmp_cleanup(void) { __kmp_nested_proc_bind.bind_types = NULL; __kmp_nested_proc_bind.size = 0; __kmp_nested_proc_bind.used = 0; -#if OMP_50_ENABLED if (__kmp_affinity_format) { KMP_INTERNAL_FREE(__kmp_affinity_format); __kmp_affinity_format = NULL; } -#endif __kmp_i18n_catclose(); @@ -7865,7 +7652,6 @@ int __kmp_aux_get_num_teams() { /* ------------------------------------------------------------------------ */ -#if OMP_50_ENABLED /* * Affinity Format Parser * @@ -8138,7 +7924,6 @@ void __kmp_aux_display_affinity(int gtid, const char *format) { __kmp_fprintf(kmp_out, "%s" KMP_END_OF_LINE, buf.str); __kmp_str_buf_free(&buf); } -#endif // OMP_50_ENABLED /* ------------------------------------------------------------------------ */ @@ -8192,11 +7977,7 @@ void __kmp_aux_set_defaults(char const *str, int len) { } __kmp_env_initialize(str); - if (__kmp_settings -#if OMP_40_ENABLED - || __kmp_display_env || __kmp_display_env_verbose -#endif // OMP_40_ENABLED - ) { + if (__kmp_settings || __kmp_display_env || __kmp_display_env_verbose) { __kmp_env_print(); } } // __kmp_aux_set_defaults @@ -8360,8 +8141,6 @@ kmp_int32 __kmp_get_reduce_method(void) { return ((__kmp_entry_thread()->th.th_local.packed_reduction_method) >> 8); } -#if OMP_50_ENABLED - // Soft pause sets up threads to ignore blocktime and just go to sleep. // Spin-wait code checks __kmp_pause_status and reacts accordingly. void __kmp_soft_pause() { __kmp_pause_status = kmp_soft_paused; } @@ -8436,5 +8215,3 @@ int __kmp_pause_resource(kmp_pause_status_t level) { return 1; } } - -#endif // OMP_50_ENABLED diff --git a/openmp/runtime/src/kmp_sched.cpp b/openmp/runtime/src/kmp_sched.cpp index b53a2cc..17c1498 100644 --- a/openmp/runtime/src/kmp_sched.cpp +++ b/openmp/runtime/src/kmp_sched.cpp @@ -178,7 +178,6 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, return; } -#if OMP_40_ENABLED // Although there are schedule enumerations above kmp_ord_upper which are not // schedules for "distribute", the only ones which are useful are dynamic, so // cannot be seen here, since this codepath is only executed for static @@ -189,9 +188,7 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, kmp_distribute_static; // AC: convert to usual schedule type tid = th->th.th_team->t.t_master_tid; team = th->th.th_team->t.t_parent; - } else -#endif - { + } else { tid = __kmp_tid_from_gtid(global_tid); team = th->th.th_team; } @@ -352,7 +349,6 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, *plastiter = (tid == ((trip_count - 1) / (UT)chunk) % nth); break; } -#if OMP_45_ENABLED case kmp_sch_static_balanced_chunked: { T old_upper = *pupper; // round up to make sure the chunk is enough to cover all iterations @@ -374,7 +370,6 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, *plastiter = (tid == ((trip_count - 1) / (UT)chunk)); break; } -#endif default: KMP_ASSERT2(0, "__kmpc_for_static_init: unknown scheduling type"); break; @@ -383,10 +378,7 @@ static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid, #if USE_ITT_BUILD // Report loop metadata if (KMP_MASTER_TID(tid) && __itt_metadata_add_ptr && - __kmp_forkjoin_frames_mode == 3 && -#if OMP_40_ENABLED - th->th.th_teams_microtask == NULL && -#endif + __kmp_forkjoin_frames_mode == 3 && th->th.th_teams_microtask == NULL && team->t.t_active_level == 1) { kmp_uint64 cur_chunk = chunk; // Calculate chunk in case it was not specified; it is specified for @@ -484,10 +476,8 @@ static void __kmp_dist_for_static_init(ident_t *loc, kmp_int32 gtid, th = __kmp_threads[gtid]; nth = th->th.th_team_nproc; team = th->th.th_team; -#if OMP_40_ENABLED KMP_DEBUG_ASSERT(th->th.th_teams_microtask); // we are in the teams construct nteams = th->th.th_teams_size.nteams; -#endif team_id = team->t.t_master_tid; KMP_DEBUG_ASSERT(nteams == (kmp_uint32)team->t.t_parent->t.t_nproc); @@ -727,10 +717,8 @@ static void __kmp_team_static_init(ident_t *loc, kmp_int32 gtid, } th = __kmp_threads[gtid]; team = th->th.th_team; -#if OMP_40_ENABLED KMP_DEBUG_ASSERT(th->th.th_teams_microtask); // we are in the teams construct nteams = th->th.th_teams_size.nteams; -#endif team_id = team->t.t_master_tid; KMP_DEBUG_ASSERT(nteams == (kmp_uint32)team->t.t_parent->t.t_nproc); diff --git a/openmp/runtime/src/kmp_settings.cpp b/openmp/runtime/src/kmp_settings.cpp index f5781d4..692ca26 100644 --- a/openmp/runtime/src/kmp_settings.cpp +++ b/openmp/runtime/src/kmp_settings.cpp @@ -1236,7 +1236,6 @@ static void __kmp_stg_print_max_active_levels(kmp_str_buf_t *buffer, __kmp_stg_print_int(buffer, name, __kmp_dflt_max_active_levels); } // __kmp_stg_print_max_active_levels -#if OMP_40_ENABLED // ----------------------------------------------------------------------------- // OpenMP 4.0: OMP_DEFAULT_DEVICE static void __kmp_stg_parse_default_device(char const *name, char const *value, @@ -1249,9 +1248,7 @@ static void __kmp_stg_print_default_device(kmp_str_buf_t *buffer, char const *name, void *data) { __kmp_stg_print_int(buffer, name, __kmp_default_device); } // __kmp_stg_print_default_device -#endif -#if OMP_50_ENABLED // ----------------------------------------------------------------------------- // OpenMP 5.0: OMP_TARGET_OFFLOAD static void __kmp_stg_parse_target_offload(char const *name, char const *value, @@ -1293,9 +1290,7 @@ static void __kmp_stg_print_target_offload(kmp_str_buf_t *buffer, } __kmp_str_buf_print(buffer, "=%s\n", value); } // __kmp_stg_print_target_offload -#endif -#if OMP_45_ENABLED // ----------------------------------------------------------------------------- // OpenMP 4.5: OMP_MAX_TASK_PRIORITY static void __kmp_stg_parse_max_task_priority(char const *name, @@ -1322,7 +1317,6 @@ static void __kmp_stg_print_taskloop_min_tasks(kmp_str_buf_t *buffer, char const *name, void *data) { __kmp_stg_print_int(buffer, name, __kmp_taskloop_min_tasks); } // __kmp_stg_print_taskloop_min_tasks -#endif // OMP_45_ENABLED // ----------------------------------------------------------------------------- // KMP_DISP_NUM_BUFFERS @@ -2093,61 +2087,43 @@ static void __kmp_parse_affinity_env(char const *name, char const *value, ++gran; \ } -#if OMP_40_ENABLED KMP_DEBUG_ASSERT((__kmp_nested_proc_bind.bind_types != NULL) && (__kmp_nested_proc_bind.used > 0)); -#endif while (*buf != '\0') { start = next = buf; if (__kmp_match_str("none", buf, CCAST(const char **, &next))) { set_type(affinity_none); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_false; -#endif buf = next; } else if (__kmp_match_str("scatter", buf, CCAST(const char **, &next))) { set_type(affinity_scatter); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif buf = next; } else if (__kmp_match_str("compact", buf, CCAST(const char **, &next))) { set_type(affinity_compact); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif buf = next; } else if (__kmp_match_str("logical", buf, CCAST(const char **, &next))) { set_type(affinity_logical); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif buf = next; } else if (__kmp_match_str("physical", buf, CCAST(const char **, &next))) { set_type(affinity_physical); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif buf = next; } else if (__kmp_match_str("explicit", buf, CCAST(const char **, &next))) { set_type(affinity_explicit); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif buf = next; } else if (__kmp_match_str("balanced", buf, CCAST(const char **, &next))) { set_type(affinity_balanced); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif buf = next; } else if (__kmp_match_str("disabled", buf, CCAST(const char **, &next))) { set_type(affinity_disabled); -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_false; -#endif buf = next; } else if (__kmp_match_str("verbose", buf, CCAST(const char **, &next))) { set_verbose(TRUE); @@ -2306,9 +2282,7 @@ static void __kmp_parse_affinity_env(char const *name, char const *value, if (!type) { KMP_WARNING(AffProcListNoType, name); *out_type = affinity_explicit; -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif } else if (*out_type != affinity_explicit) { KMP_WARNING(AffProcListNotExplicit, name); KMP_ASSERT(*out_proclist != NULL); @@ -2527,9 +2501,7 @@ static void __kmp_stg_parse_gomp_cpu_affinity(char const *name, __kmp_affinity_proclist = temp_proclist; __kmp_affinity_type = affinity_explicit; __kmp_affinity_gran = affinity_gran_fine; -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif } else { KMP_WARNING(AffSyntaxError, name); if (temp_proclist != NULL) { @@ -2539,16 +2511,12 @@ static void __kmp_stg_parse_gomp_cpu_affinity(char const *name, } else { // Warning already emitted __kmp_affinity_type = affinity_none; -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_false; -#endif } } // __kmp_stg_parse_gomp_cpu_affinity #endif /* KMP_GOMP_COMPAT */ -#if OMP_40_ENABLED - /*----------------------------------------------------------------------------- The OMP_PLACES proc id list parser. Here is the grammar: @@ -2971,40 +2939,6 @@ static void __kmp_stg_print_places(kmp_str_buf_t *buffer, char const *name, } } -#endif /* OMP_40_ENABLED */ - -#if (!OMP_40_ENABLED) - -static void __kmp_stg_parse_proc_bind(char const *name, char const *value, - void *data) { - int enabled; - kmp_setting_t **rivals = (kmp_setting_t **)data; - int rc; - - rc = __kmp_stg_check_rivals(name, value, rivals); - if (rc) { - return; - } - - // In OMP 3.1, OMP_PROC_BIND is strictly a boolean - __kmp_stg_parse_bool(name, value, &enabled); - if (enabled) { - // OMP_PROC_BIND => granularity=fine,scatter on MIC - // OMP_PROC_BIND => granularity=core,scatter elsewhere - __kmp_affinity_type = affinity_scatter; -#if KMP_MIC_SUPPORTED - if (__kmp_mic_type != non_mic) - __kmp_affinity_gran = affinity_gran_fine; - else -#endif - __kmp_affinity_gran = affinity_gran_core; - } else { - __kmp_affinity_type = affinity_none; - } -} // __kmp_parse_proc_bind - -#endif /* if (! OMP_40_ENABLED) */ - static void __kmp_stg_parse_topology_method(char const *name, char const *value, void *data) { if (__kmp_str_match("all", 1, value)) { @@ -3131,8 +3065,6 @@ static void __kmp_stg_print_topology_method(kmp_str_buf_t *buffer, #endif /* KMP_AFFINITY_SUPPORTED */ -#if OMP_40_ENABLED - // OMP_PROC_BIND / bind-var is functional on all 4.0 builds, including OS X* // OMP_PLACES / place-partition-var is not. static void __kmp_stg_parse_proc_bind(char const *name, char const *value, @@ -3319,9 +3251,6 @@ static void __kmp_stg_print_proc_bind(kmp_str_buf_t *buffer, char const *name, } } -#endif /* OMP_40_ENABLED */ - -#if OMP_50_ENABLED static void __kmp_stg_parse_display_affinity(char const *name, char const *value, void *data) { __kmp_stg_parse_bool(name, value, &__kmp_display_affinity); @@ -3484,8 +3413,6 @@ static void __kmp_stg_print_allocator(kmp_str_buf_t *buffer, char const *name, } } -#endif /* OMP_50_ENABLED */ - // ----------------------------------------------------------------------------- // OMP_DYNAMIC @@ -3719,7 +3646,6 @@ static const char *__kmp_parse_single_omp_schedule(const char *name, } } #endif // KMP_USE_HIER_SCHED -#if OMP_45_ENABLED // Read in schedule modifier if specified enum sched_type sched_modifier = (enum sched_type)0; if (*delim == ':') { @@ -3740,7 +3666,6 @@ static const char *__kmp_parse_single_omp_schedule(const char *name, return NULL; } } -#endif // Read in schedule kind (required) if (!__kmp_strcasecmp_with_sentinel("dynamic", ptr, *delim)) sched = kmp_sch_dynamic_chunked; @@ -4699,8 +4624,6 @@ static void __kmp_stg_print_task_throttling(kmp_str_buf_t *buffer, // ----------------------------------------------------------------------------- // OMP_DISPLAY_ENV -#if OMP_40_ENABLED - static void __kmp_stg_parse_omp_display_env(char const *name, char const *value, void *data) { if (__kmp_str_match("VERBOSE", 1, value)) { @@ -4708,7 +4631,6 @@ static void __kmp_stg_parse_omp_display_env(char const *name, char const *value, } else { __kmp_stg_parse_bool(name, value, &__kmp_display_env); } - } // __kmp_stg_parse_omp_display_env static void __kmp_stg_print_omp_display_env(kmp_str_buf_t *buffer, @@ -4734,9 +4656,7 @@ static void __kmp_stg_print_omp_cancellation(kmp_str_buf_t *buffer, __kmp_stg_print_bool(buffer, name, __kmp_omp_cancellation); } // __kmp_stg_print_omp_cancellation -#endif - -#if OMP_50_ENABLED && OMPT_SUPPORT +#if OMPT_SUPPORT static int __kmp_tool = 1; static void __kmp_stg_parse_omp_tool(char const *name, char const *value, @@ -4821,20 +4741,14 @@ static kmp_setting_t __kmp_stg_table[] = { __kmp_stg_print_task_stealing, NULL, 0, 0}, {"OMP_MAX_ACTIVE_LEVELS", __kmp_stg_parse_max_active_levels, __kmp_stg_print_max_active_levels, NULL, 0, 0}, -#if OMP_40_ENABLED {"OMP_DEFAULT_DEVICE", __kmp_stg_parse_default_device, __kmp_stg_print_default_device, NULL, 0, 0}, -#endif -#if OMP_50_ENABLED {"OMP_TARGET_OFFLOAD", __kmp_stg_parse_target_offload, __kmp_stg_print_target_offload, NULL, 0, 0}, -#endif -#if OMP_45_ENABLED {"OMP_MAX_TASK_PRIORITY", __kmp_stg_parse_max_task_priority, __kmp_stg_print_max_task_priority, NULL, 0, 0}, {"KMP_TASKLOOP_MIN_TASKS", __kmp_stg_parse_taskloop_min_tasks, __kmp_stg_print_taskloop_min_tasks, NULL, 0, 0}, -#endif {"OMP_THREAD_LIMIT", __kmp_stg_parse_thread_limit, __kmp_stg_print_thread_limit, NULL, 0, 0}, {"KMP_TEAMS_THREAD_LIMIT", __kmp_stg_parse_teams_thread_limit, @@ -4933,33 +4847,24 @@ static kmp_setting_t __kmp_stg_table[] = { {"GOMP_CPU_AFFINITY", __kmp_stg_parse_gomp_cpu_affinity, NULL, /* no print */ NULL, 0, 0}, #endif /* KMP_GOMP_COMPAT */ -#if OMP_40_ENABLED {"OMP_PROC_BIND", __kmp_stg_parse_proc_bind, __kmp_stg_print_proc_bind, NULL, 0, 0}, {"OMP_PLACES", __kmp_stg_parse_places, __kmp_stg_print_places, NULL, 0, 0}, -#else - {"OMP_PROC_BIND", __kmp_stg_parse_proc_bind, NULL, /* no print */ NULL, 0, - 0}, -#endif /* OMP_40_ENABLED */ {"KMP_TOPOLOGY_METHOD", __kmp_stg_parse_topology_method, __kmp_stg_print_topology_method, NULL, 0, 0}, #else -// KMP_AFFINITY is not supported on OS X*, nor is OMP_PLACES. -// OMP_PROC_BIND and proc-bind-var are supported, however. -#if OMP_40_ENABLED + // KMP_AFFINITY is not supported on OS X*, nor is OMP_PLACES. + // OMP_PROC_BIND and proc-bind-var are supported, however. {"OMP_PROC_BIND", __kmp_stg_parse_proc_bind, __kmp_stg_print_proc_bind, NULL, 0, 0}, -#endif #endif // KMP_AFFINITY_SUPPORTED -#if OMP_50_ENABLED {"OMP_DISPLAY_AFFINITY", __kmp_stg_parse_display_affinity, __kmp_stg_print_display_affinity, NULL, 0, 0}, {"OMP_AFFINITY_FORMAT", __kmp_stg_parse_affinity_format, __kmp_stg_print_affinity_format, NULL, 0, 0}, -#endif {"KMP_INIT_AT_FORK", __kmp_stg_parse_init_at_fork, __kmp_stg_print_init_at_fork, NULL, 0, 0}, {"KMP_SCHEDULE", __kmp_stg_parse_schedule, __kmp_stg_print_schedule, NULL, @@ -5020,19 +4925,14 @@ static kmp_setting_t __kmp_stg_table[] = { {"KMP_ENABLE_TASK_THROTTLING", __kmp_stg_parse_task_throttling, __kmp_stg_print_task_throttling, NULL, 0, 0}, -#if OMP_40_ENABLED {"OMP_DISPLAY_ENV", __kmp_stg_parse_omp_display_env, __kmp_stg_print_omp_display_env, NULL, 0, 0}, {"OMP_CANCELLATION", __kmp_stg_parse_omp_cancellation, __kmp_stg_print_omp_cancellation, NULL, 0, 0}, -#endif - -#if OMP_50_ENABLED {"OMP_ALLOCATOR", __kmp_stg_parse_allocator, __kmp_stg_print_allocator, NULL, 0, 0}, -#endif -#if OMP_50_ENABLED && OMPT_SUPPORT +#if OMPT_SUPPORT {"OMP_TOOL", __kmp_stg_parse_omp_tool, __kmp_stg_print_omp_tool, NULL, 0, 0}, {"OMP_TOOL_LIBRARIES", __kmp_stg_parse_omp_tool_libraries, @@ -5218,7 +5118,6 @@ static void __kmp_stg_init(void) { omp_proc_bind->data = CCAST(kmp_setting_t **, rivals); rivals[i++] = NULL; -#if OMP_40_ENABLED static kmp_setting_t *volatile places_rivals[4]; i = 0; @@ -5232,7 +5131,6 @@ static void __kmp_stg_init(void) { places_rivals[i++] = omp_places; omp_places->data = CCAST(kmp_setting_t **, places_rivals); places_rivals[i++] = NULL; -#endif } #else // KMP_AFFINITY not supported, so OMP_PROC_BIND has no rivals. @@ -5454,7 +5352,6 @@ void __kmp_env_initialize(char const *string) { } #undef FIND -#if OMP_40_ENABLED // Also reset the affinity flags if OMP_PROC_BIND is specified. aff_str = __kmp_env_blk_var(&block, "OMP_PROC_BIND"); if (aff_str != NULL) { @@ -5463,12 +5360,10 @@ void __kmp_env_initialize(char const *string) { __kmp_affinity_top_method = affinity_top_method_default; __kmp_affinity_respect_mask = affinity_respect_mask_default; } -#endif /* OMP_40_ENABLED */ } #endif /* KMP_AFFINITY_SUPPORTED */ -#if OMP_40_ENABLED // Set up the nested proc bind type vector. if (__kmp_nested_proc_bind.bind_types == NULL) { __kmp_nested_proc_bind.bind_types = @@ -5485,9 +5380,7 @@ void __kmp_env_initialize(char const *string) { __kmp_nested_proc_bind.bind_types[0] = proc_bind_false; #endif } -#endif /* OMP_40_ENABLED */ -#if OMP_50_ENABLED // Set up the affinity format ICV // Grab the default affinity format string from the message catalog kmp_msg_t m = @@ -5500,7 +5393,6 @@ void __kmp_env_initialize(char const *string) { } KMP_STRCPY_S(__kmp_affinity_format, KMP_AFFINITY_FORMAT_SIZE, m.str); __kmp_str_free(&m.str); -#endif // Now process all of the settings. for (i = 0; i < block.count; ++i) { @@ -5575,14 +5467,12 @@ void __kmp_env_initialize(char const *string) { } } -#if OMP_40_ENABLED if (__kmp_affinity_type == affinity_disabled) { __kmp_nested_proc_bind.bind_types[0] = proc_bind_false; } else if (__kmp_nested_proc_bind.bind_types[0] == proc_bind_true) { // OMP_PROC_BIND=true maps to OMP_PROC_BIND=spread. __kmp_nested_proc_bind.bind_types[0] = proc_bind_spread; } -#endif /* OMP_40_ENABLED */ if (KMP_AFFINITY_CAPABLE()) { @@ -5619,20 +5509,16 @@ void __kmp_env_initialize(char const *string) { // processor groups, or if the user requested it, and OMP 4.0 // affinity is not in effect. if (((__kmp_num_proc_groups > 1) && - (__kmp_affinity_type == affinity_default) -#if OMP_40_ENABLED - && (__kmp_nested_proc_bind.bind_types[0] == proc_bind_default)) -#endif - || (__kmp_affinity_top_method == affinity_top_method_group)) { + (__kmp_affinity_type == affinity_default) && + (__kmp_nested_proc_bind.bind_types[0] == proc_bind_default)) || + (__kmp_affinity_top_method == affinity_top_method_group)) { if (__kmp_affinity_respect_mask == affinity_respect_mask_default && exactly_one_group) { __kmp_affinity_respect_mask = FALSE; } if (__kmp_affinity_type == affinity_default) { __kmp_affinity_type = affinity_compact; -#if OMP_40_ENABLED __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; -#endif } if (__kmp_affinity_top_method == affinity_top_method_default) { if (__kmp_affinity_gran == affinity_gran_default) { @@ -5713,17 +5599,13 @@ void __kmp_env_initialize(char const *string) { __kmp_affinity_respect_mask = TRUE; } } -#if OMP_40_ENABLED if ((__kmp_nested_proc_bind.bind_types[0] != proc_bind_intel) && (__kmp_nested_proc_bind.bind_types[0] != proc_bind_default)) { if (__kmp_affinity_type == affinity_default) { __kmp_affinity_type = affinity_compact; __kmp_affinity_dups = FALSE; } - } else -#endif /* OMP_40_ENABLED */ - if (__kmp_affinity_type == affinity_default) { -#if OMP_40_ENABLED + } else if (__kmp_affinity_type == affinity_default) { #if KMP_MIC_SUPPORTED if (__kmp_mic_type != non_mic) { __kmp_nested_proc_bind.bind_types[0] = proc_bind_intel; @@ -5732,7 +5614,6 @@ void __kmp_env_initialize(char const *string) { { __kmp_nested_proc_bind.bind_types[0] = proc_bind_false; } -#endif /* OMP_40_ENABLED */ #if KMP_MIC_SUPPORTED if (__kmp_mic_type != non_mic) { __kmp_affinity_type = affinity_scatter; @@ -5769,11 +5650,9 @@ void __kmp_env_initialize(char const *string) { K_DIAG(1, ("__kmp_affinity_gran == %d\n", __kmp_affinity_gran)); KMP_DEBUG_ASSERT(__kmp_affinity_type != affinity_default); -#if OMP_40_ENABLED KMP_DEBUG_ASSERT(__kmp_nested_proc_bind.bind_types[0] != proc_bind_default); K_DIAG(1, ("__kmp_nested_proc_bind.bind_types[0] == %d\n", __kmp_nested_proc_bind.bind_types[0])); -#endif } #endif /* KMP_AFFINITY_SUPPORTED */ @@ -5840,7 +5719,6 @@ void __kmp_env_print() { } // __kmp_env_print -#if OMP_40_ENABLED void __kmp_env_print_2() { kmp_env_blk_t block; @@ -5878,6 +5756,5 @@ void __kmp_env_print_2() { __kmp_printf("\n"); } // __kmp_env_print_2 -#endif // OMP_40_ENABLED // end of file diff --git a/openmp/runtime/src/kmp_settings.h b/openmp/runtime/src/kmp_settings.h index b774dec..3247ffc 100644 --- a/openmp/runtime/src/kmp_settings.h +++ b/openmp/runtime/src/kmp_settings.h @@ -16,9 +16,7 @@ void __kmp_reset_global_vars(void); void __kmp_env_initialize(char const *); void __kmp_env_print(); -#if OMP_40_ENABLED void __kmp_env_print_2(); -#endif // OMP_40_ENABLED int __kmp_initial_threads_capacity(int req_nproc); void __kmp_init_dflt_team_nth(); diff --git a/openmp/runtime/src/kmp_stub.cpp b/openmp/runtime/src/kmp_stub.cpp index 03d5a8f..badbbde 100644 --- a/openmp/runtime/src/kmp_stub.cpp +++ b/openmp/runtime/src/kmp_stub.cpp @@ -275,15 +275,11 @@ void __kmps_get_schedule(kmp_sched_t *kind, int *modifier) { *modifier = __kmps_sched_modifier; } // __kmps_get_schedule -#if OMP_40_ENABLED - kmp_proc_bind_t __kmps_get_proc_bind(void) { i; return 0; } // __kmps_get_proc_bind -#endif /* OMP_40_ENABLED */ - double __kmps_get_wtime(void) { // Elapsed wall clock time (in second) from "sometime in the past". double wtime = 0.0; @@ -335,7 +331,6 @@ double __kmps_get_wtick(void) { return wtick; } // __kmps_get_wtick -#if OMP_50_ENABLED /* OpenMP 5.0 Memory Management */ #if KMP_OS_WINDOWS omp_allocator_handle_t const omp_null_allocator = 0; @@ -386,6 +381,5 @@ size_t omp_capture_affinity(char *buffer, size_t buf_size, char const *format) { i; return 0; } -#endif /* OMP_50_ENABLED */ // end of file // diff --git a/openmp/runtime/src/kmp_stub.h b/openmp/runtime/src/kmp_stub.h index 737d1c7..679c07b 100644 --- a/openmp/runtime/src/kmp_stub.h +++ b/openmp/runtime/src/kmp_stub.h @@ -41,9 +41,7 @@ typedef enum kmp_sched { void __kmps_set_schedule(kmp_sched_t kind, int modifier); void __kmps_get_schedule(kmp_sched_t *kind, int *modifier); -#if OMP_40_ENABLED kmp_proc_bind_t __kmps_get_proc_bind(void); -#endif /* OMP_40_ENABLED */ double __kmps_get_wtime(); double __kmps_get_wtick(); diff --git a/openmp/runtime/src/kmp_taskdeps.cpp b/openmp/runtime/src/kmp_taskdeps.cpp index 5f2a4c8..db79dea 100644 --- a/openmp/runtime/src/kmp_taskdeps.cpp +++ b/openmp/runtime/src/kmp_taskdeps.cpp @@ -20,8 +20,6 @@ #include "ompt-specific.h" #endif -#if OMP_40_ENABLED - // TODO: Improve memory allocation? keep a list of pre-allocated structures? // allocate in blocks? re-use list finished list entries? // TODO: don't use atomic ref counters for stack-allocated nodes. @@ -535,10 +533,8 @@ kmp_int32 __kmpc_omp_task_with_deps(ident_t *loc_ref, kmp_int32 gtid, bool serial = current_task->td_flags.team_serial || current_task->td_flags.tasking_ser || current_task->td_flags.final; -#if OMP_45_ENABLED kmp_task_team_t *task_team = thread->th.th_task_team; serial = serial && !(task_team && task_team->tt.tt_found_proxy_tasks); -#endif if (!serial && (ndeps > 0 || ndeps_noalias > 0)) { /* if no dependencies have been tracked yet, create the dependence hash */ @@ -623,10 +619,8 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, bool ignore = current_task->td_flags.team_serial || current_task->td_flags.tasking_ser || current_task->td_flags.final; -#if OMP_45_ENABLED ignore = ignore && thread->th.th_task_team != NULL && thread->th.th_task_team->tt.tt_found_proxy_tasks == FALSE; -#endif ignore = ignore || current_task->td_dephash == NULL; if (ignore) { @@ -659,5 +653,3 @@ void __kmpc_omp_wait_deps(ident_t *loc_ref, kmp_int32 gtid, kmp_int32 ndeps, KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d finished waiting : loc=%p\n", gtid, loc_ref)); } - -#endif /* OMP_40_ENABLED */ diff --git a/openmp/runtime/src/kmp_taskdeps.h b/openmp/runtime/src/kmp_taskdeps.h index b5d850a..2a712b3 100644 --- a/openmp/runtime/src/kmp_taskdeps.h +++ b/openmp/runtime/src/kmp_taskdeps.h @@ -17,8 +17,6 @@ #include "kmp.h" -#if OMP_40_ENABLED - #define KMP_ACQUIRE_DEPNODE(gtid, n) __kmp_acquire_lock(&(n)->dn.lock, (gtid)) #define KMP_RELEASE_DEPNODE(gtid, n) __kmp_release_lock(&(n)->dn.lock, (gtid)) @@ -144,6 +142,4 @@ static inline void __kmp_release_deps(kmp_int32 gtid, kmp_taskdata_t *task) { gtid, task)); } -#endif // OMP_40_ENABLED - #endif // KMP_TASKDEPS_H diff --git a/openmp/runtime/src/kmp_tasking.cpp b/openmp/runtime/src/kmp_tasking.cpp index 23ace2f..d037299 100644 --- a/openmp/runtime/src/kmp_tasking.cpp +++ b/openmp/runtime/src/kmp_tasking.cpp @@ -30,10 +30,7 @@ static void __kmp_alloc_task_deque(kmp_info_t *thread, kmp_thread_data_t *thread_data); static int __kmp_realloc_task_threads_data(kmp_info_t *thread, kmp_task_team_t *task_team); - -#if OMP_45_ENABLED static void __kmp_bottom_half_finish_proxy(kmp_int32 gtid, kmp_task_t *ptask); -#endif #ifdef BUILD_TIED_TASK_STACK @@ -391,7 +388,6 @@ static kmp_int32 __kmp_push_task(kmp_int32 gtid, kmp_task_t *task) { // Lock the deque for the task push operation if (!locked) { __kmp_acquire_bootstrap_lock(&thread_data->td.td_deque_lock); -#if OMP_45_ENABLED // Need to recheck as we can get a proxy task from thread outside of OpenMP if (TCR_4(thread_data->td.td_deque_ntasks) >= TASK_DEQUE_SIZE(thread_data->td)) { @@ -408,7 +404,6 @@ static kmp_int32 __kmp_push_task(kmp_int32 gtid, kmp_task_t *task) { __kmp_realloc_task_deque(thread, thread_data); } } -#endif } // Must have room since no thread can add tasks but calling thread KMP_DEBUG_ASSERT(TCR_4(thread_data->td.td_deque_ntasks) < @@ -552,10 +547,8 @@ static inline void __ompt_task_init(kmp_taskdata_t *task, int tid) { task->ompt_task_info.frame.enter_frame = ompt_data_none; task->ompt_task_info.frame.exit_frame_flags = ompt_frame_runtime | ompt_frame_framepointer; task->ompt_task_info.frame.enter_frame_flags = ompt_frame_runtime | ompt_frame_framepointer; -#if OMP_40_ENABLED task->ompt_task_info.ndeps = 0; task->ompt_task_info.deps = NULL; -#endif /* OMP_40_ENABLED */ } // __ompt_task_start: @@ -742,16 +735,11 @@ static void __kmp_free_task(kmp_int32 gtid, kmp_taskdata_t *taskdata, static void __kmp_free_task_and_ancestors(kmp_int32 gtid, kmp_taskdata_t *taskdata, kmp_info_t *thread) { -#if OMP_45_ENABLED // Proxy tasks must always be allowed to free their parents // because they can be run in background even in serial mode. kmp_int32 team_serial = (taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser) && !taskdata->td_flags.proxy; -#else - kmp_int32 team_serial = - taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser; -#endif KMP_DEBUG_ASSERT(taskdata->td_flags.tasktype == TASK_EXPLICIT); kmp_int32 children = KMP_ATOMIC_DEC(&taskdata->td_allocated_child_tasks) - 1; @@ -816,10 +804,8 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, kmp_taskdata_t *resumed_task) { kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task); kmp_info_t *thread = __kmp_threads[gtid]; -#if OMP_45_ENABLED kmp_task_team_t *task_team = thread->th.th_task_team; // might be NULL for serial teams... -#endif // OMP_45_ENABLED kmp_int32 children = 0; KA_TRACE(10, ("__kmp_task_finish(enter): T#%d finishing task %p and resuming " @@ -877,7 +863,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, KMP_DEBUG_ASSERT(taskdata->td_flags.complete == 0); bool detach = false; -#if OMP_50_ENABLED if (taskdata->td_flags.detachable == TASK_DETACHABLE) { if (taskdata->td_allow_completion_event.type == KMP_EVENT_ALLOW_COMPLETION) { @@ -891,7 +876,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, __kmp_release_tas_lock(&taskdata->td_allow_completion_event.lock, gtid); } } -#endif KMP_DEBUG_ASSERT(taskdata->td_flags.started == 1); KMP_DEBUG_ASSERT(taskdata->td_flags.freed == 0); @@ -905,17 +889,13 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, children = KMP_ATOMIC_DEC(&taskdata->td_parent->td_incomplete_child_tasks) - 1; KMP_DEBUG_ASSERT(children >= 0); -#if OMP_40_ENABLED if (taskdata->td_taskgroup) KMP_ATOMIC_DEC(&taskdata->td_taskgroup->count); __kmp_release_deps(gtid, taskdata); -#if OMP_45_ENABLED } else if (task_team && task_team->tt.tt_found_proxy_tasks) { // if we found proxy tasks there could exist a dependency chain // with the proxy task as origin __kmp_release_deps(gtid, taskdata); -#endif // OMP_45_ENABLED -#endif // OMP_40_ENABLED } } @@ -929,7 +909,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, 20, ("__kmp_task_finish: T#%d finished task %p, %d incomplete children\n", gtid, taskdata, children)); -#if OMP_40_ENABLED /* If the tasks' destructor thunk flag has been set, we need to invoke the destructor thunk that has been generated by the compiler. The code is placed here, since at this point other tasks might have been released @@ -941,7 +920,6 @@ static void __kmp_task_finish(kmp_int32 gtid, kmp_task_t *task, KMP_ASSERT(destr_thunk); destr_thunk(gtid, task); } -#endif // OMP_40_ENABLED // bookkeeping for resuming task: // GEH - note tasking_ser => task_serial @@ -1073,9 +1051,7 @@ void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr, task->td_flags.tiedness = TASK_TIED; task->td_flags.tasktype = TASK_IMPLICIT; -#if OMP_45_ENABLED task->td_flags.proxy = TASK_FULL; -#endif // All implicit tasks are executed immediately, not deferred task->td_flags.task_serial = 1; @@ -1087,22 +1063,16 @@ void __kmp_init_implicit_task(ident_t *loc_ref, kmp_info_t *this_thr, task->td_flags.complete = 0; task->td_flags.freed = 0; -#if OMP_40_ENABLED task->td_depnode = NULL; -#endif task->td_last_tied = task; -#if OMP_50_ENABLED task->td_allow_completion_event.type = KMP_EVENT_UNINITIALIZED; -#endif if (set_curr_task) { // only do this init first time thread is created KMP_ATOMIC_ST_REL(&task->td_incomplete_child_tasks, 0); // Not used: don't need to deallocate implicit task KMP_ATOMIC_ST_REL(&task->td_allocated_child_tasks, 0); -#if OMP_40_ENABLED task->td_taskgroup = NULL; // An implicit task does not have taskgroup task->td_dephash = NULL; -#endif __kmp_push_current_task_to_thread(this_thr, team, tid); } else { KMP_DEBUG_ASSERT(task->td_incomplete_child_tasks == 0); @@ -1212,19 +1182,14 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid, KMP_CHECK_UPDATE(thread->th.th_task_team->tt.tt_untied_task_encountered, 1); } -#if OMP_50_ENABLED // Detachable tasks are not proxy tasks yet but could be in the future. Doing // the tasking setup // when that happens is too late. if (flags->proxy == TASK_PROXY || flags->detachable == TASK_DETACHABLE) { -#endif -#if OMP_45_ENABLED if (flags->proxy == TASK_PROXY) { flags->tiedness = TASK_UNTIED; flags->merged_if0 = 1; -#if OMP_50_ENABLED } -#endif /* are we running in a sequential parallel or tskm_immediate_exec... we need tasking support enabled */ if ((thread->th.th_task_team) == NULL) { @@ -1258,7 +1223,6 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid, if (task_team->tt.tt_found_proxy_tasks == FALSE) TCW_4(task_team->tt.tt_found_proxy_tasks, TRUE); } -#endif // Calculate shared structure offset including padding after kmp_task_t struct // to align pointers in shared struct @@ -1314,26 +1278,18 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid, taskdata->td_taskwait_counter = 0; taskdata->td_taskwait_thread = 0; KMP_DEBUG_ASSERT(taskdata->td_parent != NULL); -#if OMP_45_ENABLED // avoid copying icvs for proxy tasks if (flags->proxy == TASK_FULL) -#endif copy_icvs(&taskdata->td_icvs, &taskdata->td_parent->td_icvs); taskdata->td_flags.tiedness = flags->tiedness; taskdata->td_flags.final = flags->final; taskdata->td_flags.merged_if0 = flags->merged_if0; -#if OMP_40_ENABLED taskdata->td_flags.destructors_thunk = flags->destructors_thunk; -#endif // OMP_40_ENABLED -#if OMP_45_ENABLED taskdata->td_flags.proxy = flags->proxy; -#if OMP_50_ENABLED taskdata->td_flags.detachable = flags->detachable; -#endif taskdata->td_task_team = thread->th.th_task_team; taskdata->td_size_alloc = shareds_offset + sizeof_shareds; -#endif taskdata->td_flags.tasktype = TASK_EXPLICIT; // GEH - TODO: fix this to copy parent task's value of tasking_ser flag @@ -1360,40 +1316,28 @@ kmp_task_t *__kmp_task_alloc(ident_t *loc_ref, kmp_int32 gtid, KMP_ATOMIC_ST_RLX(&taskdata->td_incomplete_child_tasks, 0); // start at one because counts current task and children KMP_ATOMIC_ST_RLX(&taskdata->td_allocated_child_tasks, 1); -#if OMP_40_ENABLED taskdata->td_taskgroup = parent_task->td_taskgroup; // task inherits taskgroup from the parent task taskdata->td_dephash = NULL; taskdata->td_depnode = NULL; -#endif if (flags->tiedness == TASK_UNTIED) taskdata->td_last_tied = NULL; // will be set when the task is scheduled else taskdata->td_last_tied = taskdata; -#if OMP_50_ENABLED taskdata->td_allow_completion_event.type = KMP_EVENT_UNINITIALIZED; -#endif #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled)) __ompt_task_init(taskdata, gtid); #endif // Only need to keep track of child task counts if team parallel and tasking not // serialized or if it is a proxy or detachable task -#if OMP_45_ENABLED if (flags->proxy == TASK_PROXY || -#if OMP_50_ENABLED flags->detachable == TASK_DETACHABLE || -#endif !(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser)) -#else - if (!(taskdata->td_flags.team_serial || taskdata->td_flags.tasking_ser)) -#endif { KMP_ATOMIC_INC(&parent_task->td_incomplete_child_tasks); -#if OMP_40_ENABLED if (parent_task->td_taskgroup) KMP_ATOMIC_INC(&parent_task->td_taskgroup->count); -#endif // Only need to keep track of allocated child tasks for explicit tasks since // implicit not deallocated if (taskdata->td_parent->td_flags.tasktype == TASK_EXPLICIT) { @@ -1418,27 +1362,12 @@ kmp_task_t *__kmpc_omp_task_alloc(ident_t *loc_ref, kmp_int32 gtid, input_flags->native = FALSE; // __kmp_task_alloc() sets up all other runtime flags -#if OMP_45_ENABLED -#if OMP_50_ENABLED KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s %s %s) " "sizeof_task=%ld sizeof_shared=%ld entry=%p\n", gtid, loc_ref, input_flags->tiedness ? "tied " : "untied", input_flags->proxy ? "proxy" : "", input_flags->detachable ? "detachable" : "", sizeof_kmp_task_t, sizeof_shareds, task_entry)); -#else - KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s %s) " - "sizeof_task=%ld sizeof_shared=%ld entry=%p\n", - gtid, loc_ref, input_flags->tiedness ? "tied " : "untied", - input_flags->proxy ? "proxy" : "", sizeof_kmp_task_t, - sizeof_shareds, task_entry)); -#endif -#else - KA_TRACE(10, ("__kmpc_omp_task_alloc(enter): T#%d loc=%p, flags=(%s) " - "sizeof_task=%ld sizeof_shared=%ld entry=%p\n", - gtid, loc_ref, input_flags->tiedness ? "tied " : "untied", - sizeof_kmp_task_t, sizeof_shareds, task_entry)); -#endif retval = __kmp_task_alloc(loc_ref, gtid, input_flags, sizeof_kmp_task_t, sizeof_shareds, task_entry); @@ -1458,7 +1387,6 @@ kmp_task_t *__kmpc_omp_target_task_alloc(ident_t *loc_ref, kmp_int32 gtid, sizeof_shareds, task_entry); } -#if OMP_50_ENABLED /*! @ingroup TASKING @param loc_ref location of the original task directive @@ -1478,7 +1406,6 @@ __kmpc_omp_reg_task_with_affinity(ident_t *loc_ref, kmp_int32 gtid, kmp_task_affinity_info_t *affin_list) { return 0; } -#endif // __kmp_invoke_task: invoke the specified task // @@ -1489,14 +1416,11 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, kmp_taskdata_t *current_task) { kmp_taskdata_t *taskdata = KMP_TASK_TO_TASKDATA(task); kmp_info_t *thread; -#if OMP_40_ENABLED int discard = 0 /* false */; -#endif KA_TRACE( 30, ("__kmp_invoke_task(enter): T#%d invoking task %p, current_task=%p\n", gtid, taskdata, current_task)); KMP_DEBUG_ASSERT(task); -#if OMP_45_ENABLED if (taskdata->td_flags.proxy == TASK_PROXY && taskdata->td_flags.complete == 1) { // This is a proxy task that was already completed but it needs to run @@ -1514,7 +1438,6 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, return; } -#endif #if OMPT_SUPPORT // For untied tasks, the first task executed only calls __kmpc_omp_task and @@ -1532,17 +1455,12 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, } #endif -#if OMP_45_ENABLED // Proxy tasks are not handled by the runtime if (taskdata->td_flags.proxy != TASK_PROXY) { -#endif ANNOTATE_HAPPENS_AFTER(task); __kmp_task_start(gtid, task, current_task); // OMPT only if not discarded -#if OMP_45_ENABLED } -#endif -#if OMP_40_ENABLED // TODO: cancel tasks if the parallel region has also been cancelled // TODO: check if this sequence can be hoisted above __kmp_task_start // if cancellation has been enabled for this run ... @@ -1600,7 +1518,6 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, break; } #endif // KMP_STATS_ENABLED -#endif // OMP_40_ENABLED // OMPT task begin #if OMPT_SUPPORT @@ -1640,15 +1557,11 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, } #endif -#if OMP_40_ENABLED } -#endif // OMP_40_ENABLED -#if OMP_45_ENABLED // Proxy tasks are not handled by the runtime if (taskdata->td_flags.proxy != TASK_PROXY) { -#endif ANNOTATE_HAPPENS_BEFORE(taskdata->td_parent); #if OMPT_SUPPORT if (UNLIKELY(ompt_enabled.enabled)) { @@ -1660,9 +1573,7 @@ static void __kmp_invoke_task(kmp_int32 gtid, kmp_task_t *task, } else #endif __kmp_task_finish(gtid, task, current_task); -#if OMP_45_ENABLED } -#endif KA_TRACE( 30, @@ -1743,14 +1654,10 @@ kmp_int32 __kmp_omp_task(kmp_int32 gtid, kmp_task_t *new_task, bool serialize_immediate) { kmp_taskdata_t *new_taskdata = KMP_TASK_TO_TASKDATA(new_task); -/* Should we execute the new task or queue it? For now, let's just always try to - queue it. If the queue fills up, then we'll execute it. */ -#if OMP_45_ENABLED + /* Should we execute the new task or queue it? For now, let's just always try + to queue it. If the queue fills up, then we'll execute it. */ if (new_taskdata->td_flags.proxy == TASK_PROXY || __kmp_push_task(gtid, new_task) == TASK_NOT_PUSHED) // if cannot defer -#else - if (__kmp_push_task(gtid, new_task) == TASK_NOT_PUSHED) // if cannot defer -#endif { // Execute this task immediately kmp_taskdata_t *current_task = __kmp_threads[gtid]->th.th_current_task; if (serialize_immediate) @@ -1939,10 +1846,8 @@ static kmp_int32 __kmpc_omp_taskwait_template(ident_t *loc_ref, kmp_int32 gtid, bool must_wait = !taskdata->td_flags.team_serial && !taskdata->td_flags.final; -#if OMP_45_ENABLED must_wait = must_wait || (thread->th.th_task_team != NULL && thread->th.th_task_team->tt.tt_found_proxy_tasks); -#endif if (must_wait) { kmp_flag_32 flag(RCAST(std::atomic *, &(taskdata->td_incomplete_child_tasks)), @@ -2077,7 +1982,6 @@ kmp_int32 __kmpc_omp_taskyield(ident_t *loc_ref, kmp_int32 gtid, int end_part) { return TASK_CURRENT_NOT_QUEUED; } -#if OMP_50_ENABLED // Task Reduction implementation // // Note: initial implementation didn't take into account the possibility @@ -2490,9 +2394,7 @@ Finalize task reduction for a parallel or worksharing. void __kmpc_task_reduction_modifier_fini(ident_t *loc, int gtid, int is_ws) { __kmpc_end_taskgroup(loc, gtid); } -#endif -#if OMP_40_ENABLED // __kmpc_taskgroup: Start a new taskgroup void __kmpc_taskgroup(ident_t *loc, int gtid) { kmp_info_t *thread = __kmp_threads[gtid]; @@ -2503,10 +2405,8 @@ void __kmpc_taskgroup(ident_t *loc, int gtid) { KMP_ATOMIC_ST_RLX(&tg_new->count, 0); KMP_ATOMIC_ST_RLX(&tg_new->cancel_request, cancel_noreq); tg_new->parent = taskdata->td_taskgroup; -#if OMP_50_ENABLED tg_new->reduce_data = NULL; tg_new->reduce_num_data = 0; -#endif taskdata->td_taskgroup = tg_new; #if OMPT_SUPPORT && OMPT_OPTIONAL @@ -2575,14 +2475,9 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) { } #endif -#if OMP_45_ENABLED if (!taskdata->td_flags.team_serial || (thread->th.th_task_team != NULL && - thread->th.th_task_team->tt.tt_found_proxy_tasks)) -#else - if (!taskdata->td_flags.team_serial) -#endif - { + thread->th.th_task_team->tt.tt_found_proxy_tasks)) { kmp_flag_32 flag(RCAST(std::atomic *, &(taskgroup->count)), 0U); while (KMP_ATOMIC_LD_ACQ(&taskgroup->count) != 0) { @@ -2608,7 +2503,6 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) { } KMP_DEBUG_ASSERT(taskgroup->count == 0); -#if OMP_50_ENABLED if (taskgroup->reduce_data != NULL) { // need to reduce? int cnt; void *reduce_data; @@ -2657,7 +2551,6 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) { __kmp_task_reduction_fini(thread, taskgroup); } } -#endif // Restore parent taskgroup for the current task taskdata->td_taskgroup = taskgroup->parent; __kmp_thread_free(thread, taskgroup); @@ -2674,7 +2567,6 @@ void __kmpc_end_taskgroup(ident_t *loc, int gtid) { } #endif } -#endif // __kmp_remove_my_task: remove a task from my own deque static kmp_task_t *__kmp_remove_my_task(kmp_info_t *thread, kmp_int32 gtid, @@ -2917,11 +2809,7 @@ static inline int __kmp_execute_tasks_template( nthreads = task_team->tt.tt_nproc; unfinished_threads = &(task_team->tt.tt_unfinished_threads); -#if OMP_45_ENABLED KMP_DEBUG_ASSERT(nthreads > 1 || task_team->tt.tt_found_proxy_tasks); -#else - KMP_DEBUG_ASSERT(nthreads > 1); -#endif KMP_DEBUG_ASSERT(*unfinished_threads >= 0); while (1) { // Outer loop keeps trying to find tasks in case of single thread @@ -3046,17 +2934,11 @@ static inline int __kmp_execute_tasks_template( } } -// The task source has been exhausted. If in final spin loop of barrier, check -// if termination condition is satisfied. -#if OMP_45_ENABLED - // The work queue may be empty but there might be proxy tasks still - // executing + // The task source has been exhausted. If in final spin loop of barrier, + // check if termination condition is satisfied. The work queue may be empty + // but there might be proxy tasks still executing. if (final_spin && - KMP_ATOMIC_LD_ACQ(¤t_task->td_incomplete_child_tasks) == 0) -#else - if (final_spin) -#endif - { + KMP_ATOMIC_LD_ACQ(¤t_task->td_incomplete_child_tasks) == 0) { // First, decrement the #unfinished threads, if that has not already been // done. This decrement might be to the spin location, and result in the // termination condition being satisfied. @@ -3092,14 +2974,11 @@ static inline int __kmp_execute_tasks_template( return FALSE; } -#if OMP_45_ENABLED // We could be getting tasks from target constructs; if this is the only // thread, keep trying to execute tasks from own queue if (nthreads == 1) use_own_tasks = 1; - else -#endif - { + else { KA_TRACE(15, ("__kmp_execute_tasks_template: T#%d can't find work\n", gtid)); return FALSE; @@ -3222,12 +3101,8 @@ static void __kmp_enable_tasking(kmp_task_team_t *task_team, * exit __kmp__release at the next barrier. I.e. the lifetimes * of the kmp_task_team_t structs for consecutive barriers can overlap * (and will, unless the master thread is the last thread to exit the barrier - * release phase, which is not typical). - * - * The existence of such a struct is useful outside the context of tasking, - * but for now, I'm trying to keep it specific to the OMP_30_ENABLED macro, - * so that any performance differences show up when comparing the 2.5 vs. 3.0 - * libraries. + * release phase, which is not typical). The existence of such a struct is + * useful outside the context of tasking. * * We currently use the existence of the threads array as an indicator that * tasks were spawned since the last barrier. If the structure is to be @@ -3456,9 +3331,7 @@ static kmp_task_team_t *__kmp_allocate_task_team(kmp_info_t *thread, } TCW_4(task_team->tt.tt_found_tasks, FALSE); -#if OMP_45_ENABLED TCW_4(task_team->tt.tt_found_proxy_tasks, FALSE); -#endif task_team->tt.tt_nproc = nthreads = team->t.t_nproc; KMP_ATOMIC_ST_REL(&task_team->tt.tt_unfinished_threads, nthreads); @@ -3620,9 +3493,7 @@ void __kmp_task_team_setup(kmp_info_t *this_thr, kmp_team_t *team, int always) { team->t.t_nproc != task_team->tt.tt_nproc) { TCW_4(task_team->tt.tt_nproc, team->t.t_nproc); TCW_4(task_team->tt.tt_found_tasks, FALSE); -#if OMP_45_ENABLED TCW_4(task_team->tt.tt_found_proxy_tasks, FALSE); -#endif KMP_ATOMIC_ST_REL(&task_team->tt.tt_unfinished_threads, team->t.t_nproc); TCW_4(task_team->tt.tt_active, TRUE); @@ -3693,13 +3564,9 @@ void __kmp_task_team_wait( ("__kmp_task_team_wait: Master T#%d deactivating task_team %p: " "setting active to false, setting local and team's pointer to NULL\n", __kmp_gtid_from_thread(this_thr), task_team)); -#if OMP_45_ENABLED KMP_DEBUG_ASSERT(task_team->tt.tt_nproc > 1 || task_team->tt.tt_found_proxy_tasks == TRUE); TCW_SYNC_4(task_team->tt.tt_found_proxy_tasks, FALSE); -#else - KMP_DEBUG_ASSERT(task_team->tt.tt_nproc > 1); -#endif KMP_CHECK_UPDATE(task_team->tt.tt_untied_task_encountered, 0); TCW_SYNC_4(task_team->tt.tt_active, FALSE); KMP_MB(); @@ -3743,8 +3610,6 @@ void __kmp_tasking_barrier(kmp_team_t *team, kmp_info_t *thread, int gtid) { #endif /* USE_ITT_BUILD */ } -#if OMP_45_ENABLED - // __kmp_give_task puts a task into a given thread queue if: // - the queue for that thread was created // - there's space in that queue @@ -3964,7 +3829,6 @@ void __kmpc_proxy_task_completed_ooo(kmp_task_t *ptask) { taskdata)); } -#if OMP_50_ENABLED kmp_event_t *__kmpc_task_allow_completion_event(ident_t *loc_ref, int gtid, kmp_task_t *task) { kmp_taskdata_t *td = KMP_TASK_TO_TASKDATA(task); @@ -4014,7 +3878,6 @@ void __kmp_fulfill_event(kmp_event_t *event) { } } } -#endif // __kmp_task_dup_alloc: Allocate the taskdata and make a copy of source task // for taskloop @@ -4667,5 +4530,3 @@ void __kmpc_taskloop(ident_t *loc, int gtid, kmp_task_t *task, int if_val, } KA_TRACE(20, ("__kmpc_taskloop(exit): T#%d\n", gtid)); } - -#endif diff --git a/openmp/runtime/src/kmp_version.cpp b/openmp/runtime/src/kmp_version.cpp index 7a4934a..7464d19 100644 --- a/openmp/runtime/src/kmp_version.cpp +++ b/openmp/runtime/src/kmp_version.cpp @@ -88,16 +88,7 @@ int const __kmp_version_major = KMP_VERSION_MAJOR; int const __kmp_version_minor = KMP_VERSION_MINOR; int const __kmp_version_build = KMP_VERSION_BUILD; -int const __kmp_openmp_version = -#if OMP_50_ENABLED - 201611; -#elif OMP_45_ENABLED - 201511; -#elif OMP_40_ENABLED - 201307; -#else - 201107; -#endif +int const __kmp_openmp_version = 201611; /* Do NOT change the format of this string! Intel(R) Thread Profiler checks for a specific format some changes in the recognition routine there need to be diff --git a/openmp/runtime/src/kmp_wait_release.h b/openmp/runtime/src/kmp_wait_release.h index 3a4884c..bb6bdf5 100644 --- a/openmp/runtime/src/kmp_wait_release.h +++ b/openmp/runtime/src/kmp_wait_release.h @@ -274,19 +274,13 @@ final_spin=FALSE) KMP_INIT_YIELD(spins); // Setup for waiting - if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME -#if OMP_50_ENABLED - || __kmp_pause_status == kmp_soft_paused -#endif - ) { + if (__kmp_dflt_blocktime != KMP_MAX_BLOCKTIME || + __kmp_pause_status == kmp_soft_paused) { #if KMP_USE_MONITOR // The worker threads cannot rely on the team struct existing at this point. // Use the bt values cached in the thread struct instead. #ifdef KMP_ADJUST_BLOCKTIME - if ( -#if OMP_50_ENABLED - __kmp_pause_status == kmp_soft_paused || -#endif + if (__kmp_pause_status == kmp_soft_paused || (__kmp_zero_bt && !this_thr->th.th_team_bt_set)) // Force immediate suspend if not set by user and more threads than // available procs @@ -310,12 +304,10 @@ final_spin=FALSE) th_gtid, __kmp_global.g.g_time.dt.t_value, hibernate, hibernate - __kmp_global.g.g_time.dt.t_value)); #else -#if OMP_50_ENABLED if (__kmp_pause_status == kmp_soft_paused) { // Force immediate suspend hibernate_goal = KMP_NOW(); } else -#endif hibernate_goal = KMP_NOW() + this_thr->th.th_team_bt_intervals; poll_count = 0; #endif // KMP_USE_MONITOR @@ -387,11 +379,8 @@ final_spin=FALSE) } // Don't suspend if KMP_BLOCKTIME is set to "infinite" - if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME -#if OMP_50_ENABLED - && __kmp_pause_status != kmp_soft_paused -#endif - ) + if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME && + __kmp_pause_status != kmp_soft_paused) continue; // Don't suspend if there is a likelihood of new tasks being spawned. @@ -411,11 +400,9 @@ final_spin=FALSE) if (!sleepable) continue; -#if OMP_50_ENABLED if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME && __kmp_pause_status != kmp_soft_paused) continue; -#endif KF_TRACE(50, ("__kmp_wait_sleep: T#%d suspend time reached\n", th_gtid)); diff --git a/openmp/runtime/src/ompt-event-specific.h b/openmp/runtime/src/ompt-event-specific.h index 7087152..da6a0e4 100644 --- a/openmp/runtime/src/ompt-event-specific.h +++ b/openmp/runtime/src/ompt-event-specific.h @@ -76,14 +76,9 @@ #define ompt_callback_mutex_released_implemented ompt_event_MAY_ALWAYS_OPTIONAL -#if OMP_40_ENABLED #define ompt_callback_dependences_implemented \ ompt_event_MAY_ALWAYS_OPTIONAL #define ompt_callback_task_dependence_implemented ompt_event_MAY_ALWAYS_OPTIONAL -#else -#define ompt_callback_dependences_implemented ompt_event_UNIMPLEMENTED -#define ompt_callback_task_dependence_implemented ompt_event_UNIMPLEMENTED -#endif /* OMP_40_ENABLED */ #define ompt_callback_work_implemented ompt_event_MAY_ALWAYS_OPTIONAL diff --git a/openmp/runtime/src/ompt-internal.h b/openmp/runtime/src/ompt-internal.h index 1636f43..5a6beaf 100644 --- a/openmp/runtime/src/ompt-internal.h +++ b/openmp/runtime/src/ompt-internal.h @@ -57,10 +57,8 @@ typedef struct { ompt_data_t task_data; struct kmp_taskdata *scheduling_parent; int thread_num; -#if OMP_40_ENABLED int ndeps; ompt_dependence_t *deps; -#endif /* OMP_40_ENABLED */ } ompt_task_info_t; typedef struct { @@ -88,7 +86,7 @@ typedef struct { extern ompt_callbacks_internal_t ompt_callbacks; -#if OMP_40_ENABLED && OMPT_SUPPORT && OMPT_OPTIONAL +#if OMPT_SUPPORT && OMPT_OPTIONAL #if USE_FAST_MEMORY #define KMP_OMPT_DEPS_ALLOC __kmp_fast_allocate #define KMP_OMPT_DEPS_FREE __kmp_fast_free @@ -96,7 +94,7 @@ extern ompt_callbacks_internal_t ompt_callbacks; #define KMP_OMPT_DEPS_ALLOC __kmp_thread_malloc #define KMP_OMPT_DEPS_FREE __kmp_thread_free #endif -#endif /* OMP_40_ENABLED && OMPT_SUPPORT && OMPT_OPTIONAL */ +#endif /* OMPT_SUPPORT && OMPT_OPTIONAL */ #ifdef __cplusplus extern "C" { diff --git a/openmp/runtime/src/z_Linux_util.cpp b/openmp/runtime/src/z_Linux_util.cpp index b1cf829..1983fc2 100644 --- a/openmp/runtime/src/z_Linux_util.cpp +++ b/openmp/runtime/src/z_Linux_util.cpp @@ -1264,11 +1264,9 @@ static void __kmp_atfork_child(void) { // over-subscription after the fork and this can improve things for // scripting languages that use OpenMP inside process-parallel code). __kmp_affinity_type = affinity_none; -#if OMP_40_ENABLED if (__kmp_nested_proc_bind.bind_types != NULL) { __kmp_nested_proc_bind.bind_types[0] = proc_bind_false; } -#endif // OMP_40_ENABLED #endif // KMP_AFFINITY_SUPPORTED __kmp_init_runtime = FALSE; @@ -1438,7 +1436,6 @@ static inline void __kmp_suspend_template(int th_gtid, C *flag) { /* TODO: shouldn't this use release semantics to ensure that __kmp_suspend_initialize_thread gets called first? */ old_spin = flag->set_sleeping(); -#if OMP_50_ENABLED if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME && __kmp_pause_status != kmp_soft_paused) { flag->unset_sleeping(); @@ -1446,7 +1443,6 @@ static inline void __kmp_suspend_template(int th_gtid, C *flag) { KMP_CHECK_SYSFAIL("pthread_mutex_unlock", status); return; } -#endif KF_TRACE(5, ("__kmp_suspend_template: T#%d set sleep bit for spin(%p)==%x," " was %x\n", th_gtid, flag->get(), flag->load(), old_spin)); diff --git a/openmp/runtime/src/z_Windows_NT_util.cpp b/openmp/runtime/src/z_Windows_NT_util.cpp index c503e9c..c149dda 100644 --- a/openmp/runtime/src/z_Windows_NT_util.cpp +++ b/openmp/runtime/src/z_Windows_NT_util.cpp @@ -372,14 +372,12 @@ static inline void __kmp_suspend_template(int th_gtid, C *flag) { /* TODO: shouldn't this use release semantics to ensure that __kmp_suspend_initialize_thread gets called first? */ old_spin = flag->set_sleeping(); -#if OMP_50_ENABLED if (__kmp_dflt_blocktime == KMP_MAX_BLOCKTIME && __kmp_pause_status != kmp_soft_paused) { flag->unset_sleeping(); __kmp_win32_mutex_unlock(&th->th.th_suspend_mx); return; } -#endif KF_TRACE(5, ("__kmp_suspend_template: T#%d set sleep bit for flag's" " loc(%p)==%d\n", diff --git a/openmp/runtime/test/affinity/format/lit.local.cfg b/openmp/runtime/test/affinity/format/lit.local.cfg index 80583af..e69de29 100644 --- a/openmp/runtime/test/affinity/format/lit.local.cfg +++ b/openmp/runtime/test/affinity/format/lit.local.cfg @@ -1,2 +0,0 @@ -if 'openmp-5.0' not in config.available_features: - config.unsupported = True diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg index ac5f446..22be385 100644 --- a/openmp/runtime/test/lit.cfg +++ b/openmp/runtime/test/lit.cfg @@ -91,15 +91,6 @@ if config.has_ompt: # for callback.h config.test_flags += " -I " + config.test_source_root + "/ompt" -if config.libomp_omp_version >= 50: - config.available_features.add("openmp-5.0") - -if config.libomp_omp_version >= 45: - config.available_features.add("openmp-4.5") - -if config.libomp_omp_version >= 40: - config.available_features.add("openmp-4.0") - if 'Linux' in config.operating_system: config.available_features.add("linux") diff --git a/openmp/runtime/test/lit.site.cfg.in b/openmp/runtime/test/lit.site.cfg.in index 0964cfc..c2825ee 100644 --- a/openmp/runtime/test/lit.site.cfg.in +++ b/openmp/runtime/test/lit.site.cfg.in @@ -6,7 +6,6 @@ config.test_compiler_features = @OPENMP_TEST_COMPILER_FEATURES@ config.test_filecheck = "@OPENMP_FILECHECK_EXECUTABLE@" config.test_openmp_flags = "@OPENMP_TEST_OPENMP_FLAGS@" config.test_extra_flags = "@OPENMP_TEST_FLAGS@" -config.libomp_omp_version = @LIBOMP_OMP_VERSION@ config.libomp_obj_root = "@CMAKE_CURRENT_BINARY_DIR@" config.library_dir = "@LIBOMP_LIBRARY_DIR@" config.omp_header_directory = "@LIBOMP_BINARY_DIR@/src" diff --git a/openmp/runtime/test/ompt/misc/control_tool_no_ompt_support.c b/openmp/runtime/test/ompt/misc/control_tool_no_ompt_support.c index 23daf8b..bcfe3ca 100644 --- a/openmp/runtime/test/ompt/misc/control_tool_no_ompt_support.c +++ b/openmp/runtime/test/ompt/misc/control_tool_no_ompt_support.c @@ -1,7 +1,5 @@ // RUN: %libomp-compile-and-run -// REQUIRES: openmp-5.0 - #include int main() diff --git a/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp b/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp index 019a9fe..63dffe4 100644 --- a/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp +++ b/openmp/runtime/test/tasking/kmp_task_reduction_nest.cpp @@ -1,6 +1,5 @@ // RUN: %libomp-cxx-compile-and-run // RUN: %libomp-cxx-compile -DFLG=1 && %libomp-run -// REQUIRES: openmp-5.0 // GCC-5 is needed for OpenMP 4.0 support (taskgroup) // XFAIL: gcc-4 #include