-
Notifications
You must be signed in to change notification settings - Fork 104
Main merge release/25.12 5 #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Main merge release/25.12 5 #715
Conversation
## Summary by CodeRabbit ## Release Notes * **Performance** * Optimized branch-and-bound algorithm with improved search termination conditions * **Improvements** * Enhanced concurrency control mechanisms across solver components * Improved logger initialization and lifecycle management for better resource handling <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> Authors: - Alice Boucher (https://github.com/aliceb-nv) Approvers: - Nicolas Blin (https://github.com/Kh4ster) URL: NVIDIA#691
📝 WalkthroughWalkthroughThis pull request makes concurrency improvements by replacing volatile semantics with atomic operations across multiple solver components, refactors logger initialization with guard-based lifecycle management, adds a pre-commit hook for alpha spec verification, introduces an early-exit optimization in the branch-and-bound algorithm, and simplifies rapids-logger dependency constraints. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
cpp/src/dual_simplex/branch_and_bound.cpp (1)
1156-1157: Consider making the node limit configurable.The hardcoded limit of 1000 nodes per diving subtree is a reasonable heuristic for early exit, but consider exposing this as a configurable parameter (e.g.,
settings_.diving_node_limit) for performance tuning on different problem types.cpp/src/utilities/logger.cpp (1)
149-158: Consider logging when reusing existing configuration with different parameters.When an
init_logger_tis constructed while another is already active, it silently reuses the existing configuration even iflog_fileorlog_to_consolediffer. This may be intentional (first-wins semantics), but could cause confusion during debugging.Consider adding a debug log or assertion when the requested configuration differs from the active one:
auto existing_guard = g_active_guard.lock(); if (existing_guard) { // Reuse existing configuration, just hold a reference to keep it alive + // Note: log_file and log_to_console parameters are ignored when reusing guard_ = existing_guard; return; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (14)
.pre-commit-config.yaml(2 hunks)cpp/include/cuopt/linear_programming/pdlp/solver_settings.hpp(1 hunks)cpp/src/dual_simplex/branch_and_bound.cpp(3 hunks)cpp/src/dual_simplex/branch_and_bound.hpp(2 hunks)cpp/src/dual_simplex/simplex_solver_settings.hpp(1 hunks)cpp/src/linear_programming/solve.cu(1 hunks)cpp/src/mip/diversity/diversity_manager.cuh(1 hunks)cpp/src/mip/relaxed_lp/relaxed_lp.cuh(1 hunks)cpp/src/utilities/logger.cpp(2 hunks)cpp/src/utilities/logger.hpp(1 hunks)dependencies.yaml(1 hunks)python/cuopt/cuopt/linear_programming/pyproject.toml(3 hunks)python/cuopt/pyproject.toml(1 hunks)python/libcuopt/pyproject.toml(2 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{cu,cuh,cpp,hpp,h}
📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
**/*.{cu,cuh,cpp,hpp,h}: Track GPU device memory allocations and deallocations to prevent memory leaks; ensure cudaMalloc/cudaFree balance and cleanup of streams/events
Validate algorithm correctness in optimization logic: simplex pivots, branch-and-bound decisions, routing heuristics, and constraint/objective handling must produce correct results
Check numerical stability: prevent overflow/underflow, precision loss, division by zero/near-zero, and use epsilon comparisons for floating-point equality checks
Validate correct initialization of variable bounds, constraint coefficients, and algorithm state before solving; ensure reset when transitioning between algorithm phases (presolve, simplex, diving, crossover)
Ensure variables and constraints are accessed from the correct problem context (original vs presolve vs folded vs postsolve); verify index mapping consistency across problem transformations
For concurrent CUDA operations (barriers, async operations), explicitly create and manage dedicated streams instead of reusing the default stream; document stream lifecycle
Eliminate unnecessary host-device synchronization (cudaDeviceSynchronize) in hot paths that blocks GPU pipeline; use streams and events for async execution
Assess algorithmic complexity for large-scale problems (millions of variables/constraints); ensure O(n log n) or better complexity, not O(n²) or worse
Verify correct problem size checks before expensive GPU/CPU operations; prevent resource exhaustion on oversized problems
Identify assertions with overly strict numerical tolerances that fail on legitimate degenerate/edge cases (near-zero pivots, singular matrices, empty problems)
Ensure race conditions are absent in multi-GPU code and multi-threaded server implementations; verify proper synchronization of shared state
Refactor code duplication in solver components (3+ occurrences) into shared utilities; for GPU kernels, use templated device functions to avoid duplication
Check that hard-coded GPU de...
Files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/include/cuopt/linear_programming/pdlp/solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/mip/diversity/diversity_manager.cuhcpp/src/utilities/logger.hppcpp/src/dual_simplex/branch_and_bound.cppcpp/src/mip/relaxed_lp/relaxed_lp.cuhcpp/src/dual_simplex/branch_and_bound.hppcpp/src/utilities/logger.cpp
**/*.{h,hpp,py}
📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
Verify C API does not break ABI stability (no struct layout changes, field reordering); maintain backward compatibility in Python and server APIs with deprecation warnings
Files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/include/cuopt/linear_programming/pdlp/solver_settings.hppcpp/src/utilities/logger.hppcpp/src/dual_simplex/branch_and_bound.hpp
**/*.{cpp,hpp,h}
📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
**/*.{cpp,hpp,h}: Check for unclosed file handles when reading MPS/QPS problem files; ensure RAII patterns or proper cleanup in exception paths
Validate input sanitization to prevent buffer overflows and resource exhaustion attacks; avoid unsafe deserialization of problem files
Prevent thread-unsafe use of global and static variables; use proper mutex/synchronization in server code accessing shared solver state
Files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/include/cuopt/linear_programming/pdlp/solver_settings.hppcpp/src/utilities/logger.hppcpp/src/dual_simplex/branch_and_bound.cppcpp/src/dual_simplex/branch_and_bound.hppcpp/src/utilities/logger.cpp
**/*.{cu,cpp,hpp,h}
📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
Avoid inappropriate use of exceptions in performance-critical GPU operation paths; prefer error codes or CUDA error checking for latency-sensitive code
Files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/include/cuopt/linear_programming/pdlp/solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/utilities/logger.hppcpp/src/dual_simplex/branch_and_bound.cppcpp/src/dual_simplex/branch_and_bound.hppcpp/src/utilities/logger.cpp
cpp/include/cuopt/**/*
⚙️ CodeRabbit configuration file
cpp/include/cuopt/**/*: For public header files (C++ API):
- Check if new public functions/classes have documentation comments (Doxygen format)
- Flag API changes that may need corresponding docs/ updates
- Verify parameter descriptions match actual types/behavior
- Suggest documenting thread-safety, GPU requirements, and numerical behavior
- For breaking changes, recommend updating docs and migration guides
Files:
cpp/include/cuopt/linear_programming/pdlp/solver_settings.hpp
**/*.{cu,cuh}
📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
**/*.{cu,cuh}: Every CUDA kernel launch and memory operation must have error checking with CUDA_CHECK or equivalent verification
Avoid reinventing functionality already available in Thrust, CCCL, or RMM libraries; prefer standard library utilities over custom implementations
Files:
cpp/src/linear_programming/solve.cucpp/src/mip/diversity/diversity_manager.cuhcpp/src/mip/relaxed_lp/relaxed_lp.cuh
**/*.cu
📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
**/*.cu: Verify race conditions and correctness of GPU kernel shared memory, atomics, and warp-level operations
Detect inefficient GPU kernel launches with low occupancy or poor memory access patterns; optimize for coalesced memory access and minimize warp divergence in hot paths
Files:
cpp/src/linear_programming/solve.cu
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Reduce tight coupling between solver components (presolve, simplex, basis, barrier); increase modularity and reusability of optimization algorithms
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cpp,hpp,h} : Prevent thread-unsafe use of global and static variables; use proper mutex/synchronization in server code accessing shared solver state
Applied to files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/include/cuopt/linear_programming/pdlp/solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/mip/diversity/diversity_manager.cuhcpp/src/dual_simplex/branch_and_bound.hpp
📚 Learning: 2025-12-04T20:09:09.264Z
Learnt from: chris-maes
Repo: NVIDIA/cuopt PR: 602
File: cpp/src/linear_programming/solve.cu:732-742
Timestamp: 2025-12-04T20:09:09.264Z
Learning: In cpp/src/linear_programming/solve.cu, the barrier solver does not currently return INFEASIBLE or UNBOUNDED status. It only returns OPTIMAL, TIME_LIMIT, NUMERICAL_ISSUES, or CONCURRENT_LIMIT.
Applied to files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/mip/relaxed_lp/relaxed_lp.cuhcpp/src/dual_simplex/branch_and_bound.hpp
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Reduce tight coupling between solver components (presolve, simplex, basis, barrier); increase modularity and reusability of optimization algorithms
Applied to files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/src/dual_simplex/branch_and_bound.cpp
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Validate algorithm correctness in optimization logic: simplex pivots, branch-and-bound decisions, routing heuristics, and constraint/objective handling must produce correct results
Applied to files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/dual_simplex/branch_and_bound.cppcpp/src/mip/relaxed_lp/relaxed_lp.cuhcpp/src/dual_simplex/branch_and_bound.hpp
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Validate correct initialization of variable bounds, constraint coefficients, and algorithm state before solving; ensure reset when transitioning between algorithm phases (presolve, simplex, diving, crossover)
Applied to files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/dual_simplex/branch_and_bound.cppcpp/src/mip/relaxed_lp/relaxed_lp.cuhcpp/src/dual_simplex/branch_and_bound.hpp
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Refactor code duplication in solver components (3+ occurrences) into shared utilities; for GPU kernels, use templated device functions to avoid duplication
Applied to files:
cpp/src/dual_simplex/simplex_solver_settings.hppcpp/src/linear_programming/solve.cu
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Ensure race conditions are absent in multi-GPU code and multi-threaded server implementations; verify proper synchronization of shared state
Applied to files:
cpp/include/cuopt/linear_programming/pdlp/solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/mip/diversity/diversity_manager.cuh
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Ensure variables and constraints are accessed from the correct problem context (original vs presolve vs folded vs postsolve); verify index mapping consistency across problem transformations
Applied to files:
cpp/include/cuopt/linear_programming/pdlp/solver_settings.hppcpp/src/linear_programming/solve.cucpp/src/dual_simplex/branch_and_bound.cppcpp/src/mip/relaxed_lp/relaxed_lp.cuhcpp/src/dual_simplex/branch_and_bound.hpp
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.cu : Verify race conditions and correctness of GPU kernel shared memory, atomics, and warp-level operations
Applied to files:
cpp/src/linear_programming/solve.cu
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Check that hard-coded GPU device IDs and resource limits are made configurable; abstract multi-backend support for different CUDA versions
Applied to files:
cpp/src/linear_programming/solve.cu
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*.{cu,cuh,cpp,hpp,h} : Verify correct problem size checks before expensive GPU/CPU operations; prevent resource exhaustion on oversized problems
Applied to files:
cpp/src/linear_programming/solve.cu
📚 Learning: 2025-11-25T10:20:49.822Z
Learnt from: CR
Repo: NVIDIA/cuopt PR: 0
File: .github/.coderabbit_review_guide.md:0-0
Timestamp: 2025-11-25T10:20:49.822Z
Learning: Applies to **/*test*.{cpp,cu,py} : Add tests for algorithm phase transitions: verify correct initialization of bounds and state when transitioning from presolve to simplex to diving to crossover
Applied to files:
cpp/src/dual_simplex/branch_and_bound.cpp
🧬 Code graph analysis (1)
cpp/src/utilities/logger.cpp (1)
cpp/src/utilities/logger.hpp (2)
reset_default_logger(34-34)init_logger_t(42-42)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.11, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.13, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.11, amd64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.13, amd64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.12, amd64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.12, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.10, arm64, rockylinux8
- GitHub Check: wheel-build-cuopt-mps-parser / 13.0.2, 3.10, amd64, rockylinux8
- GitHub Check: checks / check-style
🔇 Additional comments (20)
python/cuopt/pyproject.toml (1)
51-51: LGTM - Simplified version constraint.Removing the redundant
>=0.0.0a0prerelease lower-bound is appropriate since==0.2.*already constrains to the 0.2.x series.cpp/src/dual_simplex/branch_and_bound.cpp (2)
1138-1138: LGTM - Local counter for early-exit optimization.The
nodes_exploredcounter is correctly scoped to each diving subtree iteration, resetting when a newstart_nodeis processed.
1171-1172: LGTM - Correct increment placement.The counter is incremented after
solve_nodecompletes, accurately tracking the number of nodes actually explored.cpp/src/dual_simplex/simplex_solver_settings.hpp (1)
148-149: LGTM - Correct migration from volatile to std::atomic.Replacing
volatile int*withstd::atomic<int>*provides proper memory ordering guarantees for inter-thread communication. Thevolatilekeyword does not provide atomicity and is unsuitable for synchronization between threads.dependencies.yaml (1)
563-563: LGTM - Simplified version constraint.Removing the redundant
>=0.0.0a0prerelease lower-bound fromrapids-loggeris appropriate. The==0.2.*constraint already pins to the 0.2.x series effectively.cpp/src/linear_programming/solve.cu (1)
309-309: LGTM - Correct atomic initialization for concurrent termination signaling.The global
concurrent_haltis correctly changed tostd::atomic<int>with explicit zero-initialization. All accesses throughout the codebase—reads via*settings.concurrent_halt == 1and writes via*settings.concurrent_halt = 1;—properly invoke atomic operators to maintain sequentially consistent memory ordering. This replaces the unsafevolatilequalifier with proper synchronization semantics for the concurrent termination signal shared between PDLP and Dual Simplex/Barrier/Crossover threads.cpp/src/dual_simplex/branch_and_bound.hpp (2)
116-117: LGTM - Correct atomic usage for concurrent halt signaling.The migration from
volatile inttostd::atomic<int>is the right approach. The direct assignment on line 117 uses the defaultstd::memory_order_seq_cst, which provides strong ordering guarantees appropriate for halt signaling across threads.
173-173: Consistent with the codebase-wide atomic migration.The member variable correctly uses value initialization with
{0}, which is the proper way to initializestd::atomic<int>.cpp/src/mip/diversity/diversity_manager.cuh (1)
97-98: LGTM - Proper atomic signaling for PDLP concurrency control.The change from
volatile inttostd::atomic<int>correctly provides the necessary synchronization guarantees for signaling the PDLP solver to stop. The initialization with{0}is appropriate.python/libcuopt/pyproject.toml (2)
43-44: Dependency spec simplified for release mode.Removing the
>=0.0.0a0constraint simplifies the version spec and restricts to stable 0.2.x releases. This aligns with the pre-commit hook addition forverify-alpha-specin release mode.
88-89: Build dependency spec consistent with runtime dependency.The same simplification applied to build requirements ensures consistency.
.pre-commit-config.yaml (2)
59-63: New pre-commit hook for alpha spec verification.The
verify-alpha-spechook with--mode releasewill enforce that dependencies don't include alpha/pre-release version constraints in release builds. The--fixflag enables automatic remediation.
91-92: YAML formatting correction.The
default_language_versionis now properly formatted as a mapping rather than a list item.python/cuopt/cuopt/linear_programming/pyproject.toml (3)
21-24: Consistent dependency spec simplification.The rapids-logger constraint is simplified across all dependency sections in this file, aligning with the release mode configuration enforced by the new
verify-alpha-specpre-commit hook.
42-43: Test dependencies aligned.
86-87: Build requirements aligned.cpp/src/mip/relaxed_lp/relaxed_lp.cuh (1)
19-28: LGTM - Atomic pointer type for concurrent halt control.The change from
volatile int*tostd::atomic<int>*correctly aligns with the codebase-wide migration to atomic semantics. The pointer beingnullptrby default is appropriate since not all callers may need concurrent halt capability.cpp/src/utilities/logger.hpp (1)
36-43: Ref-counted logger initialization pattern.The use of
std::shared_ptr<void>provides type-erased ref-counting for the logger configuration guard. This enables multipleinit_logger_tinstances to share the same logger configuration, with automatic reset when the last instance is destroyed.cpp/src/utilities/logger.cpp (2)
140-147: Guard-based lifecycle management for logger configuration.The
logger_config_guardwith weak reference tracking enables proper ref-counting. The mutex ensures thread-safe access to the global guard state.
185-189: LGTM - Proper guard creation and weak reference storage.The guard is correctly created as a
shared_ptr, stored in both the weak reference (for future lookups) and the member variable (for ownership). When allinit_logger_tinstances are destroyed, the guard's destructor will reset the logger.
| bool inside_mip{false}; | ||
| // For concurrent termination | ||
| volatile int* concurrent_halt{nullptr}; | ||
| std::atomic<int>* concurrent_halt{nullptr}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for all usages of concurrent_halt in the repository
echo "=== Searching for concurrent_halt usages ==="
rg -n 'concurrent_halt' --type=cpp --type=h --type=hpp 2>/dev/null | head -50
echo ""
echo "=== Check context in solver_settings.hpp ==="
rg -B 5 -A 5 'concurrent_halt' cpp/include/cuopt/linear_programming/pdlp/solver_settings.hpp
echo ""
echo "=== Check if there are other volatile declarations ==="
rg 'volatile.*\*' cpp/include/cuopt/linear_programming/pdlp/solver_settings.hppRepository: NVIDIA/cuopt
Length of output: 570
🏁 Script executed:
#!/bin/bash
# Check the struct/class definition context
echo "=== Full struct context around concurrent_halt ==="
cat -n cpp/include/cuopt/linear_programming/pdlp/solver_settings.hpp | sed -n '200,230p'Repository: NVIDIA/cuopt
Length of output: 1312
🏁 Script executed:
#!/bin/bash
# Check for documentation/comments about this field
echo "=== Check for doxygen or comments about concurrent_halt ==="
rg -B 10 'concurrent_halt' cpp/include/cuopt/linear_programming/pdlp/solver_settings.hpp | grep -E '(///|/\*|--)'Repository: NVIDIA/cuopt
Length of output: 115
🏁 Script executed:
#!/bin/bash
# Search for actual usages in implementation files
echo "=== Check implementation usages ==="
rg 'concurrent_halt' cpp/src --type=cpp --type=h --type=hpp 2>/dev/null | head -20Repository: NVIDIA/cuopt
Length of output: 91
Add Doxygen documentation for public field concurrent_halt.
The change from volatile int* to std::atomic<int>* is correct for proper inter-thread synchronization. However, as a public API field in this settings struct, it requires documentation per the coding guidelines for public header files. Add a Doxygen comment explaining:
- Purpose: coordination for concurrent solver termination
- Expected usage: users provide a pointer to std::atomic for concurrent halt signaling, or leave as nullptr for single-threaded mode
- Thread-safety guarantees
No existing usages found in the codebase, so the API change poses minimal risk of breaking downstream users.
🤖 Prompt for AI Agents
In cpp/include/cuopt/linear_programming/pdlp/solver_settings.hpp around line
215, the public field std::atomic<int>* concurrent_halt lacks Doxygen
documentation; add a Doxygen comment immediately above the declaration that
states its purpose (coordination for concurrent solver termination), expected
usage (users may provide a pointer to a std::atomic<int> to signal halt across
threads or leave nullptr for single-threaded mode), and the thread-safety
guarantees (safe for concurrent reads/writes via std::atomic, pointer itself
must remain valid for the solver lifetime).
For #693
Summary by CodeRabbit
New Features
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.