diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index 86cb473c385a9e23ba6cf64359cb83b92cfd9448..46398b22c27ae22abf261d61807c6b10becfff36 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 782a9613d8752d1fccf1a59078cea0aaa625f815..05adec63701d422e7499796e6385375d2b92e158 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 } }