Skip to content

chore(#100): upgrade Clarabel.cpp to v0.11.1 and fix solver template headers#101

Open
zcZhangCheng wants to merge 1 commit into
cvxgrp:masterfrom
zcZhangCheng:update-Clarabel-on-v0.6.8
Open

chore(#100): upgrade Clarabel.cpp to v0.11.1 and fix solver template headers#101
zcZhangCheng wants to merge 1 commit into
cvxgrp:masterfrom
zcZhangCheng:update-Clarabel-on-v0.6.8

Conversation

@zcZhangCheng
Copy link
Copy Markdown

Description

This PR upgrades the Clarabel.cpp submodule to v0.11.1 and updates the solver template headers to ensure compatibility with the new version.

Changes

  • Submodule Update: Upgraded Clarabel.cpp to v0.11.1.
  • Header Fix: Updated cvxpygen/solvers.py to use <Clarabel.h> instead of the deprecated <Clarabel> header.
  • New Example: Added examples/example_Clarabel.py to demonstrate and verify the updated Clarabel solver integration.
  • Metadata: Minor updates to pyproject.toml for consistency.

Context

The current solver templates were pointing to an outdated header format, causing compilation errors with the latest Clarabel releases. This PR resolves those issues.

Testing

Verified by running the newly added example_Clarabel.py with the updated templates.

Comment thread examples/example_Clarabel.py Outdated
sys.stdout.write('\nCVXPYgen\nSolve time: %.3f ms\n' % (1000 * (t1 - t0)))
sys.stdout.write('Primal solution: x = [%.6f, %.6f]\n' % tuple(x.value))
sys.stdout.write('Dual solution: d0 = [%.6f, %.6f]\n' % tuple(problem.constraints[0].dual_value))
sys.stdout.write('Objective function value: %.6f\n' % val)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Right now, we have a main hello world example under examples/main.py and several notebooks with applications. Consider moving this to the tests.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Apologies, you're correct. That was my oversight; this simple validation should not have been submitted.

@maxschaller
Copy link
Copy Markdown
Collaborator

Note: Until the next CVXPY release, you have to install CVXPY from source such that the tests run properly.

@zcZhangCheng zcZhangCheng force-pushed the update-Clarabel-on-v0.6.8 branch from b251568 to a3adfe7 Compare January 4, 2026 10:08
@zcZhangCheng
Copy link
Copy Markdown
Author

Thanks. I noticed that the master branch isn't working, so I've been running some simple validations on tag v0.6.8 instead.
I'll test it as soon as possible.

@maxschaller
Copy link
Copy Markdown
Collaborator

maxschaller commented Jan 27, 2026

@zcZhangCheng please merge master back, for the CI to run correctly.

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