Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
#-----------------------------

Expand Down Expand Up @@ -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 ()

Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ statisticians with modest computational resources.

## Installation

> Note: Installation requires at least **CMake of version 3.2**. to build ExaGeoStatCPP.
### Requirements
To build and run this software, you will need:

1. [CMake](https://cmake.org/download/) (version 3.2 or higher)
2. [wget](https://www.gnu.org/software/wget/)
3. **gcc** and **g++** compilers
4. **autoconf** and **automake**
5. [libtool](https://www.gnu.org/software/libtool/)
6. [R](https://cran.r-project.org/bin/windows/base/) (only if you plan on using the R functionality)

### C++ source code installation
To install the `ExaGeoStat` project locally, run the following commands in your terminal:
Expand Down
22 changes: 10 additions & 12 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BLUE='\033[0;34m'
NC='\033[0m'

INSTALL_PREFIX=$PWD/installdir/_deps
BASE_DIR=$PWD

# Function to install CMake from source
install_cmake() {
Expand All @@ -36,12 +37,11 @@ install_cmake() {
cd cmake-3.28.1 || exit 1

# Configure, build, and install CMake to the specified location
./bootstrap --prefix="$INSTALL_PREFIX" --parallel=2 -- -DCMAKE_USE_OPENSSL=OFF
./bootstrap --prefix="$INSTALL_PREFIX/CMAKE" --parallel=2 -- -DCMAKE_USE_OPENSSL=OFF
make -j 2
sudo make install

make install
# Clean up
cd "$temp_dir" || exit 1
cd "$BASE_DIR" || exit 1
rm -rf "$temp_dir"
}

Expand All @@ -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"
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -226,10 +226,8 @@ elif [ -x "/Applications/CMake.app/Contents/bin/cmake" ]; then
cmake_command_bin="${cmake_install_dir}/cmake"
else
echo "Installing CMake from source"
mkdir "${ABSOLUTE_PATH}/inst/_deps/"
install_dir="${ABSOLUTE_PATH}/inst/_deps/"
install_cmake "$install_dir"
cmake_command_bin="${ABSOLUTE_PATH}/inst/_deps/bin/cmake"
install_cmake
cmake_command_bin="${INSTALL_PREFIX}/CMAKE/bin/cmake"
fi

"$cmake_command_bin" "$DEVELOPER_WARNINGS" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
Expand All @@ -238,7 +236,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}" \
Expand Down
50 changes: 0 additions & 50 deletions man/get_Z_measurement_vector.Rd

This file was deleted.

49 changes: 0 additions & 49 deletions man/get_locations.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion src/configurations/Configurations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ void Configurations::InitTheta(vector<double> &aTheta, const int &size) {

void Configurations::PrintSummary() {

#ifndef USING_R
#ifndef USE_R
Verbose temp = this->GetVerbosity();
mVerbosity = STANDARD_MODE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
* @date 2023-03-20
**/

#ifdef USE_MKL
#include <mkl_service.h>
#endif

#include <linear-algebra-solvers/concrete/chameleon/dense/ChameleonDense.hpp>

Expand All @@ -29,5 +31,7 @@ ChameleonDense<T>::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
}
5 changes: 5 additions & 0 deletions src/prediction/Prediction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
**/

#include <cstring>

#ifdef USE_MKL
#include <mkl_service.h>
#endif

#include <prediction/Prediction.hpp>
#include <prediction/PredictionHelpers.hpp>
Expand Down Expand Up @@ -194,7 +197,9 @@ void Prediction<T>::PredictMissingData(unique_ptr<ExaGeoStatData<T>> &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;
Expand Down
6 changes: 3 additions & 3 deletions src/results/Results.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ double Results::GetTotalModelingFlops() const {
return this->mTotalModelingFlops;
}

Results *Results::mpInstance = nullptr;

void Results::SetExecutionTimeMLOEMMOM(double aTime) {
this->mExecutionTimeMLOEMMOM = aTime;
}
Expand Down Expand Up @@ -248,4 +246,6 @@ std::vector<double> Results::GetFisherMatrix() const {

std::vector<double> Results::GetPredictedMissedValues() const {
return this->mPredictedMissedValues;
}
}

Results *Results::mpInstance = nullptr;