Skip to content

Add matrix_zero_tol#73

Merged
ZedongPeng merged 3 commits intoMIT-Lu-Lab:mainfrom
ZedongPeng:add_matrix_filter
Jan 30, 2026
Merged

Add matrix_zero_tol#73
ZedongPeng merged 3 commits intoMIT-Lu-Lab:mainfrom
ZedongPeng:add_matrix_filter

Conversation

@ZedongPeng
Copy link
Copy Markdown
Collaborator

Fixes #72

Description

Introduces a new parameter matrix_zero_tol (default 1e-9) to control near-zero entry pruning in the constraint matrix.

Log Example:

---------------------------------------------------------------------------------------
                                    cuPDLPx v0.2.5                                    
                        A GPU-Accelerated First-Order LP Solver                        
               (c) Haihao Lu, Massachusetts Institute of Technology, 2025              
---------------------------------------------------------------------------------------
Dropped 1 near-zero entry (|value| <= 1.0e-09) from the constraint matrix
Problem: 27 rows, 32 columns, 82 nonzeros
Settings:
  iter_limit         : 2147483647
  time_limit         : 3600.00 sec
  eps_opt            : 1.0e-04
  eps_feas           : 1.0e-04

Running presolver (PSLP v0.0.4)...
  status          : REDUCED
  presolve time   : 0.000287 sec
  reduced problem : 21 rows, 28 columns, 71 nonzeros

Preconditioning
  Ruiz scaling (10 iterations)
  Pock-Chambolle scaling (alpha=1.0000)
  Bound-objective scaling
---------------------------------------------------------------------------------------
   runtime     |     objective      |   absolute residuals    |   relative residuals    
  iter   time  |  pr obj    du obj  |  pr res  du res   gap   |  pr res  du res   gap   
---------------------------------------------------------------------------------------
     0 0.0e+00 |  0.0e+00   0.0e+00 | 0.0e+00 0.0e+00 0.0e+00 | 0.0e+00 0.0e+00 0.0e+00 
   200 0.0e+00 | -4.7e+02  -3.6e+01 | 1.6e+00 5.5e-01 4.3e+02 | 5.1e-03 2.2e-02 8.5e-01 
   400 8.9e-03 | -4.6e+02  -4.6e+02 | 1.5e-01 6.7e-03 5.2e+00 | 4.6e-04 2.6e-04 5.6e-03 
   600 1.2e-02 | -4.6e+02  -4.6e+02 | 3.0e-03 6.2e-05 3.0e-02 | 9.7e-06 2.4e-06 3.2e-05 
---------------------------------------------------------------------------------------
Solution Summary
  Status                 : OPTIMAL
  Presolve time          : 0.000287 sec
  Precondition time      : 0.002035 sec
  Solve time             : 0.0156 sec
  Iterations             : 600
  Primal objective       : -464.7655834
  Dual objective         : -464.7353711
  Objective gap          : 3.247e-05
  Primal infeas          : 9.665e-06
  Dual infeas            : 2.445e-06

@ZedongPeng
Copy link
Copy Markdown
Collaborator Author

Hi @LucasBoTang . Should we remove the zero_tolerance in matrix_desc_t?

double zero_tolerance;

@LucasBoTang
Copy link
Copy Markdown
Collaborator

Hi @ZedongPeng, Deleting zero_tolerance in matrix_desc_t is OK with me and makes code cleaner. The only risk I see is nnz getting too large and causing memory issues, but this trade-off is acceptable.

@ZedongPeng ZedongPeng marked this pull request as draft January 29, 2026 00:34
@LucasBoTang LucasBoTang marked this pull request as ready for review January 29, 2026 15:22
@ZedongPeng ZedongPeng merged commit 9709dfe into MIT-Lu-Lab:main Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Presolve error and small values

2 participants