Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.55k stars 215 forks source link

brew install thundersvm #182

Closed ankane closed 4 years ago

ankane commented 4 years ago

Hi, I created a Homebrew formula for ThunderSVM (https://github.com/Homebrew/homebrew-core/pull/47144) to make installation easier on Mac, so users will be able to do:

brew install thundersvm

Typically, formula are expected to compile with Clang to be accepted by Homebrew, so I wanted to get your thoughts on including this. I was able to get it to compile with the following steps:

Install OpenMP

brew install openmp

Add to src/thundersvm/CMakeLists.txt (following pattern from LightGBM and this resource)

TARGET_LINK_LIBRARIES(thundersvm OpenMP::OpenMP_CXX)

Install ThunderSVM

git clone --recursive https://github.com/Xtra-Computing/thundersvm
cd thundersvm
mkdir build
cd build
cmake .. -DUSE_CUDA=OFF -DUSE_EIGEN=ON -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" -DOpenMP_C_LIB_NAMES=omp -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" -DOpenMP_CXX_LIB_NAMES=omp -DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib
make

Related issue: #39

Also, on the topic of easier installation, it'd be great if there was a make install task that installed the binary files and shared library.

Let me know what you think. Thanks!

zeyiwen commented 4 years ago

Thank you Andrew for the great work! Would you please write the instructions to Mac installation docs (e.g., here) and make a pull request? I can merge it.

zeyiwen commented 4 years ago

Thank you for the work. I have merged the PR, and like to close this issue.

ankane commented 4 years ago

Just fyi, I figured out the Homebrew issue, so will submit a PR to Homebrew once a new version is out.

zeyiwen commented 4 years ago

Thanks! We are looking forward to it.