1 |
commit: 2a69391373153bcb32284be0a12d38493b24bddd |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 12 15:53:09 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 12 16:15:20 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a693913 |
7 |
|
8 |
dev-cpp/eigen: Backport fix for revdeps build failures |
9 |
|
10 |
Reported-by: Anton Kochkov <anton.kochkov <AT> gmail.com> |
11 |
Thanks-to: Sam James <sam <AT> gentoo.org> |
12 |
Closes: https://bugs.gentoo.org/747949 |
13 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
.../{eigen-3.3.8.ebuild => eigen-3.3.8-r1.ebuild} | 5 +- |
17 |
...error-counting-in-openmp-parallelize_gemm.patch | 64 ++++++++++++++++++++++ |
18 |
2 files changed, 68 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/dev-cpp/eigen/eigen-3.3.8.ebuild b/dev-cpp/eigen/eigen-3.3.8-r1.ebuild |
21 |
similarity index 94% |
22 |
rename from dev-cpp/eigen/eigen-3.3.8.ebuild |
23 |
rename to dev-cpp/eigen/eigen-3.3.8-r1.ebuild |
24 |
index fbc5c610b0e..bddd6bddf84 100644 |
25 |
--- a/dev-cpp/eigen/eigen-3.3.8.ebuild |
26 |
+++ b/dev-cpp/eigen/eigen-3.3.8-r1.ebuild |
27 |
@@ -50,7 +50,10 @@ DEPEND=" |
28 |
# METIS-5 |
29 |
# GOOGLEHASH |
30 |
|
31 |
-PATCHES=( "${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch ) |
32 |
+PATCHES=( |
33 |
+ "${FILESDIR}"/${PN}-3.3.7-gentoo-cmake.patch |
34 |
+ "${FILESDIR}"/${P}-no-error-counting-in-openmp-parallelize_gemm.patch |
35 |
+) |
36 |
|
37 |
src_prepare() { |
38 |
cmake_src_prepare |
39 |
|
40 |
diff --git a/dev-cpp/eigen/files/eigen-3.3.8-no-error-counting-in-openmp-parallelize_gemm.patch b/dev-cpp/eigen/files/eigen-3.3.8-no-error-counting-in-openmp-parallelize_gemm.patch |
41 |
new file mode 100644 |
42 |
index 00000000000..556474e8b31 |
43 |
--- /dev/null |
44 |
+++ b/dev-cpp/eigen/files/eigen-3.3.8-no-error-counting-in-openmp-parallelize_gemm.patch |
45 |
@@ -0,0 +1,64 @@ |
46 |
+From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001 |
47 |
+From: Luke Peterson <hazelnusse@×××××.com> |
48 |
+Date: Thu, 8 Oct 2020 12:16:53 -0700 |
49 |
+Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm |
50 |
+ |
51 |
+This resolves a compilation error associated with |
52 |
+Eigen::eigen_assert_exception. It also eliminates the counting of |
53 |
+exceptions that may occur in the OpenMP parallel section. If an |
54 |
+unhandled exception occurs in this section, the behavior is non-conforming |
55 |
+according to the OpenMP specification. |
56 |
+--- |
57 |
+ Eigen/src/Core/products/Parallelizer.h | 14 +++++--------- |
58 |
+ test/CMakeLists.txt | 2 +- |
59 |
+ 2 files changed, 6 insertions(+), 10 deletions(-) |
60 |
+ |
61 |
+diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h |
62 |
+index 67b2442b5..a3cc05b77 100644 |
63 |
+--- a/Eigen/src/Core/products/Parallelizer.h |
64 |
++++ b/Eigen/src/Core/products/Parallelizer.h |
65 |
+@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, |
66 |
+ |
67 |
+ ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0); |
68 |
+ |
69 |
+- int errorCount = 0; |
70 |
+- #pragma omp parallel num_threads(threads) reduction(+: errorCount) |
71 |
++ #pragma omp parallel num_threads(threads) |
72 |
+ { |
73 |
+ Index i = omp_get_thread_num(); |
74 |
+ // Note that the actual number of threads might be lower than the number of request ones. |
75 |
+@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, |
76 |
+ info[i].lhs_start = r0; |
77 |
+ info[i].lhs_length = actualBlockRows; |
78 |
+ |
79 |
+- EIGEN_TRY { |
80 |
+- if(transpose) func(c0, actualBlockCols, 0, rows, info); |
81 |
+- else func(0, rows, c0, actualBlockCols, info); |
82 |
+- } EIGEN_CATCH(...) { |
83 |
+- ++errorCount; |
84 |
+- } |
85 |
++ if(transpose) |
86 |
++ func(c0, actualBlockCols, 0, rows, info); |
87 |
++ else |
88 |
++ func(0, rows, c0, actualBlockCols, info); |
89 |
+ } |
90 |
+- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception()); |
91 |
+ #endif |
92 |
+ } |
93 |
+ |
94 |
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt |
95 |
+index 0747aa6cb..b02577780 100644 |
96 |
+--- a/test/CMakeLists.txt |
97 |
++++ b/test/CMakeLists.txt |
98 |
+@@ -163,7 +163,7 @@ ei_add_test(constructor) |
99 |
+ ei_add_test(linearstructure) |
100 |
+ ei_add_test(integer_types) |
101 |
+ ei_add_test(unalignedcount) |
102 |
+-if(NOT EIGEN_TEST_NO_EXCEPTIONS) |
103 |
++if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP) |
104 |
+ ei_add_test(exceptions) |
105 |
+ endif() |
106 |
+ ei_add_test(redux) |
107 |
+-- |
108 |
+GitLab |
109 |
+ |