From cf7eaed38db25c5205f6aabfd4e96e774fd98af5 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 25 Apr 2014 11:04:02 +0200 Subject: [PATCH] Avoid blocking-size mismatch in unit tests calling Eigen's blas interface. --- test/cholmod_support.cpp | 1 + test/main.h | 4 ++++ test/pastix_support.cpp | 2 ++ test/spqr_support.cpp | 2 ++ test/superlu_support.cpp | 1 + test/umfpack_support.cpp | 1 + 6 files changed, 11 insertions(+) diff --git a/test/cholmod_support.cpp b/test/cholmod_support.cpp index 8f8be3c0e..87f119b1e 100644 --- a/test/cholmod_support.cpp +++ b/test/cholmod_support.cpp @@ -7,6 +7,7 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS #include "sparse_solver.h" #include diff --git a/test/main.h b/test/main.h index fcac0e3ab..3ccc2ae88 100644 --- a/test/main.h +++ b/test/main.h @@ -31,7 +31,11 @@ // B0 is defined in POSIX header termios.h #define B0 FORBIDDEN_IDENTIFIER +// Unit tests calling Eigen's blas library must preserve the default blocking size +// to avoid troubles. +#ifndef EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS #define EIGEN_DEBUG_SMALL_PRODUCT_BLOCKS +#endif // shuts down ICC's remark #593: variable "XXX" was set but never used #define TEST_SET_BUT_UNUSED_VARIABLE(X) X = X + 0; diff --git a/test/pastix_support.cpp b/test/pastix_support.cpp index 14da0944b..49239e3a5 100644 --- a/test/pastix_support.cpp +++ b/test/pastix_support.cpp @@ -7,6 +7,8 @@ // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS #include "sparse_solver.h" #include #include diff --git a/test/spqr_support.cpp b/test/spqr_support.cpp index b8980e081..901c42c40 100644 --- a/test/spqr_support.cpp +++ b/test/spqr_support.cpp @@ -5,6 +5,8 @@ // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed + +#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS #include "sparse.h" #include diff --git a/test/superlu_support.cpp b/test/superlu_support.cpp index 3b16135bc..98a7bc5c8 100644 --- a/test/superlu_support.cpp +++ b/test/superlu_support.cpp @@ -7,6 +7,7 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS #include "sparse_solver.h" #include diff --git a/test/umfpack_support.cpp b/test/umfpack_support.cpp index 9eb84c14b..37ab11f0b 100644 --- a/test/umfpack_support.cpp +++ b/test/umfpack_support.cpp @@ -7,6 +7,7 @@ // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. +#define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS #include "sparse_solver.h" #include