Skip to content

Speed up GOC3 smoke test in CI#48

Merged
michel2323 merged 6 commits into
mainfrom
ms/ci-goc3-runtime
Jun 24, 2026
Merged

Speed up GOC3 smoke test in CI#48
michel2323 merged 6 commits into
mainfrom
ms/ci-goc3-runtime

Conversation

@michel2323

Copy link
Copy Markdown
Contributor

Problem

The GOC3 testset builds and solves a ~140k-variable problem (the C3E4N00073D1_scenario_303 case). On CPU, the UMFPACK factorization dominates: a single solve takes ~390s (example run).

Two things made this worse than necessary:

  1. It ran once per CONFIG — i.e. 4x on CPU (Float64/Float32 × nothing/CPU()) + 2x on GPU. In exasolve, both nothing and CPU() use UMFPACK, so the same ~390s CPU solve repeated 4 times (~1560s of CI).
  2. It asserts nothing on the resultsc_tests has no @tests; it's a build-and-step smoke check. The (T, backend) variants of the same CPU solve added no real coverage, and at max_iter=5 the problem never gets near convergence anyway (descent-direction norm ~1e11).

Change

  • Hoist the GOC3 testset out of the per-CONFIG loop: run it once on CPU (Float64, nothing) and once on GPU (Float64, CUDABackend()) when a GPU is present.
  • Drop max_iter from 5 to 1 in sc_tests — one step still exercises model build + KKT assembly + a factorization, which is all the smoke test checks.

Effect

CPU GOC3 time drops from ~4 × 390s to a single max_iter=1 solve; GPU from 2 solves to 1. The full-size problem and the contingency path are still built and stepped, so no meaningful coverage is lost.

If CI is still too slow afterward, the next lever is goc3_model(...; include_ctg=false) (the contingency constraints are what inflate the case to ~140k vars) — left out here to preserve contingency-path coverage.

The GOC3 testset solves a ~140k-variable problem whose CPU UMFPACK
factorization dominates CI wall time (~390s per solve). It was running
once per CONFIG (4x on CPU + 2x on GPU) and asserts nothing on the
result, so the (T, backend) variants of the same CPU solve added no
coverage.

Run it once on CPU and once on GPU (when available) instead of once per
CONFIG, and drop max_iter from 5 to 1 since one step still exercises
build + KKT assembly + a factorization.

@frapac frapac 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.

LGTM!

@michel2323

Copy link
Copy Markdown
Contributor Author

Removed some more redundancies

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.86%. Comparing base (ad165e4) to head (c2e4300).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage   88.86%   88.86%           
=======================================
  Files           9        9           
  Lines        1275     1275           
=======================================
  Hits         1133     1133           
  Misses        142      142           

☔ 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.

@michel2323

Copy link
Copy Markdown
Contributor Author

Down to 90m from 190m.

@michel2323 michel2323 merged commit 89e36fd into main Jun 24, 2026
5 of 8 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.

2 participants