-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, when I try to install scs with gpu python setup.py install --scs --gpu
, it comes with the following error:
#71
Comments
python setup.py install --scs --gpu
, it comes with the following error:
What version of Cuda / CUsparse are you using? This looks like you're probably using an older version than SCS is assuming. |
Thank you for your reply. My CUDA version is 10.2. And if it is a version problem, can I get an earlier version of SCS? Or can I only solve it by updating CUDA? |
I'm not sure what the earliest version of CuSparse where those functions appeared, but they are in version 12.2: https://docs.nvidia.com/cuda/cusparse/ I would recommend updating CuSparse over using an old version of SCS. Alternately you can use the MKL version of SCS, which is trypically faster than the GPU version anyway. |
Okay, I'll try the MKL version of SCS first, thanks again! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as duplicate.
This comment was marked as duplicate.
================================= scs-gpu versionHello, I seem to have finally installed scs-gpu. there are some problems when using it. My test code is as follows:
Due to the configuration of my computer, I can only install cuda11.8 at most, so I tested two versions of scs-gpu:3.0.0 and 3.2.0 TEST 1: version 3.0.0And the error reported is as follows:
And when I run the
TEST 2: version 3.2.0And the error reported is as follows:
And when I run the
====== |
Namespace(blas64=False, extraverbose=False, float32=False, gpu=True, gpu_atrans=True, int32=False, mkl=False, openmp=False, scs=True)
running install
/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
EasyInstallDeprecationWarning,
running bdist_egg
running egg_info
writing scs.egg-info/PKG-INFO
writing dependency_links to scs.egg-info/dependency_links.txt
writing requirements to scs.egg-info/requires.txt
writing top-level names to scs.egg-info/top_level.txt
blas_mkl_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
openblas_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
runtime_library_dirs = ['/usr/local/lib']
blas_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
runtime_library_dirs = ['/usr/local/lib']
lapack_mkl_info:
NOT AVAILABLE
openblas_lapack_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
runtime_library_dirs = ['/usr/local/lib']
lapack_opt_info:
libraries = ['openblas', 'openblas']
library_dirs = ['/usr/local/lib']
language = c
define_macros = [('HAVE_CBLAS', None)]
runtime_library_dirs = ['/usr/local/lib']
Supported SIMD extensions in this NumPy install:
baseline = SSE,SSE2,SSE3
found = SSSE3,SSE41,POPCNT,SSE42,AVX,F16C,FMA3,AVX2
not found = AVX512F,AVX512CD,AVX512_KNL,AVX512_KNM,AVX512_SKX,AVX512_CLX,AVX512_CNL,AVX512_ICL
/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/numpy/distutils/system_info.py:2026: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/numpy/distutils/system_info.py:2026: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/numpy/distutils/system_info.py:2026: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
if self._calc_info(blas):
Blas info:
{}
/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/numpy/distutils/system_info.py:1858: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, 'calc_info{}'.format(name))()
/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/numpy/distutils/system_info.py:1858: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, 'calc_info{}'.format(name))()
Lapack info:
{}
In file included from scs/linsys/gpu/gpu.c:1:0:
scs/linsys/gpu/gpu.h:96:3: error: unknown type name ‘cusparseSpMatDescr_t’
cusparseSpMatDescr_t descr;
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:100:37: error: unknown type name ‘cusparseDnVecDescr_t’
const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
In file included from scs/linsys/gpu/indirect/private.h:10:0,
from scs/linsys/gpu/indirect/private.c:1:
scs/linsys/gpu/gpu.h:96:3: error: unknown type name ‘cusparseSpMatDescr_t’
cusparseSpMatDescr_t descr;
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:100:37: error: unknown type name ‘cusparseDnVecDescr_t’
const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:101:31: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/gpu.h:105:55: error: unknown type name ‘cusparseDnVecDescr_t’
d SCS(accum_by_a_gpu)(const ScsGpuMatrix *A, const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:101:31: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/gpu.h:105:55: error: unknown type name ‘cusparseDnVecDescr_t’
d SCS(accum_by_a_gpu)(const ScsGpuMatrix *A, const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:106:26: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/gpu.h:110:55: error: unknown type name ‘cusparseDnVecDescr_t’
d SCS(accum_by_p_gpu)(const ScsGpuMatrix *P, const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:106:26: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/gpu.h:110:55: error: unknown type name ‘cusparseDnVecDescr_t’
d SCS(accum_by_p_gpu)(const ScsGpuMatrix P, const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:111:26: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
In file included from scs/linsys/gpu/indirect/private.c:1:0:
scs/linsys/gpu/indirect/private.h:38:3: error: unknown type name ‘cusparseDnVecDescr_t’
cusparseDnVecDescr_t dn_vec_m; / Dense vector of length m /
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/indirect/private.h:39:3: error: unknown type name ‘cusparseDnVecDescr_t’
cusparseDnVecDescr_t dn_vec_n; / Dense vector of length n /
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/indirect/private.h:40:3: error: unknown type name ‘cusparseDnVecDescr_t’
cusparseDnVecDescr_t dn_vec_n_p; / Dense vector of length n */
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:111:26: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/gpu.c:4:37: error: unknown type name ‘cusparseDnVecDescr_t’
const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.c:5:31: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/gpu.c:32:56: error: unknown type name ‘cusparseDnVecDescr_t’
SCS(accum_by_a_gpu)(const ScsGpuMatrix *Ag, const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/indirect/private.c: In function ‘scs_free_lin_sys_work’:
scs/linsys/gpu/indirect/private.c:114:5: warning: implicit declaration of function ‘cusparseDestroyDnVec’; did you mean ‘cusparseDestroy’? [-Wimplicit-function-declaration]
cusparseDestroyDnVec(p->dn_vec_m);
^~~~~~~~~~~~~~~~~~~~
cusparseDestroy
scs/linsys/gpu/gpu.c:33:26: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/gpu.c:66:56: error: unknown type name ‘cusparseDnVecDescr_t’
SCS(accum_by_p_gpu)(const ScsGpuMatrix *Pg, const cusparseDnVecDescr_t x,
^~~~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.c:67:26: error: unknown type name ‘cusparseDnVecDescr_t’; did you mean ‘cusparseMatDescr_t’?
cusparseDnVecDescr_t y,
^~~~~~~~~~~~~~~~~~~~
cusparseMatDescr_t
scs/linsys/gpu/indirect/private.c: In function ‘mat_vec’:
scs/linsys/gpu/indirect/private.c:139:3: warning: implicit declaration of function ‘cusparseDnVecSetValues’; did you mean ‘cusparseDcsrilu02’? [-Wimplicit-function-declaration]
cusparseDnVecSetValues(p->dn_vec_m, (void *)z);
^~~~~~~~~~~~~~~~~~~~~~
cusparseDcsrilu02
In file included from scs/linsys/csparse.h:10:0,
from scs/linsys/gpu/indirect/private.h:8,
from scs/linsys/gpu/indirect/private.c:1:
scs/include/glbopts.h:12:16: warning: implicit declaration of function ‘_scs_accum_by_p_gpu’; did you mean ‘_scs_accum_by_p’? [-Wimplicit-function-declaration]
#define SCS(x) scs##x
^
scs/linsys/gpu/indirect/private.c:150:5: note: in expansion of macro ‘SCS’
SCS(accum_by_p_gpu)
^~~
scs/linsys/gpu/gpu.c: In function ‘_scs_free_gpu_matrix’:
scs/linsys/gpu/gpu.c:77:3: warning: implicit declaration of function ‘cusparseDestroySpMat’; did you mean ‘cusparseDestroyHybMat’? [-Wimplicit-function-declaration]
cusparseDestroySpMat(A->descr);
^~~~~~~~~~~~~~~~~~~~
cusparseDestroyHybMat
scs/include/glbopts.h:12:16: warning: implicit declaration of function ‘_scs_accum_by_atrans_gpu’; did you mean ‘_scs_accum_by_atrans’? [-Wimplicit-function-declaration]
#define SCS(x) scs##x
^
scs/linsys/gpu/indirect/private.c:157:3: note: in expansion of macro ‘SCS’
SCS(accum_by_atrans_gpu)
^~~
scs/linsys/gpu/indirect/private.c: In function ‘scs_init_lin_sys_work’:
scs/linsys/gpu/indirect/private.c:275:3: warning: implicit declaration of function ‘cusparseCreateCsr’; did you mean ‘cusparseCreate’? [-Wimplicit-function-declaration]
cusparseCreateCsr(&Ag->descr, Ag->n, Ag->m, Ag->nnz, Ag->p, Ag->i, Ag->x,
^~~~~~~~~~~~~~~~~
cusparseCreate
In file included from scs/linsys/gpu/indirect/private.h:10:0,
from scs/linsys/gpu/indirect/private.c:1:
scs/linsys/gpu/gpu.h:72:28: error: ‘CUSPARSE_INDEX_32I’ undeclared (first use in this function); did you mean ‘CUSPARSE_SIDE_LEFT’?
#define SCS_CUSPARSE_INDEX CUSPARSE_INDEX_32I
^
scs/linsys/gpu/indirect/private.c:276:21: note: in expansion of macro ‘SCS_CUSPARSE_INDEX’
SCS_CUSPARSE_INDEX, SCS_CUSPARSE_INDEX,
^~~~~~~~~~~~~~~~~~
scs/linsys/gpu/gpu.h:72:28: note: each undeclared identifier is reported only once for each function it appears in
#define SCS_CUSPARSE_INDEX CUSPARSE_INDEX_32I
^
scs/linsys/gpu/indirect/private.c:276:21: note: in expansion of macro ‘SCS_CUSPARSE_INDEX’
SCS_CUSPARSE_INDEX, SCS_CUSPARSE_INDEX,
^~~~~~~~~~~~~~~~~~
scs/linsys/gpu/indirect/private.c:311:3: warning: implicit declaration of function ‘cusparseCreateDnVec’; did you mean ‘cusparseCreate’? [-Wimplicit-function-declaration]
cusparseCreateDnVec(&p->dn_vec_n, Ag->n, p->tmp_m, SCS_CUDA_FLOAT);
^~~~~~~~~~~~~~~~~~~
cusparseCreate
scs/linsys/gpu/indirect/private.c:331:3: warning: implicit declaration of function ‘cusparseCsr2cscEx2_bufferSize’; did you mean ‘cusparseCsrmvEx_bufferSize’? [-Wimplicit-function-declaration]
cusparseCsr2cscEx2_bufferSize(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cusparseCsrmvEx_bufferSize
In file included from scs/linsys/gpu/indirect/private.h:10:0,
from scs/linsys/gpu/indirect/private.c:1:
scs/linsys/gpu/gpu.h:78:25: error: ‘CUSPARSE_CSR2CSC_ALG1’ undeclared (first use in this function); did you mean ‘CUSPARSE_COLOR_ALG1’?
#define SCS_CSR2CSC_ALG CUSPARSE_CSR2CSC_ALG1
^
scs/linsys/gpu/indirect/private.c:334:33: note: in expansion of macro ‘SCS_CSR2CSC_ALG’
CUSPARSE_INDEX_BASE_ZERO, SCS_CSR2CSC_ALG, &new_buffer_size);
^~~~~~~~~~~~~~~
scs/linsys/gpu/indirect/private.c:344:3: warning: implicit declaration of function ‘cusparseCsr2cscEx2’; did you mean ‘cusparseCsr2cscEx’? [-Wimplicit-function-declaration]
cusparseCsr2cscEx2(p->cusparse_handle, A->n, A->m, A->p[A->n], Ag->x, Ag->p,
^~~~~~~~~~~~~~~~~~
cusparseCsr2cscEx
scs/src/rw.c: In function ‘_scs_read_data’:
scs/src/rw.c:237:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(file_int_sz), sizeof(uint32_t), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:238:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(file_float_sz), sizeof(uint32_t), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:254:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(file_version_sz), sizeof(uint32_t), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:255:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(file_version, 1, file_version_sz, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c: In function ‘read_scs_cone’:
scs/src/rw.c:90:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(k->bl, sizeof(scs_float), MAX(k->bsize - 1, 0), fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:91:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(k->bu, sizeof(scs_float), MAX(k->bsize - 1, 0), fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:108:5: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(k->p, sizeof(scs_float), k->psize, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c: In function ‘read_scs_data’:
scs/src/rw.c:197:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(d->b, sizeof(scs_float), d->m, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:198:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(d->c, sizeof(scs_float), d->n, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c: In function ‘read_amatrix’:
scs/src/rw.c:170:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(A->x, sizeof(scs_float), Anz, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c: In function ‘read_scs_stgs’:
scs/src/rw.c:136:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(s->scale), sizeof(scs_float), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:137:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(s->rho_x), sizeof(scs_float), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:139:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(s->eps_abs), sizeof(scs_float), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:140:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(s->eps_rel), sizeof(scs_float), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:141:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(s->eps_infeas), sizeof(scs_float), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scs/src/rw.c:142:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&(s->alpha), sizeof(scs_float), 1, fin);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: Command "gcc -pthread -B /home/ubuntu/anaconda3/envs/test2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYTHON -DCTRLC=1 -DGPU_TRANSPOSE_MAT=1 -DPY_GPU -DINDIRECT=1 -Iscs/include -Iscs/linsys -I/usr/local/cuda/include -Iscs/linsys/gpu/ -Iscs/linsys/gpu/indirect -I/home/ubuntu/anaconda3/envs/test2/lib/python3.7/site-packages/numpy/core/include -I/home/ubuntu/anaconda3/envs/test2/include/python3.7m -c scs/linsys/gpu/gpu.c -o build/temp.linux-x86_64-cpython-37/scs/linsys/gpu/gpu.o -O3" failed with exit status 1
The text was updated successfully, but these errors were encountered: