Contents
This is the guide for the build of GPBoost command line interface (CLI) version. For building the Python and R packages, please refer to Python-package and R-package.
All instructions below are aimed for compiling a 64-bit version. It is worth to compile 32-bit version only in very rare special cases of environmental limitations. 32-bit version is slow and untested, so use it on your own risk and don't forget to adjust some commands in this guide.
On Windows GPBoost can be built using
- CMake and VS Build Tools or Visual Studio
- CMake and MinGW
Install Git for Windows, CMake (3.8 or higher) and VS Build Tools (VS Build Tools is not needed if Visual Studio (2015 or newer) is already installed).
Run the following commands:
git clone --recursive https://github.com/fabsig/GPBoost cd GPBoost mkdir build cd build cmake -A x64 .. cmake --build . --target ALL_BUILD --config Release
Note: sometimes running cmake -A x64 .. gives an error Generator X does not support platform specification, but platform x64 was specified. In this case, you need to explicitly provide the generator, for instance:
cmake -G "Visual Studio 17 2022" ..
The .exe and .dll files will be in the GPBoost/Release folder.
Install Git for Windows, CMake and MinGW-w64.
Run the following commands:
git clone --recursive https://github.com/fabsig/GPBoost cd GPBoost mkdir build cd build cmake -G "MinGW Makefiles" .. mingw32-make.exe -j4
The .exe and .dll files will be in the GPBoost/ folder.
Note: You may need to run the cmake -G "MinGW Makefiles" .. one more time if you encounter the sh.exe was found in your PATH error.
On Linux GPBoost can be built using CMake and gcc or Clang.
Install CMake.
Run the following commands:
git clone --recursive https://github.com/fabsig/GPBoost cd GPBoost mkdir build cd build cmake .. make -j4
Note: glibc >= 2.14 is required.
Note: In some rare cases you may need to install OpenMP runtime library separately (use your package manager and search for lib[g|i]omp for doing this).
On macOS GPBoost can be built using CMake and Apple Clang or gcc.
Only Apple Clang version 8.1 or higher is supported.
Install CMake (3.16 or higher):
brew install cmake
Install OpenMP:
brew install libomp
Run the following commands:
git clone --recursive https://github.com/fabsig/GPBoost cd GPBoost mkdir build cd build cmake .. make -j4
Install CMake (3.2 or higher):
brew install cmake
Install gcc:
brew install gcc
Run the following commands:
git clone --recursive https://github.com/fabsig/GPBoost cd GPBoost export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine mkdir build cd build cmake .. make -j4
Use this version in Linux environments with an NVIDIA GPU. This version enables GPU acceleration for computationally intensive linear algebra operations and Vecchia neighbor searches in Gaussian process models.
The CUDA version is not supported on Windows.
On Linux, a CUDA version of GPBoost can be built using
- CMake, gcc and CUDA;
- CMake, Clang and CUDA.
Please refer to this detailed guide for CUDA libraries installation.
Install CMake, gcc and CUDA.
Run the following commands:
git clone --recursive https://github.com/fabsig/GPBoost cd GPBoost mkdir build cd build cmake .. -DUSE_CUDA_GP=ON make -j4
Install CMake, Clang, OpenMP and CUDA.
Run the following commands:
git clone --recursive https://github.com/fabsig/GPBoost cd GPBoost export CXX=clang++-14 CC=clang-14 # replace "14" with version of Clang installed on your machine mkdir build cd build cmake .. -DUSE_CUDA_GP=ON make -j4
The CUDA version is not supported on macOS.