Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/libomp/
Date: Sat, 30 Dec 2017 22:43:54
Message-Id: 1514673819.635af6abf583f1e17860c0eb72cfe74b474bdfdf.mgorny@gentoo
1 commit: 635af6abf583f1e17860c0eb72cfe74b474bdfdf
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 30 22:30:29 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 30 22:43:39 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=635af6ab
7
8 sys-libs/libomp: Disallow kernels with PDU scheduler
9
10 The PDU scheduler (used e.g. in current versions of -pf kernel) does not
11 implement the sched_yield() call which is used by the OpenMP
12 implementation to switch between threads. As a result, using OpenMP with
13 this scheduler results in horrible performance with 100% CPU usage
14 on looped noop syscall calls.
15
16 Closes: https://bugs.gentoo.org/638410
17
18 sys-libs/libomp/libomp-4.0.1.ebuild | 13 ++++++++++---
19 sys-libs/libomp/libomp-5.0.0.ebuild | 13 ++++++++++---
20 sys-libs/libomp/libomp-5.0.1.ebuild | 13 ++++++++++---
21 sys-libs/libomp/libomp-9999.ebuild | 13 ++++++++++---
22 4 files changed, 40 insertions(+), 12 deletions(-)
23
24 diff --git a/sys-libs/libomp/libomp-4.0.1.ebuild b/sys-libs/libomp/libomp-4.0.1.ebuild
25 index 2eed580030c..299e49921e1 100644
26 --- a/sys-libs/libomp/libomp-4.0.1.ebuild
27 +++ b/sys-libs/libomp/libomp-4.0.1.ebuild
28 @@ -8,7 +8,7 @@ EAPI=6
29 CMAKE_MIN_VERSION=3.7.0-r1
30 PYTHON_COMPAT=( python2_7 )
31
32 -inherit cmake-multilib python-any-r1
33 +inherit cmake-multilib linux-info python-any-r1
34
35 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
36 HOMEPAGE="https://openmp.llvm.org"
37 @@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
38 SLOT="0"
39 KEYWORDS="amd64 ~arm64 x86"
40 IUSE="hwloc ompt test"
41 -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
42 -RESTRICT="test"
43 +RESTRICT="!test? ( test )"
44
45 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
46 # tests:
47 @@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src
48 # least intrusive of all
49 CMAKE_BUILD_TYPE=RelWithDebInfo
50
51 +CONFIG_CHECK="~!SCHED_PDS"
52 +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
53 +
54 python_check_deps() {
55 has_version "dev-python/lit[${PYTHON_USEDEP}]"
56 }
57
58 +pkg_pretend() {
59 + linux-info_pkg_setup
60 +}
61 +
62 pkg_setup() {
63 + linux-info_pkg_setup
64 use test && python-any-r1_pkg_setup
65 }
66
67
68 diff --git a/sys-libs/libomp/libomp-5.0.0.ebuild b/sys-libs/libomp/libomp-5.0.0.ebuild
69 index f90baa29e66..87c3bfe493f 100644
70 --- a/sys-libs/libomp/libomp-5.0.0.ebuild
71 +++ b/sys-libs/libomp/libomp-5.0.0.ebuild
72 @@ -8,7 +8,7 @@ EAPI=6
73 CMAKE_MIN_VERSION=3.7.0-r1
74 PYTHON_COMPAT=( python2_7 )
75
76 -inherit cmake-multilib python-any-r1
77 +inherit cmake-multilib linux-info python-any-r1
78
79 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
80 HOMEPAGE="https://openmp.llvm.org"
81 @@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
82 SLOT="0"
83 KEYWORDS="~amd64 ~arm64 ~x86"
84 IUSE="hwloc ompt test"
85 -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
86 -RESTRICT="test"
87 +RESTRICT="!test? ( test )"
88
89 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
90 # tests:
91 @@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src
92 # least intrusive of all
93 CMAKE_BUILD_TYPE=RelWithDebInfo
94
95 +CONFIG_CHECK="~!SCHED_PDS"
96 +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
97 +
98 python_check_deps() {
99 has_version "dev-python/lit[${PYTHON_USEDEP}]"
100 }
101
102 +pkg_pretend() {
103 + linux-info_pkg_setup
104 +}
105 +
106 pkg_setup() {
107 + linux-info_pkg_setup
108 use test && python-any-r1_pkg_setup
109 }
110
111
112 diff --git a/sys-libs/libomp/libomp-5.0.1.ebuild b/sys-libs/libomp/libomp-5.0.1.ebuild
113 index f90baa29e66..87c3bfe493f 100644
114 --- a/sys-libs/libomp/libomp-5.0.1.ebuild
115 +++ b/sys-libs/libomp/libomp-5.0.1.ebuild
116 @@ -8,7 +8,7 @@ EAPI=6
117 CMAKE_MIN_VERSION=3.7.0-r1
118 PYTHON_COMPAT=( python2_7 )
119
120 -inherit cmake-multilib python-any-r1
121 +inherit cmake-multilib linux-info python-any-r1
122
123 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
124 HOMEPAGE="https://openmp.llvm.org"
125 @@ -22,8 +22,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
126 SLOT="0"
127 KEYWORDS="~amd64 ~arm64 ~x86"
128 IUSE="hwloc ompt test"
129 -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
130 -RESTRICT="test"
131 +RESTRICT="!test? ( test )"
132
133 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
134 # tests:
135 @@ -43,11 +42,19 @@ S=${WORKDIR}/openmp-${PV/_/}.src
136 # least intrusive of all
137 CMAKE_BUILD_TYPE=RelWithDebInfo
138
139 +CONFIG_CHECK="~!SCHED_PDS"
140 +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
141 +
142 python_check_deps() {
143 has_version "dev-python/lit[${PYTHON_USEDEP}]"
144 }
145
146 +pkg_pretend() {
147 + linux-info_pkg_setup
148 +}
149 +
150 pkg_setup() {
151 + linux-info_pkg_setup
152 use test && python-any-r1_pkg_setup
153 }
154
155
156 diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild
157 index 6b0c0b5b801..4d590521516 100644
158 --- a/sys-libs/libomp/libomp-9999.ebuild
159 +++ b/sys-libs/libomp/libomp-9999.ebuild
160 @@ -8,7 +8,7 @@ EAPI=6
161 CMAKE_MIN_VERSION=3.7.0-r1
162 PYTHON_COMPAT=( python2_7 )
163
164 -inherit cmake-multilib git-r3 python-any-r1
165 +inherit cmake-multilib git-r3 linux-info python-any-r1
166
167 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
168 HOMEPAGE="https://openmp.llvm.org"
169 @@ -24,8 +24,7 @@ LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
170 SLOT="0"
171 KEYWORDS=""
172 IUSE="hwloc ompt test"
173 -# Restrict tests to avoid hanging, https://bugs.gentoo.org/638410
174 -RESTRICT="test !test? ( test )"
175 +RESTRICT="!test? ( test )"
176
177 RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
178 # tests:
179 @@ -43,11 +42,19 @@ DEPEND="${RDEPEND}
180 # least intrusive of all
181 CMAKE_BUILD_TYPE=RelWithDebInfo
182
183 +CONFIG_CHECK="~!SCHED_PDS"
184 +ERROR_SCHED_PDS="PDS scheduler is not supported as it does not implement sched_yield()"
185 +
186 python_check_deps() {
187 has_version "dev-python/lit[${PYTHON_USEDEP}]"
188 }
189
190 +pkg_pretend() {
191 + linux-info_pkg_setup
192 +}
193 +
194 pkg_setup() {
195 + linux-info_pkg_setup
196 use test && python-any-r1_pkg_setup
197 }