From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001 From: Luke Peterson Date: Thu, 8 Oct 2020 12:16:53 -0700 Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm This resolves a compilation error associated with Eigen::eigen_assert_exception. It also eliminates the counting of exceptions that may occur in the OpenMP parallel section. If an unhandled exception occurs in this section, the behavior is non-conforming according to the OpenMP specification. --- Eigen/src/Core/products/Parallelizer.h | 14 +++++--------- test/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h index 67b2442b5..a3cc05b77 100644 --- a/Eigen/src/Core/products/Parallelizer.h +++ b/Eigen/src/Core/products/Parallelizer.h @@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, ei_declare_aligned_stack_constructed_variable(GemmParallelInfo,info,threads,0); - int errorCount = 0; - #pragma omp parallel num_threads(threads) reduction(+: errorCount) + #pragma omp parallel num_threads(threads) { Index i = omp_get_thread_num(); // Note that the actual number of threads might be lower than the number of request ones. @@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, info[i].lhs_start = r0; info[i].lhs_length = actualBlockRows; - EIGEN_TRY { - if(transpose) func(c0, actualBlockCols, 0, rows, info); - else func(0, rows, c0, actualBlockCols, info); - } EIGEN_CATCH(...) { - ++errorCount; - } + if(transpose) + func(c0, actualBlockCols, 0, rows, info); + else + func(0, rows, c0, actualBlockCols, info); } - if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception()); #endif } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0747aa6cb..b02577780 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -163,7 +163,7 @@ ei_add_test(constructor) ei_add_test(linearstructure) ei_add_test(integer_types) ei_add_test(unalignedcount) -if(NOT EIGEN_TEST_NO_EXCEPTIONS) +if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP) ei_add_test(exceptions) endif() ei_add_test(redux) -- GitLab left'>Commit message (Expand)Author 2019-06-14build: Remove 'gnu/packages/bootstrap' and its binaries....* gnu/local.mk (bootstrapdir, bootstrap_i686_linuxdir) (bootstrap_armhf_linuxdir, bootstrap_aarch64_linuxdir) (bootstrap_mips64el_linuxdir, dist_bootstrap_i686_linux_DATA) (dist_bootstrap_armhf_linux_DATA, dist_bootstrap_aarch64_linux_DATA) (dist_bootstrap_mips64el_linux_DATA): Remove. (set-bootstrap-executable-permissions): Remove target. * Makefile.am (install-data-hook): Remove dependency on 'set-bootstrap-executable-permissions'. * gnu/packages/bootstrap: Remove directory. * tests/search-paths.scm ("evaluate-search-paths, separator is #f"): Adjust to match .../aux-files/linux-libre. Ludovic Courtès 2017-04-04tests: Adjust search-paths test following the introduction of aarch64....Fixes a regression introduced in 3b88f3767d9f3ad2cc64173525cd53d429bfe7e7. * tests/search-paths.scm ("evaluate-search-paths, separator is #f"): Change the expected result to "aarch64-linux". Ludovic Courtès 2017-01-23search-paths: Allow specs with #f as their separator....This adds support for single-entry search paths. Fixes <http://bugs.gnu.org/25422>. Reported by Leo Famulari <leo@famulari.name>. * guix/search-paths.scm (<search-path-specification>)[separator]: Document as string or #f. (evaluate-search-paths): Add case for SEPARATOR as #f. (environment-variable-definition): Handle SEPARATOR being #f. * guix/build/utils.scm (list->search-path-as-string): Add case for SEPARATOR as #f. (search-path-as-string->list): Likewise. * guix/build/profiles.scm (abstract-profile): Likewise. * tests/search-paths.scm: New file. * Makefile.am (SCM_TESTS): Add it. * tests/packages.scm ("--search-paths with single-item search path"): New test. * gnu/packages/version-control.scm (git)[native-search-paths](separator): New field. Ludovic Courtès