Skip to content

HiPDLP: use primal and dual feasibility tolerances in termination test - #3717

Open
haman80 wants to merge 1 commit into
ERGO-Code:latestfrom
haman80:hipdlp-separate-tolerances
Open

haman80 wants to merge 1 commit into
ERGO-Code:latestfrom
haman80:hipdlp-separate-tolerances

Conversation

@haman80

@haman80 haman80 commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Description

HiPDLP used pdlp_optimality_tolerance for its primal, dual and gap termination tests, so primal_feasibility_tolerance and dual_feasibility_tolerance had no effect on it, although HiGHS's KKT check uses them. As cuPDLP-C does, it now uses them for the primal and dual tests, keeping pdlp_optimality_tolerance for the gap; kkt_tolerance still overrides all three. There's no change with default options, since all three default to 1e-7. I also added a new test hi-pdlp-feasibility-tolerances which fails without this change and passes with it.

Checklist

  • I have read the contributing guidelines
  • This PR targets the latest branch
  • Tests are passing
  • Documentation was updated where relevant
  • This PR is not primarily AI-generated (per the AI contributions policy in CONTRIBUTING.md)

HiPDLP used pdlp_optimality_tolerance for its primal, dual and gap
termination tests, so primal_feasibility_tolerance and
dual_feasibility_tolerance had no effect on it, although HiGHS's KKT
check of the solution uses them. As for cuPDLP-C, use them for the
primal and dual tests, and pdlp_optimality_tolerance for the gap;
kkt_tolerance still overrides all three.

No change with default options, since all three default to 1e-7.

Add a test that tightening the feasibility tolerances makes HiPDLP
and cuPDLP-C iterate for longer.
@haman80
haman80 requested a review from jajhall November 17, 2026 15:07
@haman80 haman80 self-assigned this Nov 17, 2026
@codecov

codecov Bot commented Nov 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.99%. Comparing base (44e6a9d) to head (7e06634).
⚠️ Report is 38 commits behind head on latest.

Files with missing lines Patch % Lines
highs/pdlp/hipdlp/pdhg.cc 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3717      +/-   ##
==========================================
+ Coverage   75.96%   75.99%   +0.03%     
==========================================
  Files         461      461              
  Lines      114730   114892     +162     
  Branches    17977    18001      +24     
==========================================
+ Hits        87155    87314     +159     
- Misses      27289    27292       +3     
  Partials      286      286              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jajhall jajhall left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to align HiPDLP with the other LP solvers in this way. Perhaps more than with the other solvers, if folk set crazy values for these tolerances the performance of HiPDLP might be compromised, but we can add a warning and then it's on the users.

I've discussed this with @Yanyu000

@jajhall
jajhall requested a review from Yanyu000 November 17, 2026 17:52

This branch has not been deployed

No deployments
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.

2 participants