Skip to content

ci(test): increase xdist workers from 2 to 8#1501

Closed
ramakrishnap-nv wants to merge 7 commits into
mainfrom
ci/pytest-xdist-n8
Closed

ci(test): increase xdist workers from 2 to 8#1501
ramakrishnap-nv wants to merge 7 commits into
mainfrom
ci/pytest-xdist-n8

Conversation

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

Summary

Bumps -n 2-n 8 in both run_cuopt_pytests.sh and run_cuopt_server_pytests.sh, following bdice's suggestion on #1486:

Generally we use -n 6 or -n 8 in most of RAPIDS. The safe maximum depends on the GPU memory usage of your tests, not the number of CPU cores! Try to design it to run safely on a 16GB GPU.

Base infrastructure (pytest-xdist dependency, worker-aware gRPC/server ports) landed in #1486.

What to watch in CI

  • GPU stability on V100 (16GB) — the tightest runner; cudaErrorInvalidDevice or OOM would indicate too much GPU pressure
  • Timing improvement vs -n 2 baseline (~3m 48s cuopt, ~5m 34s server)

🤖 Generated with Claude Code

@copy-pr-bot

copy-pr-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 98a15f1

@ramakrishnap-nv ramakrishnap-nv added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jul 1, 2026
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 8fcd4fe

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

CI Test Summary

3 failed · 28 passed · 0 skipped

wheel-tests-cuopt / 12.9.2, 3.11, amd64, ubuntu22.04, l4, latest-driver, oldest-deps — 10 failed tests
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/neos5-free-bound.mps]
  • tests/linear_programming/test_lp_solver.py::test_heuristics_only
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.PRIZE]
  • tests/linear_programming/test_lp_solver.py::test_bound_in_maximization
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.BREAKS]
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.VRP]
  • tests/routing/test_re_routing.py::test_re_routing
  • tests/routing/test_solver_settings.py::test_dump_results
  • tests/routing/test_batch_solve.py::test_batch_solve_varying_sizes
  • tests/routing/test_batch_solve.py
wheel-tests-cuopt / 13.3.0, 3.14, arm64, ubuntu26.04, l4, latest-driver, latest-deps — 13 failed tests
  • tests/linear_programming/test_python_API.py::test_read_write_mps_and_relaxation
  • tests/linear_programming/test_python_API.py::test_problem_update
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/neos5-free-bound.mps]
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.PRIZE]
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.VRP]
  • tests/linear_programming/test_lp_solver.py::test_heuristics_only
  • tests/linear_programming/test_lp_solver.py::test_bound_in_maximization
  • tests/routing/test_initial_solutions.py::test_initial_solutions[TestOption.PDP]
  • tests/routing/test_solver_settings.py::test_solver_settings_getters
  • tests/routing/test_vehicle_properties.py::test_vehicle_max_costs
  • tests/routing/test_vehicle_properties.py::test_vehicle_dependent_service_times
  • tests/routing/test_batch_solve.py
  • tests/routing/test_data_model.py
wheel-tests-cuopt / 13.0.3, 3.12, arm64, rockylinux8, l4, latest-driver, latest-deps — 5 failed tests
  • tests/linear_programming/test_lp_solver.py::test_bound_in_maximization
  • tests/linear_programming/test_python_API.py::test_mip_start
  • tests/linear_programming/test_cpu_only_execution.py::TestCuoptCliCPUOnly::test_cli_mip_remote
  • tests/linear_programming/test_incumbent_callbacks.py::test_incumbent_get_set_callback[/mip/neos5-free-bound.mps]
  • tests/linear_programming/test_lp_solver.py::test_heuristics_only

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 233d1c5

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 25af2f2

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 3029f52

ramakrishnap-nv and others added 5 commits July 6, 2026 10:07
bdice notes RAPIDS generally uses -n 6 or -n 8; safe max is determined
by GPU memory usage, not CPU cores (target: 16GB GPU). Testing -n 8 to
measure speedup vs stability tradeoff.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
-n 8 produced wrong solver results (Objective nan, Unknown status,
inf bounds) due to GPU memory pressure. Stepping down to -n 6 which
is the lower end of bdice's recommended RAPIDS range.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
…ion)

-n 6 produced same Unknown status / NaN objective failures as -n 8 in
TestCuoptCliCPUOnly remote tests. Trying -n 4 as next step down.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
StreamLogs did a single extra getline after detecting job completion,
which silently dropped any lines flushed between the last EOF poll and
the job-complete marker. With multiple final log lines (e.g. "Optimal
solution found." followed by "Best objective ..."), only the first was
sent to the client, leaving the rest unstreamed.

Replace the single read with a drain loop so all buffered lines are
sent before the job_complete sentinel.

Fixes test_cli_lp_remote / test_cli_mip_remote flakiness under xdist
where increased I/O activity widens the race window.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
stop_log_streaming() calls TryCancel() which races against the server's
final log drain: poll_for_completion() returns as soon as the job is
marked complete, then TryCancel() kills the stream before the server has
finished sending remaining lines (e.g. "Best objective …").

Add drain_log_streaming(): polls log_stream_done_ (set when the thread
exits naturally after receiving the job_complete sentinel) for up to 5s,
then falls back to stop_log_streaming(). Use it on the success path in
solve_lp and solve_mip so all final log lines are received before the
stream is torn down.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test 113de2b

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test ee61fef

-n 6 triggers cudaErrorInvalidDevice on single-GPU runners (L4, A100).
Drop back to -n 4 which avoids device exhaustion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/ok to test c889f62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant