Xtra-Computing / thundersvm

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

Installation error on Apple M1 #272

Open filipstefanovski opened 11 months ago

filipstefanovski commented 11 months ago

When i try to execute the make command on apple m1 i'm getting error that 'cusparse.h' is not found. How can i build the project without CUDA(GPU) support on mac?

cmake \ -DUSE_CUDA=OFF \ -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/17.0.6/include" \ -DOpenMP_C_LIB_NAMES=omp \ -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/17.0.6/include" \ -DOpenMP_CXX_LIB_NAMES=omp \ -DOpenMP_omp_LIBRARY=/opt/homebrew/Cellar/libomp/17.0.6/lib/libomp.dylib \ ..

` make -j
[ 3%] Building CXX object src/thundersvm/CMakeFiles/thundersvm.dir/kernelmatrix.cpp.o /Users/filipstefanovski/numerai-ml/thundersvm/src/thundersvm/kernelmatrix.cpp:7:10: fatal error: 'cusparse.h' file not found

include

     ^~~~~~~~~~~~

1 error generated. make[2]: [src/thundersvm/CMakeFiles/thundersvm.dir/kernelmatrix.cpp.o] Error 1 make[1]: [src/thundersvm/CMakeFiles/thundersvm.dir/all] Error 2 make: *** [all] Error 2`

filipstefanovski commented 11 months ago

It seems that the include was added in this commit: https://github.com/Xtra-Computing/thundersvm/commit/e8e66ae460dc16d929577e7c9e235877c3dc892e

junhao-ray commented 11 months ago

It seems that the include was added in this commit: e8e66ae

Same problem.

Solved by skipping that commit, using previous commit.

However new problem occurred that 'Eigen/Dense' file not found, solved by install eigen brew install eigen and move corresponding fils to thundersvm/eigen.