Skip to content

Commit 4cc4bb4

Browse files
committed
I apologise in advance for the size of this check-in. At Intel we do
understand that this is not friendly, and are working to change our internal code-development to make it easier to make development features available more frequently and in finer (more functional) chunks. Unfortunately we haven't got that in place yet, and unpicking this into multiple separate check-ins would be non-trivial, so please bear with me on this one. We should be better in the future. Apologies over, what do we have here? GGC 4.9 compatibility -------------------- * We have implemented the new entrypoints used by code compiled by GCC 4.9 to implement the same functionality in gcc 4.8. Therefore code compiled with gcc 4.9 that used to work will continue to do so. However, there are some other new entrypoints (associated with task cancellation) which are not implemented. Therefore user code compiled by gcc 4.9 that uses these new features will not link against the LLVM runtime. (It remains unclear how to handle those entrypoints, since the GCC interface has potentially unpleasant performance implications for join barriers even when cancellation is not used) --- new parallel entry points --- new entry points that aren't OpenMP 4.0 related These are implemented fully :- GOMP_parallel_loop_dynamic() GOMP_parallel_loop_guided() GOMP_parallel_loop_runtime() GOMP_parallel_loop_static() GOMP_parallel_sections() GOMP_parallel() --- cancellation entry points --- Currently, these only give a runtime error if OMP_CANCELLATION is true because our plain barriers don't check for cancellation while waiting GOMP_barrier_cancel() GOMP_cancel() GOMP_cancellation_point() GOMP_loop_end_cancel() GOMP_sections_end_cancel() --- taskgroup entry points --- These are implemented fully. GOMP_taskgroup_start() GOMP_taskgroup_end() --- target entry points --- These are empty (as they are in libgomp) GOMP_target() GOMP_target_data() GOMP_target_end_data() GOMP_target_update() GOMP_teams() Improvements in Barriers and Fork/Join -------------------------------------- * Barrier and fork/join code is now in its own file (which makes it easier to understand and modify). * Wait/release code is now templated and in its own file; suspend/resume code is also templated * There's a new, hierarchical, barrier, which exploits the cache-hierarchy of the Intel(r) Xeon Phi(tm) coprocessor to improve fork/join and barrier performance. ***BEWARE*** the new source files have *not* been added to the legacy Cmake build system. If you want to use that fixes wil be required. Statistics Collection Code -------------------------- * New code has been added to collect application statistics (if this is enabled at library compile time; by default it is not). The statistics code itself is generally useful, the lightweight timing code uses the X86 rdtsc instruction, so will require changes for other architectures. The intent of this code is not for users to tune their codes but rather 1) For timing code-paths inside the runtime 2) For gathering general properties of OpenMP codes to focus attention on which OpenMP features are most used. Nested Hot Teams ---------------- * The runtime now maintains more state to reduce the overhead of creating and destroying inner parallel teams. This improves the performance of code that repeatedly uses nested parallelism with the same resource allocation. Set the new KMP_HOT_TEAMS_MAX_LEVEL envirable to a depth to enable this (and, of course, OMP_NESTED=true to enable nested parallelism at all). Improved Intel(r) VTune(Tm) Amplifier support --------------------------------------------- * The runtime provides additional information to Vtune via the itt_notify interface to allow it to display better OpenMP specific analyses of load-imbalance. Support for OpenMP Composite Statements --------------------------------------- * Implement new entrypoints required by some of the OpenMP 4.1 composite statements. Improved ifdefs --------------- * More separation of concepts ("Does this platform do X?") from platforms ("Are we compiling for platform Y?"), which should simplify future porting. ScaleMP* contribution --------------------- Stack padding to improve the performance in their environment where cross-node coherency is managed at the page level. Redesign of wait and release code --------------------------------- The code is simplified and performance improved. Bug Fixes --------- *Fixes for Windows multiple processor groups. *Fix Fortran module build on Linux: offload attribute added. *Fix entry names for distribute-parallel-loop construct to be consistent with the compiler codegen. *Fix an inconsistent error message for KMP_PLACE_THREADS environment variable. llvm-svn: 219214
1 parent f72fa67 commit 4cc4bb4

File tree

121 files changed

+9484
-5973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+9484
-5973
lines changed

openmp/CREDITS.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ beautification by scripts. The fields are: name (N), email (E), web-address
99
(S).
1010

1111
N: Carlo Bertolli
12+
W: http://ibm.com
1213
D: IBM contributor to PowerPC support in CMake files and elsewhere.
1314

1415
N: Sunita Chandrasekaran
@@ -28,6 +29,11 @@ D: Created the runtime.
2829
N: Matthias Muller
2930
D: Contributor to testsuite from OpenUH
3031

32+
N: Tal Nevo
33+
E: tal@scalemp.com
34+
D: ScaleMP contributor to improve runtime performance there.
35+
W: http://scalemp.com
36+
3137
N: Pavel Neytchev
3238
D: Contributor to testsuite from OpenUH
3339

openmp/LICENSE.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ software contained in this directory tree is included below.
1414
University of Illinois/NCSA
1515
Open Source License
1616

17-
Copyright (c) 1997-2013 Intel Corporation
17+
Copyright (c) 1997-2014 Intel Corporation
1818

1919
All rights reserved.
2020

@@ -51,7 +51,7 @@ SOFTWARE.
5151

5252
==============================================================================
5353

54-
Copyright (c) 1997-2013 Intel Corporation
54+
Copyright (c) 1997-2014 Intel Corporation
5555

5656
Permission is hereby granted, free of charge, to any person obtaining a copy
5757
of this software and associated documentation files (the "Software"), to deal

openmp/runtime/Build_With_CMake.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ libiomp5 version can be 5 or 4.
137137
OpenMP version can be either 40 or 30.
138138

139139
-Dmic_arch=knc|knf
140-
Intel(R) MIC Architecture. Can be
141-
knf (Knights Ferry) or knc (Knights Corner).
140+
Intel(R) MIC Architecture, can be knf or knc.
142141
This value is ignored if os != mic
143142

144143
-Dmic_os=lin|bsd

openmp/runtime/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,18 @@ set(USE_BUILDPL_RULES false CACHE BOOL "Should the build follow build.pl rules/r
238238
# - these predefined linker flags should work for Windows, Mac, and True Linux for the most popular compilers/linkers
239239
set(USE_PREDEFINED_LINKER_FLAGS true CACHE BOOL "Should the build use the predefined linker flags in CommonFlags.cmake?")
240240

241+
# - On multinode systems, larger alignment is desired to avoid false sharing
242+
set(USE_INTERNODE_ALIGNMENT false CACHE BOOL "Should larger alignment (4096 bytes) be used for some locks and data structures?")
243+
244+
# - libgomp drop-in compatibility
245+
if(${LINUX} AND NOT ${PPC64})
246+
set(USE_VERSION_SYMBOLS true CACHE BOOL "Should version symbols be used? These provide binary compatibility with libgomp.")
247+
else()
248+
set(USE_VERSION_SYMBOLS false CACHE BOOL "Should version symbols be used? These provide binary compatibility with libgomp.")
249+
endif()
250+
241251
# - TSX based locks have __asm code which can be troublesome for some compilers. This feature is also x86 specific.
242-
if({${IA32} OR ${INTEL64})
252+
if(${IA32} OR ${INTEL64})
243253
set(USE_ADAPTIVE_LOCKS true CACHE BOOL "Should TSX-based lock be compiled (adaptive lock in kmp_lock.cpp). These are x86 specific.")
244254
else()
245255
set(USE_ADAPTIVE_LOCKS false CACHE BOOL "Should TSX-based lock be compiled (adaptive lock in kmp_lock.cpp). These are x86 specific.")

openmp/runtime/README.txt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ omp_root: The path to the top-level directory containing the top-level
3737
current working directory.
3838

3939
omp_os: Operating system. By default, the build will attempt to
40-
detect this. Currently supports "linux", "freebsd", "macos", and
40+
detect this. Currently supports "linux", "freebsd", "macos", and
4141
"windows".
4242

4343
arch: Architecture. By default, the build will attempt to
@@ -72,36 +72,44 @@ There is also an experimental CMake build system. This is *not* yet
7272
supported for production use and resulting binaries have not been checked
7373
for compatibility.
7474

75+
On OS X* machines, it is possible to build universal (or fat) libraries which
76+
include both IA-32 architecture and Intel(R) 64 architecture objects in a
77+
single archive; just build the 32 and 32e libraries separately, then invoke
78+
make again with a special argument as follows:
79+
80+
make compiler=clang build_args=fat
81+
7582
Supported RTL Build Configurations
7683
==================================
7784

7885
Supported Architectures: IA-32 architecture, Intel(R) 64, and
7986
Intel(R) Many Integrated Core Architecture
8087

81-
--------------------------------------------
82-
| icc/icl | gcc | clang |
83-
--------------|---------------|--------------------------|
84-
| Linux* OS | Yes(1,5) | Yes(2,4) | Yes(4,6,7) |
85-
| FreeBSD* | No | No | Yes(4,6,7) |
86-
| OS X* | Yes(1,3,4) | No | Yes(4,6,7) |
87-
| Windows* OS | Yes(1,4) | No | No |
88-
----------------------------------------------------------
88+
----------------------------------------------
89+
| icc/icl | gcc | clang |
90+
--------------|---------------|----------------------------|
91+
| Linux* OS | Yes(1,5) | Yes(2,4) | Yes(4,6,7) |
92+
| FreeBSD* | No | No | Yes(4,6,7,8) |
93+
| OS X* | Yes(1,3,4) | No | Yes(4,6,7) |
94+
| Windows* OS | Yes(1,4) | No | No |
95+
------------------------------------------------------------
8996

9097
(1) On IA-32 architecture and Intel(R) 64, icc/icl versions 12.x are
9198
supported (12.1 is recommended).
92-
(2) gcc version 4.6.2 is supported.
99+
(2) GCC* version 4.6.2 is supported.
93100
(3) For icc on OS X*, OS X* version 10.5.8 is supported.
94101
(4) Intel(R) Many Integrated Core Architecture not supported.
95102
(5) On Intel(R) Many Integrated Core Architecture, icc/icl versions 13.0
96103
or later are required.
97-
(6) clang version 3.3 is supported.
98-
(7) clang currently does not offer a software-implemented 128 bit extended
104+
(6) Clang* version 3.3 is supported.
105+
(7) Clang* currently does not offer a software-implemented 128 bit extended
99106
precision type. Thus, all entry points reliant on this type are removed
100107
from the library and cannot be called in the user program. The following
101108
functions are not available:
102109
__kmpc_atomic_cmplx16_*
103110
__kmpc_atomic_float16_*
104111
__kmpc_atomic_*_fp
112+
(8) Community contribution provided AS IS, not tested by Intel.
105113

106114
Front-end Compilers that work with this RTL
107115
===========================================

openmp/runtime/cmake/BuildPLRules.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
###############################################################################
213
# This file contains additional build rules that correspond to build.pl's rules
314
# Building libiomp5.dbg is linux only, Windows will build libiomp5md.dll.pdb

openmp/runtime/cmake/Clang/AsmFlags.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds Clang (clang/clang++) specific compiler dependent flags
213
# The flag types are:
314
# 1) Assembly flags

openmp/runtime/cmake/Clang/CFlags.cmake

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds Clang (clang/clang++) specific compiler dependent flags
213
# The flag types are:
314
# 1) C/C++ Compiler flags
@@ -19,6 +30,7 @@ function(append_compiler_specific_c_and_cxx_flags input_c_flags input_cxx_flags)
1930
endif()
2031
append_c_and_cxx_flags("-Wno-unused-value") # Don't warn about unused values
2132
append_c_and_cxx_flags("-Wno-switch") # Don't warn about switch statements that don't cover entire range of values
33+
append_c_and_cxx_flags("-Wno-deprecated-register") # Don't warn about using register keyword
2234
set(${input_c_flags} ${${input_c_flags}} "${local_c_flags}" PARENT_SCOPE)
2335
set(${input_cxx_flags} ${${input_cxx_flags}} "${local_cxx_flags}" PARENT_SCOPE)
2436
endfunction()

openmp/runtime/cmake/CommonFlags.cmake

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds the common flags independent of compiler
213
# The flag types are:
314
# 1) Assembly flags (append_asm_flags_common)
@@ -71,22 +82,21 @@ function(append_linker_flags_common input_ld_flags input_ld_flags_libs)
7182
set(local_ld_flags)
7283
set(local_ld_flags_libs)
7384

74-
#################################
75-
# Windows linker flags
76-
if(${WINDOWS})
85+
if(${USE_PREDEFINED_LINKER_FLAGS})
86+
87+
#################################
88+
# Windows linker flags
89+
if(${WINDOWS})
7790

78-
##################
79-
# MAC linker flags
80-
elseif(${MAC})
81-
if(${USE_PREDEFINED_LINKER_FLAGS})
91+
##################
92+
# MAC linker flags
93+
elseif(${MAC})
8294
append_linker_flags("-single_module")
8395
append_linker_flags("-current_version ${version}.0")
8496
append_linker_flags("-compatibility_version ${version}.0")
85-
endif()
86-
#####################################################################################
87-
# Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) linker flags
88-
elseif(${MIC})
89-
if(${USE_PREDEFINED_LINKER_FLAGS})
97+
#####################################################################################
98+
# Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) linker flags
99+
elseif(${MIC})
90100
append_linker_flags("-Wl,-x")
91101
append_linker_flags("-Wl,--warn-shared-textrel") # Warn if the linker adds a DT_TEXTREL to a shared object.
92102
append_linker_flags("-Wl,--as-needed")
@@ -98,13 +108,11 @@ function(append_linker_flags_common input_ld_flags input_ld_flags_libs)
98108
if(${STATS_GATHERING})
99109
append_linker_flags_library("-Wl,-lstdc++") # link in standard c++ library (stats-gathering needs it)
100110
endif()
101-
endif()
102-
#########################
103-
# Unix based linker flags
104-
else()
105-
# For now, always include --version-script flag on Unix systems.
106-
append_linker_flags("-Wl,--version-script=${src_dir}/exports_so.txt") # Use exports_so.txt as version script to create versioned symbols for ELF libraries
107-
if(${USE_PREDEFINED_LINKER_FLAGS})
111+
#########################
112+
# Unix based linker flags
113+
else()
114+
# For now, always include --version-script flag on Unix systems.
115+
append_linker_flags("-Wl,--version-script=${src_dir}/exports_so.txt") # Use exports_so.txt as version script to create versioned symbols for ELF libraries
108116
append_linker_flags("-Wl,-z,noexecstack") # Marks the object as not requiring executable stack.
109117
append_linker_flags("-Wl,--as-needed") # Only adds library dependencies as they are needed. (if libiomp5 actually uses a function from the library, then add it)
110118
if(NOT ${STUBS_LIBRARY})
@@ -117,8 +125,9 @@ function(append_linker_flags_common input_ld_flags input_ld_flags_libs)
117125
append_linker_flags_library("-Wl,-ldl") # link in libdl (dynamic loader library)
118126
endif()
119127
endif()
120-
endif() # if(${USE_PREDEFINED_LINKER_FLAGS})
121-
endif() # if(${OPERATING_SYSTEM}) ...
128+
endif() # if(${OPERATING_SYSTEM}) ...
129+
130+
endif() # USE_PREDEFINED_LINKER_FLAGS
122131

123132
set(${input_ld_flags} "${${input_ld_flags}}" "${local_ld_flags}" "${USER_LD_FLAGS}" PARENT_SCOPE)
124133
set(${input_ld_flags_libs} "${${input_ld_flags_libs}}" "${local_ld_flags_libs}" "${USER_LD_LIB_FLAGS}" PARENT_SCOPE)

openmp/runtime/cmake/Definitions.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ function(append_cpp_flags input_cpp_flags)
4242
endif()
4343
append_definitions("-D INTEL_ITTNOTIFY_PREFIX=__kmp_itt_")
4444

45+
if(${USE_VERSION_SYMBOLS})
46+
append_definitions("-D KMP_USE_VERSION_SYMBOLS")
47+
endif()
48+
4549
#####################
4650
# Windows definitions
4751
if(${WINDOWS})
@@ -133,6 +137,11 @@ function(append_cpp_flags input_cpp_flags)
133137
append_definitions("-D KMP_USE_ADAPTIVE_LOCKS=0")
134138
append_definitions("-D KMP_DEBUG_ADAPTIVE_LOCKS=0")
135139
endif()
140+
if(${USE_INTERNODE_ALIGNMENT})
141+
append_definitions("-D KMP_USE_INTERNODE_ALIGNMENT=1")
142+
else()
143+
append_definitions("-D KMP_USE_INTERNODE_ALIGNMENT=0")
144+
endif()
136145
set(${input_cpp_flags} "${${input_cpp_flags}}" "${local_cpp_flags}" "${USER_CPP_FLAGS}" "$ENV{CPPFLAGS}" PARENT_SCOPE)
137146
endfunction()
138147

openmp/runtime/cmake/GNU/AsmFlags.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds GNU (gcc/g++) specific compiler dependent flags
213
# The flag types are:
314
# 1) Assembly flags

openmp/runtime/cmake/GNU/CFlags.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds GNU (gcc/g++) specific compiler dependent flags
213
# The flag types are:
314
# 2) C/C++ Compiler flags

openmp/runtime/cmake/GNU/FortranFlags.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds GNU (gcc/g++) specific compiler dependent flags
213
# The flag types are:
314
# 1) Fortran Compiler flags

openmp/runtime/cmake/Intel/AsmFlags.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) dependent flags
213
# The flag types are:
314
# 1) Assembly flags

openmp/runtime/cmake/Intel/CFlags.cmake

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
#
2+
#//===----------------------------------------------------------------------===//
3+
#//
4+
#// The LLVM Compiler Infrastructure
5+
#//
6+
#// This file is dual licensed under the MIT and the University of Illinois Open
7+
#// Source Licenses. See LICENSE.txt for details.
8+
#//
9+
#//===----------------------------------------------------------------------===//
10+
#
11+
112
# This file holds Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) dependent flags
213
# The flag types are:
314
# 2) C/C++ Compiler flags
@@ -41,7 +52,6 @@ function(append_compiler_specific_c_and_cxx_flags input_c_flags input_cxx_flags)
4152
endif()
4253
else()
4354
append_c_and_cxx_flags("-Wsign-compare") # warn on sign comparisons
44-
append_c_and_cxx_flags("-Werror") # Changes all warnings to errors.
4555
append_c_and_cxx_flags("-Qoption,cpp,--extended_float_types") # Enabled _Quad type.
4656
append_c_and_cxx_flags("-fno-exceptions") # Exception handling table generation is disabled.
4757
append_c_and_cxx_flags("-x c++") # Compile C files as C++ files

0 commit comments

Comments
 (0)