cvxpy icon indicating copy to clipboard operation
cvxpy copied to clipboard

Improve SCIP solver: Add conccurent solving and warm start

Open tim-x-y-z opened this issue 4 months ago • 4 comments

Summary

  • Added a feature to have "concurrent" solving in SCIP - i.e using multiple cores. This has been available for a bit.
  • Add warm start functionality for SCIP, both like you did for gurobi where we pass any initialised variables values and in the case where we "resolve" the problem.
  • Added tests for those new features

Test plan

  • [x] Added comprehensive test for concurrent solving with both concurrent/ and parallel/ options
  • [x] Verified existing warm start tests still pass
  • [x] Ran linter to ensure code quality
  • [x] Verified syntax correctness of modified files

The changes enable SCIP solver to properly handle concurrent/parallel solving and warm start

tim-x-y-z avatar Sep 17 '25 13:09 tim-x-y-z

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 17 '25 13:09 CLAassistant

I tested it a bit locally and seems to have issues with leaked semaphores sometimes

tim-x-y-z avatar Sep 17 '25 14:09 tim-x-y-z

Benchmarks that have stayed the same:

   before           after         ratio
 [68e99c8b]       [1b916fa8]
      11.9±0s          12.2±0s     1.02  simple_LP_benchmarks.SimpleLPBenchmark.time_compile_problem
      260±0ms          266±0ms     1.02  simple_QP_benchmarks.SimpleQPBenchmark.time_compile_problem
      313±0ms          318±0ms     1.02  slow_pruning_1668_benchmark.SlowPruningBenchmark.time_compile_problem
      5.49±0s          5.57±0s     1.02  svm_l1_regularization.SVMWithL1Regularization.time_compile_problem
      1.89±0s          1.91±0s     1.01  simple_QP_benchmarks.UnconstrainedQP.time_compile_problem
      984±0ms          994±0ms     1.01  simple_LP_benchmarks.SimpleScalarParametrizedLPBenchmark.time_compile_problem
      2.39±0s          2.41±0s     1.01  simple_LP_benchmarks.SimpleFullyParametrizedLPBenchmark.time_compile_problem
      878±0ms          884±0ms     1.01  simple_QP_benchmarks.LeastSquares.time_compile_problem
      597±0ms          601±0ms     1.01  simple_QP_benchmarks.ParametrizedQPBenchmark.time_compile_problem
      14.2±0s          14.1±0s     1.00  finance.CVaRBenchmark.time_compile_problem
      1.15±0s          1.14±0s     0.99  finance.FactorCovarianceModel.time_compile_problem
      1.50±0s          1.49±0s     0.99  matrix_stuffing.ParamConeMatrixStuffing.time_compile_problem
      576±0ms          570±0ms     0.99  semidefinite_programming.SemidefiniteProgramming.time_compile_problem
      5.20±0s          5.13±0s     0.99  optimal_advertising.OptimalAdvertising.time_compile_problem
      23.5±0s          23.1±0s     0.98  sdp_segfault_1132_benchmark.SDPSegfault1132Benchmark.time_compile_problem
      748±0ms          735±0ms     0.98  matrix_stuffing.ConeMatrixStuffingBench.time_compile_problem
      250±0ms          245±0ms     0.98  high_dim_convex_plasticity.ConvexPlasticity.time_compile_problem
      3.37±0s          3.29±0s     0.98  quantum_hilbert_matrix.QuantumHilbertMatrix.time_compile_problem
      4.83±0s          4.72±0s     0.98  huber_regression.HuberRegression.time_compile_problem
      1.17±0s          1.14±0s     0.97  gini_portfolio.Cajas.time_compile_problem
      307±0ms          298±0ms     0.97  matrix_stuffing.ParamSmallMatrixStuffing.time_compile_problem
      1.80±0s          1.74±0s     0.97  tv_inpainting.TvInpainting.time_compile_problem
      251±0ms          243±0ms     0.97  gini_portfolio.Murray.time_compile_problem
     46.8±0ms         45.1±0ms     0.96  matrix_stuffing.SmallMatrixStuffing.time_compile_problem
      370±0ms          347±0ms     0.94  gini_portfolio.Yitzhaki.time_compile_problem

github-actions[bot] avatar Sep 17 '25 15:09 github-actions[bot]

I'll do a review once the tests are fixed!

PTNobel avatar Sep 18 '25 13:09 PTNobel