Skip to content

Commit 181b4bb

Browse files
committed
For your Christmas hacking pleasure.
This release use aligns with Intel(r) Composer XE 2013 SP1 Product Update 2 New features * The library can now be built with clang (though wiht some limitations since clang does not support 128 bit floats) * Support for Vtune analysis of load imbalance * Code contribution from Steven Noonan to build the runtime for ARM* architecture processors * First implementation of runtime API for OpenMP cancellation Bug Fixes * Fixed hang on Windows (only) when using KMP_BLOCKTIME=0 llvm-svn: 197914
1 parent 7018755 commit 181b4bb

Some content is hidden

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

55 files changed

+3043
-1345
lines changed

openmp/CREDITS.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ N: Intel Corporation OpenMP runtime team
1212
W: http://openmprtl.org
1313
D: Created the runtime.
1414

15+
N: Steven Noonan
16+
E: steven@uplinklabs.net
17+
D: Patches for the ARM architecture and several inconsistency removal.

openmp/runtime/README.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ Supported RTL Build Configurations
7474
Supported Architectures: IA-32 architecture, Intel(R) 64, and
7575
Intel(R) Many Integrated Core Architecture
7676

77-
-----------------------------------------------------------
78-
| icc/icl | gcc |
79-
--------------|------------------------------|--------------------------|
80-
| Linux* OS | Yes(1,5) | Yes(2,4) |
81-
| OS X* | Yes(1,3,4) | No |
82-
| Windows* OS | Yes(1,4) | No |
83-
-------------------------------------------------------------------------
77+
--------------------------------------------
78+
| icc/icl | gcc | clang |
79+
--------------|---------------|--------------------------|
80+
| Linux* OS | Yes(1,5) | Yes(2,4) | Yes(4,6,7) |
81+
| OS X* | Yes(1,3,4) | No | Yes(4,6,7) |
82+
| Windows* OS | Yes(1,4) | No | No |
83+
----------------------------------------------------------
8484

8585
(1) On IA-32 architecture and Intel(R) 64, icc/icl versions 12.x are
8686
supported (12.1 is recommended).
@@ -89,6 +89,14 @@ Intel(R) Many Integrated Core Architecture
8989
(4) Intel(R) Many Integrated Core Architecture not supported.
9090
(5) On Intel(R) Many Integrated Core Architecture, icc/icl versions 13.0
9191
or later are required.
92+
(6) clang version 3.3 is supported.
93+
(7) clang currently does not offer a software-implemented 128 bit extended
94+
precision type. Thus, all entry points reliant on this type are removed
95+
from the library and cannot be called in the user program. The following
96+
functions are not available:
97+
__kmpc_atomic_cmplx16_*
98+
__kmpc_atomic_float16_*
99+
__kmpc_atomic_*_fp
92100

93101
Front-end Compilers that work with this RTL
94102
===========================================

openmp/runtime/doc/Reference.pdf

-72 Bytes
Binary file not shown.

openmp/runtime/src/dllexports

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ kmpc_set_defaults 224
357357
__kmpc_fork_teams 241
358358
__kmpc_omp_task_with_deps 242
359359
__kmpc_omp_wait_deps 243
360+
__kmpc_cancel 244
361+
__kmpc_cancellationpoint 245
362+
__kmpc_cancel_barrier 246
360363
%endif # OMP_40
361364
%endif
362365

@@ -455,6 +458,8 @@ kmp_set_warnings_off 780
455458
#omp_curr_proc_bind 864
456459
omp_get_num_teams 865
457460
omp_get_team_num 866
461+
omp_get_cancellation 867
462+
kmp_get_cancellation_status 868
458463
%endif # OMP_40
459464

460465
%ifndef stub

openmp/runtime/src/exports_so.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,26 @@ VERSION {
8080

8181
}; # VERSION
8282

83+
# sets up GCC OMP_ version dependency chain
84+
OMP_1.0 {
85+
};
86+
OMP_2.0 {
87+
} OMP_1.0;
88+
OMP_3.0 {
89+
} OMP_2.0;
90+
OMP_3.1 {
91+
} OMP_3.0;
92+
OMP_4.0 {
93+
} OMP_3.1;
94+
95+
# sets up GCC GOMP_ version dependency chain
96+
GOMP_1.0 {
97+
};
98+
GOMP_2.0 {
99+
} GOMP_1.0;
100+
GOMP_3.0 {
101+
} GOMP_2.0;
102+
GOMP_4.0 {
103+
} GOMP_3.0;
104+
83105
# end of file #

openmp/runtime/src/include/40/iomp.h.var

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@
8282
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
8383
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
8484

85+
/* schedule kind constants */
86+
typedef enum kmp_cancel_kind_t {
87+
kmp_cancel_parallel = 1,
88+
kmp_cancel_loop = 2,
89+
kmp_cancel_sections = 3,
90+
kmp_cancel_taskgroup = 4
91+
} kmp_cancel_kind_t;
92+
93+
extern int __KAI_KMPC_CONVENTION kmp_get_cancellation_status(kmp_cancel_kind_t);
94+
8595
# undef __KAI_KMPC_CONVENTION
8696

8797
/* Warning:

openmp/runtime/src/include/40/omp.h.var

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,6 @@
2727
extern "C" {
2828
# endif
2929

30-
# define omp_set_num_threads ompc_set_num_threads
31-
# define omp_set_dynamic ompc_set_dynamic
32-
# define omp_set_nested ompc_set_nested
33-
# define omp_set_max_active_levels ompc_set_max_active_levels
34-
# define omp_set_schedule ompc_set_schedule
35-
# define omp_get_ancestor_thread_num ompc_get_ancestor_thread_num
36-
# define omp_get_team_size ompc_get_team_size
37-
38-
39-
# define kmp_set_stacksize kmpc_set_stacksize
40-
# define kmp_set_stacksize_s kmpc_set_stacksize_s
41-
# define kmp_set_blocktime kmpc_set_blocktime
42-
# define kmp_set_library kmpc_set_library
43-
# define kmp_set_defaults kmpc_set_defaults
44-
# define kmp_set_affinity_mask_proc kmpc_set_affinity_mask_proc
45-
# define kmp_unset_affinity_mask_proc kmpc_unset_affinity_mask_proc
46-
# define kmp_get_affinity_mask_proc kmpc_get_affinity_mask_proc
47-
48-
# define kmp_malloc kmpc_malloc
49-
# define kmp_calloc kmpc_calloc
50-
# define kmp_realloc kmpc_realloc
51-
# define kmp_free kmpc_free
52-
53-
5430
# if defined(_WIN32)
5531
# define __KAI_KMPC_CONVENTION __cdecl
5632
# else
@@ -120,6 +96,7 @@
12096
extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void);
12197
extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void);
12298
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
99+
extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
123100

124101
# include <stdlib.h>
125102
/* kmp API functions */

openmp/runtime/src/include/40/omp_lib.f.var

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
3333
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
3434
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
35+
integer, parameter :: kmp_cancel_kind = omp_integer_kind
3536

3637
end module omp_lib_kinds
3738

@@ -56,6 +57,11 @@
5657
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
5758
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
5859

60+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
61+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
62+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
63+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
64+
5965
interface
6066

6167
! ***
@@ -199,6 +205,11 @@
199205
integer (kind=omp_integer_kind) omp_get_team_num
200206
end function omp_get_team_num
201207

208+
function omp_get_cancellation()
209+
use omp_lib_kinds
210+
integer (kind=omp_integer_kind) omp_get_cancellation
211+
end function omp_get_cancellation
212+
202213
subroutine omp_init_lock(lockvar)
203214
!DIR$ IF(__INTEL_COMPILER.GE.1400)
204215
!DIR$ attributes known_intrinsic :: omp_init_lock
@@ -417,6 +428,11 @@
417428
subroutine kmp_set_warnings_off()
418429
end subroutine kmp_set_warnings_off
419430

431+
function kmp_get_cancellation_status(cancelkind)
432+
use omp_lib_kinds
433+
integer (kind=kmp_cancel_kind) cancelkind
434+
logical (kind=omp_logical_kind) kmp_get_cancellation_status
435+
end function kmp_get_cancellation_status
420436
end interface
421437

422438
!dec$ if defined(_WIN32)
@@ -459,6 +475,7 @@
459475
!dec$ attributes alias:'OMP_GET_NUM_DEVICES' :: omp_get_num_devices
460476
!dec$ attributes alias:'OMP_GET_NUM_TEAMS' :: omp_get_num_teams
461477
!dec$ attributes alias:'OMP_GET_TEAM_NUM' :: omp_get_team_num
478+
!dec$ attributes alias:'OMP_GET_CANCELLATION' :: omp_get_cancellation
462479

463480
!dec$ attributes alias:'omp_init_lock' :: omp_init_lock
464481
!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock
@@ -498,6 +515,8 @@
498515
!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
499516
!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
500517

518+
!dec$ attributes alias:'KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
519+
501520
!dec$ else
502521

503522
!***
@@ -531,6 +550,7 @@
531550
!dec$ attributes alias:'_OMP_GET_NUM_DEVICES' :: omp_get_num_devices
532551
!dec$ attributes alias:'_OMP_GET_NUM_TEAMS' :: omp_get_num_teams
533552
!dec$ attributes alias:'_OMP_GET_TEAM_NUM' :: omp_get_team_num
553+
!dec$ attributes alias:'_OMP_GET_CANCELLATION' :: omp_get_cancellation
534554

535555
!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock
536556
!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock
@@ -570,6 +590,8 @@
570590
!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
571591
!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
572592

593+
!dec$ attributes alias:'_KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
594+
573595
!dec$ endif
574596
!dec$ endif
575597

@@ -606,6 +628,7 @@
606628
!dec$ attributes alias:'omp_get_num_devices_'::omp_get_num_devices
607629
!dec$ attributes alias:'omp_get_num_teams_'::omp_get_num_teams
608630
!dec$ attributes alias:'omp_get_team_num_'::omp_get_team_num
631+
!dec$ attributes alias:'omp_get_cancellation_'::omp_get_cancellation
609632

610633
!dec$ attributes alias:'omp_init_lock_'::omp_init_lock
611634
!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock
@@ -644,6 +667,7 @@
644667

645668
!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on
646669
!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off
670+
!dec$ attributes alias:'kmp_get_cancellation_status_'::kmp_get_cancellation_status
647671

648672
!dec$ endif
649673

@@ -678,6 +702,7 @@
678702
!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick
679703
!dec$ attributes alias:'_omp_get_num_teams_'::omp_get_num_teams
680704
!dec$ attributes alias:'_omp_get_team_num_'::omp_get_team_num
705+
!dec$ attributes alias:'_omp_get_cancellation_'::omp_get_cancellation
681706

682707
!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock
683708
!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock
@@ -717,6 +742,8 @@
717742
!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on
718743
!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off
719744

745+
!dec$ attributes alias:'_kmp_get_cancellation_status_'::kmp_get_cancellation_status
746+
720747
!dec$ endif
721748

722749
end module omp_lib

openmp/runtime/src/include/40/omp_lib.f90.var

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
integer, parameter :: kmp_pointer_kind = c_intptr_t
2929
integer, parameter :: kmp_size_t_kind = c_size_t
3030
integer, parameter :: kmp_affinity_mask_kind = c_intptr_t
31+
integer, parameter :: kmp_cancel_kind = omp_integer_kind
3132

3233
end module omp_lib_kinds
3334

@@ -47,12 +48,18 @@
4748
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
4849
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
4950

51+
5052
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
5153
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
5254
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
5355
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
5456
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
5557

58+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
59+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
60+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
61+
integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
62+
5663
interface
5764

5865
! ***
@@ -198,6 +205,11 @@
198205
integer (kind=omp_integer_kind) omp_get_team_num
199206
end function omp_get_team_num
200207

208+
function omp_get_cancellation() bind(c)
209+
use omp_lib_kinds
210+
integer (kind=omp_integer_kind) omp_get_cancellation
211+
end function omp_get_cancellation
212+
201213
subroutine omp_init_lock(lockvar) bind(c)
202214
!DIR$ IF(__INTEL_COMPILER.GE.1400)
203215
!DIR$ attributes known_intrinsic :: omp_init_lock
@@ -417,6 +429,12 @@
417429
subroutine kmp_set_warnings_off() bind(c)
418430
end subroutine kmp_set_warnings_off
419431

432+
function kmp_get_cancellation_status(cancelkind) bind(c)
433+
use omp_lib_kinds
434+
integer (kind=kmp_cancel_kind), value :: cancelkind
435+
logical (kind=omp_logical_kind) kmp_get_cancellation_status
436+
end function kmp_get_cancellation_status
437+
420438
end interface
421439

422440
end module omp_lib

0 commit comments

Comments
 (0)