Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Null pointer in CUDA backend when using polish with no active set #463

@imciner2

Description

@imciner2

When there is no active set present in a problem and the CUDA backend tries to perform the polishing step, there is a NULL pointer error thrown by CUDA:

Filters: test_no_active_set
-----------------------------------------------------------------
           OSQP v0.0.0  -  Operator Splitting QP Solver
              (c) Bartolomeo Stellato,  Goran Banjac
        University of Oxford  -  Stanford University 2021
-----------------------------------------------------------------
problem:  variables n = 2, constraints m = 3
          nnz(P) + nnz(A) = 6
settings: algebra = CUDA,
          linear system solver = CUDA Preconditioned Conjugate Gradient,
          eps_abs = 1.0e-05, eps_rel = 1.0e-05,
          eps_prim_inf = 1.0e-04, eps_dual_inf = 1.0e-04,
          rho = 1.00e-01 (adaptive),
          sigma = 1.00e-06, alpha = 1.60, max_iter = 4000
          check_termination: on (interval 5),
          time_limit: 1.00e+10 sec,
          scaling: on, scaled_termination: off
          warm starting: on, polishing: off, 
iter   objective    prim res   dual res   rho        time
   1   0.0000e+00   0.00e+00   0.00e+00   1.00e-01   8.10e-01s
   5   0.0000e+00   0.00e+00   0.00e+00   1.00e-01   8.11e-01s

status:               solved
number of iterations: 5
optimal objective:    0.0000
run time:             8.11e-01s
optimal rho estimate: 1.00e-06

-----------------------------------------------------------------
           OSQP v0.0.0  -  Operator Splitting QP Solver
              (c) Bartolomeo Stellato,  Goran Banjac
        University of Oxford  -  Stanford University 2021
-----------------------------------------------------------------
problem:  variables n = 2, constraints m = 3
          nnz(P) + nnz(A) = 6
settings: algebra = CUDA,
          linear system solver = CUDA Preconditioned Conjugate Gradient,
          eps_abs = 1.0e-05, eps_rel = 1.0e-05,
          eps_prim_inf = 1.0e-04, eps_dual_inf = 1.0e-04,
          rho = 1.00e-01 (adaptive),
          sigma = 1.00e-06, alpha = 1.60, max_iter = 4000
          check_termination: on (interval 5),
          time_limit: 1.00e+10 sec,
          scaling: on, scaled_termination: off
          warm starting: on, polishing: on, 
iter   objective    prim res   dual res   rho        time
   1   0.0000e+00   0.00e+00   0.00e+00   1.00e-01   5.73e-02s
   5   0.0000e+00   0.00e+00   0.00e+00   1.00e-01   5.80e-02s
 ** On entry to cusparseSpMV() parameter number 7 (vecY) had an illegal value: NULL pointer

CUDA error at /home/b63738im/dev/optimization/osqp/c_code/algebra/cuda/src/cuda_lin_alg.cu:946 code=3(CUSPARSE_STATUS_INVALID_VALUE) "cusparseSpMV( CUDA_handle->cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &alpha, A->SpMatDescr, vecx, &beta, vecy, CUDA_FLOAT, CUSPARSE_SPMV_ALG_DEFAULT, A->SpMatBuffer)" 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions