test(c_api): skip flaky TimeLimitTestFixture MIP case (#1135) - #1136
Conversation
The /2 parametric instance (supportcase22.mps, 15s, dual simplex) intermittently overshoots the 3s tolerance on CPU-thread-constrained CI runners because solve_time includes Papilo presolve and post-B&B serial wind-down, neither bounded by the time_limit setting. Skipping the MIP case via GTEST_SKIP while NVIDIA#1135 is investigated. The LP /0 and /1 cases remain enabled.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughA parameterized test in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp (1)
54-56: Scope the skip to the single flaky parameter, not all MIP paths.Line 54 currently skips any case with
"/mip/"in the path. That’s broader than the PR intent (only/mip/supportcase22.mpswith dual simplex) and could hide future MIP regressions if more params are added.Proposed narrowing
- if (filename.find("/mip/") != std::string::npos) { + const auto& relative_path = std::get<0>(GetParam()); + if (relative_path == "/mip/supportcase22.mps" && method == CUOPT_METHOD_DUAL_SIMPLEX) { GTEST_SKIP() << "Disabled pending NVIDIA/cuopt#1135"; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp` around lines 54 - 56, The current skip checks any path containing "/mip/" via the filename variable and is too broad; change it to only skip the specific flaky case by checking filename for "supportcase22.mps" AND the test parameter that selects the dual-simplex solver/method (e.g., inspect the test's solver/method parameter or option that indicates "dual simplex" or DUAl_SIMPLEX) so only when filename.find("supportcase22.mps") != std::string::npos && method==DUAL_SIMPLEX (or parameter string contains "dual") you call GTEST_SKIP().
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp`:
- Around line 54-56: The current skip checks any path containing "/mip/" via the
filename variable and is too broad; change it to only skip the specific flaky
case by checking filename for "supportcase22.mps" AND the test parameter that
selects the dual-simplex solver/method (e.g., inspect the test's solver/method
parameter or option that indicates "dual simplex" or DUAl_SIMPLEX) so only when
filename.find("supportcase22.mps") != std::string::npos && method==DUAL_SIMPLEX
(or parameter string contains "dual") you call GTEST_SKIP().
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 21773cf7-f9e1-4ab9-920d-f5d4fc3a0fa1
📒 Files selected for processing (1)
cpp/tests/linear_programming/c_api_tests/c_api_tests.cpp
Substring "/mip/" suggested there might be other MIP cases in the fixture; only supportcase22.mps is parametrized.
|
/merge |
Summary
c_api/TimeLimitTestFixture.time_limit/2parametric instance (/mip/supportcase22.mps, 15s,CUOPT_METHOD_DUAL_SIMPLEX) viaGTEST_SKIP()./0and/1remain enabled.Why
The MIP case intermittently overshoots the 3s
excess_allowed_timetolerance on CPU-thread-constrained CI runners.cuOptGetSolveTime()for MIP returnsmip_solution_t::get_total_solve_time(), which is set incpp/src/mip_heuristics/solver.cu:489from a timer started incpp/src/mip_heuristics/solve.cu:306— before Papilo presolve. Sosolve_timeincludes Papilo presolve (OpenMP-parallel) and the post-B&B serial wind-down (branch_and_bound_status_future.get(),compute_feasibility,test_variable_bounds), neither of which is bounded by the user'stime_limitsetting.On a 12-thread-visible CI runner, observed
solve_time = 18.398svs the 18s bar (15s + 3s tolerance). Solver itself respected the limit (Explored 0 nodes in 15.01s).Full investigation and proposed fixes (measure inside the time-limited region only, or per-case tolerances) are in the issue.
Tracking: #1135.
Test plan
clang-format,verify-copyright, etc.)C_API_TESTsucceeds/2is reported as[ SKIPPED ] Disabled pending NVIDIA/cuopt#1135;/0and/1are unchanged in behavior