From a005e5b6ae731ee72fb75c26e567445853473803 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Fri, 22 Jun 2018 17:07:05 +0100 Subject: [PATCH] Simplifying travis for OSX. --- .travis.yml | 5 +---- cmake/modules/FindOpenBLAS.cmake | 2 ++ lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp | 4 +--- lib/local/LandmarkDetector/src/CEN_patch_expert.cpp | 4 +--- lib/local/LandmarkDetector/src/FaceDetectorMTCNN.cpp | 4 +--- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16bfdb0a..e7e83c54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,7 +71,6 @@ before_install: brew install dlib; brew install opencv3; brew upgrade boost; - export PKG_CONFIG_PATH=/usr/local/opt/openblas/lib/pkgconfig; fi script: @@ -89,10 +88,8 @@ script: - cd ../../../../../ - mkdir build - cd build - - cmake -D CMAKE_BUILD_TYPE=RELEASE CMAKE_CXX_FLAGS="-std=c++11 -Wno-deprecated" -D CMAKE_EXE_LINKER_FLAGS="-std=c++11" .. + - cmake -D CMAKE_BUILD_TYPE=RELEASE CMAKE_CXX_FLAGS="-std=c++11" -D CMAKE_EXE_LINKER_FLAGS="-std=c++11" .. - make -j4 - - export OMP_NUM_THREADS=1 - - export VECLIB_MAXIMUM_THREADS=1 - ../build/bin/FeatureExtraction -f "../samples/2015-10-15-15-14.avi" -q -mloc model/main_clm_general.txt - ../build/bin/FaceLandmarkImg -fdir ../samples -out_dir data -multi_view 1 -wild -q - ../build/bin/FaceLandmarkImg -f ../samples/sample1.jpg -out_dir data -multi_view 1 -wild -q diff --git a/cmake/modules/FindOpenBLAS.cmake b/cmake/modules/FindOpenBLAS.cmake index ded8c044..a8d58d66 100644 --- a/cmake/modules/FindOpenBLAS.cmake +++ b/cmake/modules/FindOpenBLAS.cmake @@ -54,6 +54,7 @@ SET(Open_BLAS_INCLUDE_SEARCH_PATHS /usr/include/x86_64-linux-gnu /usr/local/include /usr/include + /usr/local/opt/openblas/include ) SET(Open_BLAS_LIB_SEARCH_PATHS @@ -71,6 +72,7 @@ SET(Open_BLAS_LIB_SEARCH_PATHS /usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib + /usr/local/opt/openblas/lib ) FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS} NO_DEFAULT_PATH) diff --git a/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp b/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp index 1a10678b..9a5c795e 100644 --- a/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp +++ b/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp @@ -331,9 +331,7 @@ void CCNF_patch_expert::Read(ifstream &stream, std::vector window_sizes, st } // In case we are using OpenBLAS, make sure it is not multi-threading as we are multi-threading outside of it - #ifndef __APPLE__ - openblas_set_num_threads(1); - #endif + openblas_set_num_threads(1); int n_sigmas = window_sizes.size(); diff --git a/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp b/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp index 6db4c490..b4ab74ac 100644 --- a/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp +++ b/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp @@ -69,9 +69,7 @@ void CEN_patch_expert::Read(ifstream &stream) { // Setting up OpenBLAS - #ifndef __APPLE__ - openblas_set_num_threads(1); - #endif + openblas_set_num_threads(1); // Sanity check int read_type; diff --git a/lib/local/LandmarkDetector/src/FaceDetectorMTCNN.cpp b/lib/local/LandmarkDetector/src/FaceDetectorMTCNN.cpp index e80e6d65..1fd2385c 100644 --- a/lib/local/LandmarkDetector/src/FaceDetectorMTCNN.cpp +++ b/lib/local/LandmarkDetector/src/FaceDetectorMTCNN.cpp @@ -264,9 +264,7 @@ void CNN::ClearPrecomp() void CNN::Read(const string& location) { - #ifndef __APPLE__ - openblas_set_num_threads(1); - #endif + openblas_set_num_threads(1); ifstream cnn_stream(location, ios::in | ios::binary); if (cnn_stream.is_open())