Speed up GOC3 smoke test in CI#48
Open
michel2323 wants to merge 2 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The GOC3 testset builds and solves a ~140k-variable problem (the
C3E4N00073D1_scenario_303case). On CPU, the UMFPACK factorization dominates: a single solve takes ~390s (example run).Two things made this worse than necessary:
CONFIG— i.e. 4x on CPU (Float64/Float32×nothing/CPU()) + 2x on GPU. Inexasolve, bothnothingandCPU()use UMFPACK, so the same ~390s CPU solve repeated 4 times (~1560s of CI).sc_testshas no@tests; it's a build-and-step smoke check. The(T, backend)variants of the same CPU solve added no real coverage, and atmax_iter=5the problem never gets near convergence anyway (descent-direction norm ~1e11).Change
CONFIGloop: run it once on CPU (Float64, nothing) and once on GPU (Float64, CUDABackend()) when a GPU is present.max_iterfrom 5 to 1 insc_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=1solve; 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.