Fix: MPS reader drops RHS/RANGES/BOUNDS entries without a set name - #105
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The MPS reader assumed the first field of every
RHS/RANGES/BOUNDSline is the set name. That field is optional, and Netlib/CUTEst files such asBLEND,SIERRA,GFRD-PNCandDFL001omit it. On these files the wholeRHSsection wassilently 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