Xtra-Computing / thundersvm

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

error: identifier "cusparseSpMatDescr_t" is undefined #226

Closed ryh95 closed 3 years ago

ryh95 commented 4 years ago

Dear authors of thundersvm, I have build errors during make, details are as follows. Could you help me out? Thank you!

-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenMP_C: -fopenmp (found version "3.1") 
-- Found OpenMP_CXX: -fopenmp (found version "3.1") 
-- Found OpenMP: TRUE (found version "3.1")  
Compile with CUDA
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yuanhang/Projects/thundersvm/build
[  3%] Building NVCC (Device) object src/thundersvm/CMakeFiles/thundersvm.dir/kernel/thundersvm_generated_smo_kernel.cu.o
[  7%] Building NVCC (Device) object src/thundersvm/CMakeFiles/thundersvm.dir/kernel/thundersvm_generated_kernelmatrix_kernel.cu.o
/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(142): error: identifier "cusparseSpMatDescr_t" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(148): error: identifier "CUSPARSE_INDEX_32I" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(146): error: identifier "cusparseCreateCsr" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(151): error: identifier "cusparseDnMatDescr_t" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(155): error: identifier "CUSPARSE_ORDER_COL" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(154): error: identifier "cusparseCreateDnMat" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(157): error: identifier "cusparseDnMatDescr_t" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(164): error: identifier "CUSPARSE_MM_ALG_DEFAULT" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(163): error: identifier "cusparseSpMM_bufferSize" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(171): error: identifier "cusparseSpMM" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(177): error: identifier "cusparseDestroySpMat" is undefined

/home/yuanhang/Projects/thundersvm/src/thundersvm/kernel/kernelmatrix_kernel.cu(179): error: identifier "cusparseDestroyDnMat" is undefined

12 errors detected in the compilation of "/tmp/tmpxft_0000c6b8_00000000-6_kernelmatrix_kernel.cpp1.ii".
CMake Error at thundersvm_generated_kernelmatrix_kernel.cu.o.Release.cmake:279 (message):
  Error generating file
  /home/yuanhang/Projects/thundersvm/build/src/thundersvm/CMakeFiles/thundersvm.dir/kernel/./thundersvm_generated_kernelmatrix_kernel.cu.o

make[2]: *** [src/thundersvm/CMakeFiles/thundersvm.dir/kernel/thundersvm_generated_kernelmatrix_kernel.cu.o] Error 1
make[1]: *** [src/thundersvm/CMakeFiles/thundersvm.dir/all] Error 2
make: *** [all] Error 2
Kurt-Liuhf commented 4 years ago

Hi @ryh95, a version rollback operation is performed to the system so now it should support CUDA < 10.0. You can redownload ThunderSVM and rebuild the library.

ryh95 commented 4 years ago

Namely, I should build with CUDA versions that are less than 10.0? Are you going to support CUDA >= 10.0 in the future? (my version is 10.0.130) @Kurt-Liuhf

Kurt-Liuhf commented 4 years ago

Can you successfully build the library? ThunderSVM does support CUDA > 10.0 but it does not support CUDA 11+.

ryh95 commented 4 years ago

No, I cant build it and my error is shown above

Kurt-Liuhf commented 4 years ago

I think you should delete the package and redownload it. I can build the system in a workstation with CUDA 10.1 successfully. There is no cusparseSpMatDescr_t in kernelmatrix_kernel.cu already.

ryh95 commented 4 years ago

I succeed in building it. Thank you very much!

zeyiwen commented 3 years ago

This issue should be fixed now. Please reopen it if you still have the problems.