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/man/get_Z_measurement_vector.Rd b/man/get_Z_measurement_vector.Rd deleted file mode 100644 index b9a456bf..00000000 --- a/man/get_Z_measurement_vector.Rd +++ /dev/null @@ -1,50 +0,0 @@ -% Copyright (c) 2017-2024 King Abdullah University of Science and Technology, -% All rights reserved. -% ExaGeoStat is a software package, provided by King Abdullah University of Science and Technology (KAUST). - -% @file get_Z_measurement_vector.Rd -% @brief roxygen2 documentation for the R Interface of get_Z_measurment_vector function. -% @version 1.1.0 -% @author Mahmoud ElKarargy -% @date 2024-03-17 - -\name{get_Z_measurement_vector} -\alias{get_Z_measurement_vector} -\title{Get descriptive Z values function} - -\description{ -Retrieves descriptive Z values from ExaGeoStat data based on type. -} - -\usage{ -get_Z_measurement_vector(data,type) -} - -\arguments{ -\item{data}{A list of ExaGeoStatData that contains the locations.} -\item{type}{A string specifies the type of descriptor value to retrieve (e.g., "Chameleon", "HiCMA").} -} - -\value{ -A numeric vector of descriptive Z values. -} - -\examples{ -ncores <- 2 -ngpus <- 0 -computation <- "exact" -p <- 1 -q <- 1 -hardware <- new(Hardware, computation, ncores, ngpus, p, q) - -dimension = "3D" -problem_size <- 4 -empty_data <- new(Data, problem_size, dimension) - -dts <- 2 -kernel <- "univariate_matern_stationary" -initial_theta <- c(1,0.1,0.5) -exageostat_data <- simulate_data(kernel=kernel, initial_theta=initial_theta, -problem_size=problem_size, dts=dts, dimension=dimension) -Z <- get_Z_measurement_vector(data=exageostat_data, type="chameleon") -} diff --git a/man/get_locations.Rd b/man/get_locations.Rd deleted file mode 100644 index 42eb4153..00000000 --- a/man/get_locations.Rd +++ /dev/null @@ -1,49 +0,0 @@ -% Copyright (c) 2017-2024 King Abdullah University of Science and Technology, -% All rights reserved. -% ExaGeoStat is a software package, provided by King Abdullah University of Science and Technology (KAUST). - -% @file get_locations.Rd -% @brief roxygen2 documentation for the R Interface of get_locations function for all coordinates. -% @version 1.1.0 -% @author Mahmoud ElKarargy -% @date 2024-03-17 - -\name{get_locations} -\alias{get_locations} -\title{Get Locations function} - -\description{ -Retrieves all the coordinates of locations from ExaGeoStatData object. -} - -\usage{ -get_locations(data) -} - -\arguments{ -\item{data}{A list of ExaGeoStatData that contains the locations.} -} - -\value{ -A numeric vector of locations. -} - -\examples{ -ncores <- 1 -ngpus <- 0 -computation <- "exact" -p <- 1 -q <- 1 -hardware <- new(Hardware, computation, ncores, ngpus, p, q) - -dimension = "2D" -problem_size <- 4 -empty_data <- new(Data, problem_size, dimension) - -dts <- 2 -kernel <- "univariate_matern_stationary" -initial_theta <- c(1,0.1,0.5) -exageostat_data <- simulate_data(kernel=kernel, initial_theta=initial_theta, -problem_size=problem_size, dts=dts, dimension=dimension) -locs <- get_locations(data=exageostat_data) -} 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;