Skip to content

Instantly share code, notes, and snippets.

@vfdev-5
Last active June 1, 2017 23:15
Show Gist options
  • Select an option

  • Save vfdev-5/2af125de81866f2a7c0dea61d91e6043 to your computer and use it in GitHub Desktop.

Select an option

Save vfdev-5/2af125de81866f2a7c0dea61d91e6043 to your computer and use it in GitHub Desktop.
MacOSX - Multi-threaded XGBoost - Installation

How to install XGBoost on MacOSX with multi-threaded support

As explained in the doc

brew install gcc --without-multilib
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/config.mk ./config.mk

Open and modify CC and CXX parameters in config.mk, for example:

CC=/usr/local/bin/gcc-7
CXX=/usr/local/bin/g++-7

Next step, run make :

make -j4

Build with CMake

mkdir build; cd $_
cmake .. -DCMAKE_C_COMPILER=/usr/local/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/local/bin/g++-7 -DCMAKE_BUILD_TYPE=Release
make -j4

Failed to install XGBoost with plugin UPDATER_GPU

Problem is with clang, openmp support and nvcc. Ended up with error :

nvcc  : fatal GNU C/C++ compiler is no longer supported as a host compiler on Mac OS X.

Last version of clang 4.0.0 is not neither supported by nvcc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment