Skip to content

Fix: MPS reader drops RHS/RANGES/BOUNDS entries without a set name - #105

Merged
ZedongPeng merged 1 commit into
MIT-Lu-Lab:mainfrom
ZedongPeng:fix/mps-optional-set-name
Sep 2, 2026
Merged

Fix: MPS reader drops RHS/RANGES/BOUNDS entries without a set name#105
ZedongPeng merged 1 commit into
MIT-Lu-Lab:mainfrom
ZedongPeng:fix/mps-optional-set-name

Conversation

@ZedongPeng

Copy link
Copy Markdown
Collaborator

Summary

The MPS reader assumed the first field of every RHS / RANGES / BOUNDS line is the set name. That field is optional, and Netlib/CUTEst files such as BLEND, SIERRA, GFRD-PNC and DFL001 omit it. On these files the whole RHS section was
silently dropped, so the solver returned OPTIMAL with objective 0 and zero residuals.

The reader now checks whether the first field already names a known row (or column, for BOUNDS); if so there is no set name to skip.

Test

$ ./build/cupdlpx test/BLEND.SIF test/
---------------------------------------------------------------------------------------
                                    cuPDLPx v0.3.0                                    
                        A GPU-Accelerated First-Order LP Solver                        
               (c) Haihao Lu, Massachusetts Institute of Technology, 2025              
---------------------------------------------------------------------------------------
Problem: 74 rows, 83 columns, 491 nonzeros
Settings:
  iter_limit         : 2147483647
  time_limit         : 3600.00 sec
  eps_opt            : 1.0e-04
  eps_feas           : 1.0e-04
  spmv_backend       : cusparseSpMVOp (auto)

Running presolver (PSLP v0.0.8)...
  status          : REDUCED
  presolve time   : 0.000679 sec
  reduced problem : 58 rows, 63 columns, 394 nonzeros

Preconditioning
  Geometric-mean scaling (12 iterations)
  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 | -2.1e+01   0.0e+00 | 9.2e-01 3.6e+00 2.1e+01 | 3.0e-02 2.3e-01 9.5e-01 
   400 8.3e-03 | -2.4e+01  -1.1e+01 | 4.4e-01 2.1e+00 1.4e+01 | 1.4e-02 1.3e-01 3.8e-01 
   600 1.1e-02 | -2.6e+01  -1.6e+01 | 7.5e-01 1.4e+00 1.0e+01 | 2.5e-02 9.0e-02 2.3e-01 
   800 1.3e-02 | -2.7e+01  -2.4e+01 | 1.1e+00 5.5e-01 2.9e+00 | 3.7e-02 3.6e-02 5.6e-02 
  1000 1.6e-02 | -3.2e+01  -2.8e+01 | 1.0e+00 2.6e-01 4.3e+00 | 3.4e-02 1.7e-02 7.0e-02 
  1200 1.8e-02 | -3.4e+01  -3.0e+01 | 9.7e-01 1.0e-01 3.9e+00 | 3.2e-02 6.5e-03 6.0e-02 
  1400 2.1e-02 | -3.1e+01  -3.0e+01 | 2.8e-01 9.3e-02 9.0e-01 | 9.3e-03 6.1e-03 1.5e-02 
  1600 2.3e-02 | -3.3e+01  -3.1e+01 | 3.3e-01 4.5e-02 2.7e+00 | 1.1e-02 2.9e-03 4.2e-02 
  1800 2.6e-02 | -3.1e+01  -3.1e+01 | 1.5e-02 4.4e-02 1.4e-01 | 5.0e-04 2.9e-03 2.2e-03 
  2000 2.8e-02 | -3.2e+01  -3.1e+01 | 1.3e-01 4.0e-02 1.2e+00 | 4.2e-03 2.6e-03 1.8e-02 
  2200 3.0e-02 | -3.2e+01  -3.1e+01 | 1.5e-01 1.3e-02 9.6e-01 | 5.0e-03 8.4e-04 1.5e-02 
  2400 3.3e-02 | -3.1e+01  -3.1e+01 | 5.7e-02 7.2e-03 7.1e-02 | 1.9e-03 4.7e-04 1.1e-03 
  2600 3.5e-02 | -3.1e+01  -3.1e+01 | 4.8e-02 6.4e-03 3.5e-01 | 1.6e-03 4.2e-04 5.6e-03 
  2800 3.7e-02 | -3.1e+01  -3.1e+01 | 2.4e-02 4.5e-03 7.2e-02 | 8.0e-04 2.9e-04 1.1e-03 
  3000 4.0e-02 | -3.1e+01  -3.1e+01 | 2.3e-02 2.2e-03 9.7e-02 | 7.4e-04 1.4e-04 1.6e-03 
  3200 4.2e-02 | -3.1e+01  -3.1e+01 | 6.8e-03 1.5e-03 5.3e-03 | 2.3e-04 9.9e-05 8.5e-05 
  3400 4.5e-02 | -3.1e+01  -3.1e+01 | 1.4e-02 8.1e-04 9.5e-02 | 4.8e-04 5.3e-05 1.5e-03 
  3600 4.7e-02 | -3.1e+01  -3.1e+01 | 1.1e-02 4.1e-05 8.2e-02 | 3.6e-04 2.7e-06 1.3e-03 
  3800 5.0e-02 | -3.1e+01  -3.1e+01 | 2.6e-04 2.3e-04 7.2e-04 | 8.7e-06 1.5e-05 1.2e-05 
---------------------------------------------------------------------------------------
Solution Summary
  Status                 : OPTIMAL
  Presolve time          : 0.000679 sec
  Precondition time      : 0.003345 sec
  Solve time             : 0.0521 sec
  Iterations             : 3800
  Primal objective       : -30.81058612
  Dual objective         : -30.80986236
  Objective gap          : 1.156e-05
  Primal infeas          : 8.746e-06
  Dual infeas            : 1.498e-05

@ZedongPeng
ZedongPeng merged commit 9408eb7 into MIT-Lu-Lab:main Sep 2, 2026
18 checks passed
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.

1 participant