From f9e36971f3346cd3274bb9d67c4d9b39ea5ee732 Mon Sep 17 00:00:00 2001 From: liaogang Date: Fri, 5 May 2017 10:29:14 +0800 Subject: [PATCH] Add Lapack warning --- cmake/external/openblas.cmake | 1 - paddle/math/tests/test_matrixCompare.cpp | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index 86cb473c3..46398b22c 100644 --- a/cmake/external/openblas.cmake +++ b/cmake/external/openblas.cmake @@ -15,7 +15,6 @@ INCLUDE(cblas) IF(NOT ${CBLAS_FOUND}) - SET(LAPACK_FOUND OFF) INCLUDE(ExternalProject) SET(CBLAS_SOURCES_DIR ${THIRD_PARTY_PATH}/openblas) diff --git a/paddle/math/tests/test_matrixCompare.cpp b/paddle/math/tests/test_matrixCompare.cpp index 782a9613d..05adec637 100644 --- a/paddle/math/tests/test_matrixCompare.cpp +++ b/paddle/math/tests/test_matrixCompare.cpp @@ -236,8 +236,16 @@ TEST(Matrix, unary) { testMatrixTranspose(height, width); testMatrixRotate(height, width); } + #ifdef LAPACK_FOUND // inverse matrix testMatrixInverse(height); + #else + LOG(WARNING) << "Cannot run Matrix Inverse Unit Test.\n" + << "Failed to find lapack library in current system.\n" + << "To address this issue, Please adopt one of the following approaches: \n" + << "1. Simply issue `sudo apt-get install liblapacke-dev` to avoid re-build source code. \n" + << "2. Install MKL/Openblas/ATLAS and re-build PaddlePaddle source code." + #endif } } -- GitLab