diff --git a/CMakeLists.txt b/CMakeLists.txt index 18ce5b92..3fa4872e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,11 @@ list(APPEND LIBS ${LAPACKE_LIBRARIES}) link_directories(${LAPACKE_LIBRARY_DIRS_DEP}) include_directories(${LAPACKE_INCLUDE_DIRS}) +if (${BLA_VENDOR} MATCHES "Intel10_64lp" OR ${BLA_VENDOR} MATCHES "Intel" OR ${BLA_VENDOR} MATCHES "Intel10_64lp_seq") + message(STATUS "Linked to MKL") + add_compile_definitions(USE_MKL) +endif() + # Add all dependencies for ExaGeoStatCPP #----------------------------- @@ -164,7 +169,7 @@ if (USE_R) if (${R_FOUND}) message(STATUS "Using R technology") list(APPEND LIBS R) - add_definitions(-DUSING_R) + add_definitions(-DUSE_R) endif () endif () diff --git a/configure b/configure index 5e6a92f2..9e96f4d8 100755 --- a/configure +++ b/configure @@ -59,7 +59,7 @@ fi BUILDING_TESTS="OFF" BUILDING_HEAVY_TESTS="OFF" BUILDING_EXAMPLES="OFF" -USING_HiCMA="OFF" +USE_HiCMA="OFF" VERBOSE="OFF" USE_CUDA="OFF" USE_MPI="OFF" @@ -112,7 +112,7 @@ while getopts ":tevhHi:cmpTwr" opt; do ;; H) ##### Using HiCMA ##### echo "${GREEN}Using HiCMA.${NC}" - USING_HiCMA="ON" + USE_HiCMA="ON" ;; c) ##### Using cuda enabled ##### echo "${GREEN}Cuda enabled ${NC}" @@ -179,7 +179,7 @@ if [ -z "$BUILDING_EXAMPLES" ]; then echo "${RED}Building examples disabled.${NC}" fi -if [ -z "$USING_HiCMA" ]; then +if [ -z "$USE_HiCMA" ]; then echo "${RED}Using HiCMA is disabled.${NC}" fi @@ -238,7 +238,7 @@ fi -DBUILD_TESTS="${BUILDING_TESTS}" \ -DBUILD_HEAVY_TESTS="${BUILDING_HEAVY_TESTS}" \ -DBUILD_EXAMPLES="${BUILDING_EXAMPLES}" \ - -DUSE_HICMA="${USING_HiCMA}" \ + -DUSE_HICMA="${USE_HiCMA}" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=${VERBOSE} \ -DUSE_CUDA="${USE_CUDA}" \ -DUSE_MPI="${USE_MPI}" \ diff --git a/src/configurations/Configurations.cpp b/src/configurations/Configurations.cpp index 8da6a38f..be6d63ca 100644 --- a/src/configurations/Configurations.cpp +++ b/src/configurations/Configurations.cpp @@ -623,7 +623,7 @@ void Configurations::InitTheta(vector &aTheta, const int &size) { void Configurations::PrintSummary() { -#ifndef USING_R +#ifndef USE_R Verbose temp = this->GetVerbosity(); mVerbosity = STANDARD_MODE; diff --git a/src/linear-algebra-solvers/concrete/chameleon/dense/ChameleonDense.cpp b/src/linear-algebra-solvers/concrete/chameleon/dense/ChameleonDense.cpp index f08c8c3b..4b822886 100644 --- a/src/linear-algebra-solvers/concrete/chameleon/dense/ChameleonDense.cpp +++ b/src/linear-algebra-solvers/concrete/chameleon/dense/ChameleonDense.cpp @@ -12,7 +12,9 @@ * @date 2023-03-20 **/ +#ifdef USE_MKL #include +#endif #include @@ -29,5 +31,7 @@ ChameleonDense::ExaGeoStatPotrfTile(const common::UpperLower &aUpperLower, vo throw std::runtime_error("CHAMELEON_dpotrf_Tile Failed, Matrix is not positive definite"); } // Due to a leak in dense mode in Chameleon, We had to free the buffer manually. +#ifdef USE_MKL mkl_free_buffers(); +#endif } \ No newline at end of file diff --git a/src/prediction/Prediction.cpp b/src/prediction/Prediction.cpp index c5b625b7..da4c3ef7 100644 --- a/src/prediction/Prediction.cpp +++ b/src/prediction/Prediction.cpp @@ -13,7 +13,10 @@ **/ #include + +#ifdef USE_MKL #include +#endif #include #include @@ -194,7 +197,9 @@ void Prediction::PredictMissingData(unique_ptr> &aData, Con // Due to a leak in Chameleon, exactly trsm We had to free the buffer manually. +#ifdef USE_MKL mkl_free_buffers(); +#endif delete[] z_obs; delete[] z_miss; diff --git a/src/results/Results.cpp b/src/results/Results.cpp index 3637fe66..56bb2a12 100644 --- a/src/results/Results.cpp +++ b/src/results/Results.cpp @@ -184,8 +184,6 @@ double Results::GetTotalModelingFlops() const { return this->mTotalModelingFlops; } -Results *Results::mpInstance = nullptr; - void Results::SetExecutionTimeMLOEMMOM(double aTime) { this->mExecutionTimeMLOEMMOM = aTime; } @@ -248,4 +246,6 @@ std::vector Results::GetFisherMatrix() const { std::vector Results::GetPredictedMissedValues() const { return this->mPredictedMissedValues; -} \ No newline at end of file +} + +Results *Results::mpInstance = nullptr;