Skip to content

Speed up GOC3 smoke test in CI#48

Open
michel2323 wants to merge 2 commits into
mainfrom
ms/ci-goc3-runtime
Open

Speed up GOC3 smoke test in CI#48
michel2323 wants to merge 2 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!

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