Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
429 commits
Select commit Hold shift + click to select a range
c374f69
fix copyright
aliceb-nv Jan 7, 2026
2ae3d3e
Merge branch 'clang-tsan' into determinism
aliceb-nv Jan 7, 2026
d89c50a
flag to disable gpu heuristics
aliceb-nv Jan 8, 2026
8dd2d08
fix incorrect termination status
nguidotti Jan 8, 2026
1dcee03
replace upper bound lock with atomic
nguidotti Jan 8, 2026
9e2e5c7
improve idling master thread
nguidotti Jan 8, 2026
34f7eaa
added ramp-up-phase
nguidotti Jan 8, 2026
769a3d8
refactoring
nguidotti Jan 8, 2026
c54033c
updating code to match the new parallel bnb
nguidotti Jan 8, 2026
28c61b8
Merge branch 'main' into diving-heuristics
nguidotti Jan 8, 2026
4bcf801
removed command line options
nguidotti Jan 8, 2026
d91369d
fix style
nguidotti Jan 8, 2026
d67f230
BSP b&b progress
aliceb-nv Jan 9, 2026
4ee57f9
fix compilation failure
nguidotti Jan 9, 2026
b99a9c7
separated objective estimate and variable selection
nguidotti Jan 9, 2026
43f8b31
separating objective estimate from variable selection
nguidotti Jan 9, 2026
a36bf03
added log
nguidotti Jan 9, 2026
d4c9d54
Merge branch 'node-queue' into diving-heuristics
nguidotti Jan 9, 2026
b9a14bf
Merge branch 'diving-heuristics' into parallel-bnb-v2
nguidotti Jan 9, 2026
7c5c996
small refactor
nguidotti Jan 9, 2026
5753de8
code cleanup
nguidotti Jan 9, 2026
421cbfd
fix reporting frequency
nguidotti Jan 9, 2026
6faeed0
fix style
nguidotti Jan 9, 2026
d7046e3
added missing stl headers. fix incorrect round-robin.
nguidotti Jan 9, 2026
eb6bc28
initial working impl on small problens
aliceb-nv Jan 9, 2026
d80667c
more instrumentation
aliceb-nv Jan 10, 2026
14441d1
refactor to eliminate enum
nguidotti Jan 12, 2026
8ed172a
keep basis when possible
aliceb-nv Jan 12, 2026
89cc6de
fix race condition in guided diving
nguidotti Jan 12, 2026
525f013
reliability branching from #599
nguidotti Jan 9, 2026
0fa76f1
modfiied reliability branching to reuse basis from node
nguidotti Jan 12, 2026
0926349
replaced mutex with a vector of mutexes
nguidotti Jan 12, 2026
2c069c0
restrict reliability branching to main thread
nguidotti Jan 12, 2026
f043ac9
fixed unintialized pseudocost. added adaptive rule for the number of …
nguidotti Jan 13, 2026
24a3838
re-enable reliability branching
nguidotti Jan 13, 2026
ccca7fe
setting reliable_threshold to 1
nguidotti Jan 13, 2026
2a16ee6
merge and fix nondeterministic node compare
aliceb-nv Jan 14, 2026
ef777c6
more logs, cache cpu clock
aliceb-nv Jan 14, 2026
6dcb062
plunging for deterministic search
aliceb-nv Jan 14, 2026
35e8177
move to work_unit_scheduler to allow for mid-node syncs
aliceb-nv Jan 15, 2026
e06af9f
better debug printouts
aliceb-nv Jan 15, 2026
99e9ec2
improve ins_vector coverage; fix case where instrumeted mem accesses …
aliceb-nv Jan 15, 2026
8fdbff8
fix sync bug on termination
aliceb-nv Jan 15, 2026
b6d7ecc
revert disable heuristics
aliceb-nv Jan 15, 2026
668391e
no presovle when determinsitic
aliceb-nv Jan 15, 2026
3b6d532
restore nondeterminsitc codepath behavior
aliceb-nv Jan 16, 2026
81aaf20
Merge branch 'main' into determinism
aliceb-nv Jan 16, 2026
07cea4d
cleanup work
aliceb-nv Jan 16, 2026
9fb0edd
more cleanup to test for regressions
aliceb-nv Jan 16, 2026
21b5e29
move GPU determinism changes to another PR
aliceb-nv Jan 16, 2026
8ed90ac
restore run_bounds_strengthening=false in DS presolve
aliceb-nv Jan 16, 2026
cdcd101
spring cleaning
aliceb-nv Jan 16, 2026
cd5d073
cleaning
aliceb-nv Jan 16, 2026
14d3911
no bs changes
aliceb-nv Jan 16, 2026
9289be4
memins on
aliceb-nv Jan 16, 2026
c1526b8
fix memins bug
aliceb-nv Jan 16, 2026
a6e18d7
no ins_wrapper for bound strengthening to allow autovectorization (co…
aliceb-nv Jan 18, 2026
ac57402
stripped down ins_wrapper
aliceb-nv Jan 18, 2026
512a960
Revert "stripped down ins_wrapper"
aliceb-nv Jan 18, 2026
fb45144
merge attempt 1, needs cleanup
aliceb-nv Jan 18, 2026
61c1563
initial detemrinistic diving impl
aliceb-nv Jan 18, 2026
bfb6611
separate time limit and work unit parameters
aliceb-nv Jan 18, 2026
2f673e7
fix issue on presolved to optimality instances
aliceb-nv Jan 18, 2026
cfbb99b
restore gpu heurs
aliceb-nv Jan 18, 2026
01747f4
fix BSP b&b getting starved too early
aliceb-nv Jan 19, 2026
e689154
same diving ratio as base solver
aliceb-nv Jan 19, 2026
14eb9a7
cleanup work
aliceb-nv Jan 19, 2026
7755bd7
further cleanup work
aliceb-nv Jan 19, 2026
a63f032
incorporating cpufj into the deterministic framework
aliceb-nv Jan 19, 2026
bc3bfde
fjcpu cleanup
aliceb-nv Jan 20, 2026
50c574e
update terminology
aliceb-nv Jan 20, 2026
2947a23
unify pseudocost computations
aliceb-nv Jan 20, 2026
5f58f6d
parallelized the trial branching
nguidotti Jan 20, 2026
fbc17c9
added debug log
nguidotti Jan 20, 2026
a1eb6b8
solved early termination in CMS750_4. fixed hard coded number of thre…
nguidotti Jan 20, 2026
8c5e9f6
policy system for solve_lp_
aliceb-nv Jan 20, 2026
8116fea
Merge branch 'main' into fix-bugs
nguidotti Jan 20, 2026
c2bab57
Revert policy system to move it to a later PR
aliceb-nv Jan 20, 2026
f16db00
restore fixes
aliceb-nv Jan 20, 2026
2b7859e
log ds features and bounds strenghtening
aliceb-nv Jan 20, 2026
af31388
fix logs
aliceb-nv Jan 20, 2026
f102139
timing stuff
aliceb-nv Jan 20, 2026
5a62393
bump 1
aliceb-nv Jan 20, 2026
fc82a41
bump 2
aliceb-nv Jan 20, 2026
115a0b1
silenced logs from the concurrent mode when running inside MIP. ignor…
nguidotti Jan 21, 2026
d50c064
Merge branch 'main' into fix-bugs
nguidotti Jan 21, 2026
27d0d39
Merge branch 'fix-bugs' into reliability-branching
nguidotti Jan 21, 2026
c47adda
fixed merge errors
nguidotti Jan 21, 2026
261bfc8
add bounds strenghtening predictor (unused yet)
aliceb-nv Jan 21, 2026
c0422ed
fixed crash
nguidotti Jan 21, 2026
a0a1d93
better num thread initialization
nguidotti Jan 21, 2026
9f0fe29
fix compilation
nguidotti Jan 21, 2026
0dcb5ff
Merge branch 'fix-bugs' into reliability-branching
nguidotti Jan 21, 2026
298c68c
moved parameters to simplex_settings. added command line option
nguidotti Jan 21, 2026
8a890fd
handle cli arguments
nguidotti Jan 21, 2026
2c2c515
set additional openmp flags
nguidotti Jan 21, 2026
1aca951
Fix issue with work limits that aren't multiples of the horizon steps
aliceb-nv Jan 21, 2026
e593d36
set the number of tasks for strong branching.
nguidotti Jan 21, 2026
19210f0
propagate solutions to the solver in determinsitic mode
aliceb-nv Jan 21, 2026
92a8705
fix envvar
aliceb-nv Jan 21, 2026
bbc966b
fix some issues with hashes
aliceb-nv Jan 21, 2026
cff46f3
bump1
aliceb-nv Jan 21, 2026
254be07
bump2
aliceb-nv Jan 21, 2026
aa15d8e
added additional information in the logs when solving the root relaxa…
nguidotti Jan 22, 2026
ae98cbd
fix tie-breaking and ins_vector counters not being reset appropriately
aliceb-nv Jan 22, 2026
83e0b37
bump1
aliceb-nv Jan 22, 2026
f6a908d
no CPUFJ
aliceb-nv Jan 22, 2026
5ed3732
bump1
aliceb-nv Jan 22, 2026
ce0586c
Merge branch 'fix-bugs' into reliability-branching
nguidotti Jan 22, 2026
d604cb6
renamed macro
nguidotti Jan 22, 2026
4a5270f
Refactoring, fix incorrect optimality, add tests
aliceb-nv Jan 22, 2026
781dd36
Merge branch 'fix-bugs' into reliability-branching
nguidotti Jan 22, 2026
2ed103c
add work limit as a parameter
aliceb-nv Jan 22, 2026
16dcfa8
Merge branch 'main' into determinism
aliceb-nv Jan 22, 2026
628c22b
changed the number of threads in probing cache
nguidotti Jan 22, 2026
0d2226c
add parameter for MIP seed
aliceb-nv Jan 22, 2026
6956bbc
fix type
nguidotti Jan 22, 2026
409b1ee
restore probing cache
aliceb-nv Jan 22, 2026
addae13
bump1
aliceb-nv Jan 22, 2026
e9a5fac
bump2
aliceb-nv Jan 22, 2026
4f75132
fix compute_hash using the defautl stream and breaking graph capture
aliceb-nv Jan 22, 2026
2fd6859
bump1
aliceb-nv Jan 22, 2026
6bdd587
changed the logs for the root relaxation
nguidotti Jan 23, 2026
6d7007c
Merge branch 'fix-bugs' into reliability-branching
nguidotti Jan 23, 2026
a10ac30
fix concurrent LP solve and probing cache in deterministic mode
aliceb-nv Jan 23, 2026
5000cda
more stats logging
aliceb-nv Jan 23, 2026
fab2ffe
horizon 0.15
aliceb-nv Jan 23, 2026
183e2ce
horizon 0.25
aliceb-nv Jan 23, 2026
24e4192
horizon 0.5
aliceb-nv Jan 23, 2026
48b74c8
horizon step 1.00
aliceb-nv Jan 23, 2026
12f7b87
restore
aliceb-nv Jan 23, 2026
fc1c60a
limited the number of candidates for strong branching. refactoring to…
nguidotti Jan 23, 2026
444b95b
removed try_lock
nguidotti Jan 23, 2026
61c5f77
fix incorrect optimal report
aliceb-nv Jan 23, 2026
a0137d1
Merge branch 'release/26.02' into determinism
aliceb-nv Jan 23, 2026
90dcdc9
removed unused settings
nguidotti Jan 23, 2026
5260b51
adjusted number of workers for rb
nguidotti Jan 23, 2026
87098e3
adjusting number of workers for rb
nguidotti Jan 24, 2026
b66ebae
fix incorrect max tasks
nguidotti Jan 24, 2026
9e8488c
fix pseudocost updates
aliceb-nv Jan 24, 2026
30eb52e
w/ bounds strenght
aliceb-nv Jan 25, 2026
9817131
fix holes in implementation
aliceb-nv Jan 25, 2026
383e69a
no BS
aliceb-nv Jan 25, 2026
585bdf0
no BS typo
aliceb-nv Jan 25, 2026
dcf0542
greater horizon
aliceb-nv Jan 25, 2026
84d0567
removed ramp-up phase
nguidotti Jan 25, 2026
175ffc8
BS back
aliceb-nv Jan 25, 2026
0e89356
with logging
aliceb-nv Jan 25, 2026
15dd371
add numericla restart to diving and lower bound ceiling updates in BSP
aliceb-nv Jan 26, 2026
30a147a
cleanup
aliceb-nv Jan 26, 2026
dc2fd90
Merge branch 'release/26.02' into determinism
aliceb-nv Jan 26, 2026
91c95e2
heap instead of rebuild
aliceb-nv Jan 26, 2026
1fdd13e
fix root relaxation message when the solution is not optimal
nguidotti Jan 26, 2026
5ea1621
cleanup, fix loss of determinism
aliceb-nv Jan 26, 2026
b9960c0
more cleanup
aliceb-nv Jan 26, 2026
6b1bee8
Merge branch 'fix-bugs' into reliability-branching
nguidotti Jan 26, 2026
66f6cfd
increase max_lookahead
nguidotti Jan 26, 2026
2c6e12e
fix determinism test seed
aliceb-nv Jan 26, 2026
be15f63
fix fjcpu bug
aliceb-nv Jan 26, 2026
3b93226
bump
aliceb-nv Jan 26, 2026
9e4b2ee
add comment description
aliceb-nv Jan 26, 2026
1b35ac9
Merge branch 'release/26.02' into determinism
aliceb-nv Jan 26, 2026
deff899
copyright fixes
aliceb-nv Jan 26, 2026
e46eba6
Merge branch 'release/26.02' into reliability-branching
nguidotti Jan 26, 2026
0b0e65b
review comments
aliceb-nv Jan 26, 2026
c5438a4
fix wait_for_producers target
aliceb-nv Jan 26, 2026
31b5285
set the reliable threshold dynamically
nguidotti Jan 26, 2026
433ae0e
no cpufj for bench
aliceb-nv Jan 26, 2026
afd24ad
Merge branch 'release/26.02' into determinism
aliceb-nv Jan 27, 2026
9448dd7
Revert "no cpufj for bench"
aliceb-nv Jan 27, 2026
7bac62d
fixed incorrect threshold formula. fixed time limit violation.
nguidotti Jan 27, 2026
a6e055c
simplified parallel loop
nguidotti Jan 27, 2026
de4389b
added single-threaded mode for rins and submip
nguidotti Jan 27, 2026
799f9f5
more logging for bounds strength
aliceb-nv Jan 27, 2026
eb51080
added missing mutexes
nguidotti Jan 27, 2026
f3567cb
fixed empty vector in shuffle
nguidotti Jan 27, 2026
233933f
reverted some code changes
nguidotti Jan 27, 2026
527754c
replaced with lock_guards
nguidotti Jan 27, 2026
2251b87
fixed crash
nguidotti Jan 27, 2026
7919288
fixed number of threads set to 0
nguidotti Jan 28, 2026
cec6f38
enable reliablity branching by default
nguidotti Jan 28, 2026
6c408f2
fix logging
aliceb-nv Jan 28, 2026
27ee927
set the solve mode based on the number of threads
nguidotti Jan 28, 2026
4d1f684
disable RUNPATH
aliceb-nv Jan 28, 2026
8810401
Revert "fix logging"
aliceb-nv Jan 28, 2026
a811e86
Revert "more logging for bounds strength"
aliceb-nv Jan 28, 2026
b761b22
naive prediction
aliceb-nv Jan 29, 2026
8dfb7c3
scaled mem prediction
aliceb-nv Jan 29, 2026
d550547
no cpufj
aliceb-nv Jan 29, 2026
4d75fb0
Revert "no cpufj"
aliceb-nv Jan 30, 2026
da6dfe0
Revert "disable RUNPATH"
aliceb-nv Jan 30, 2026
25388d8
replace work predictor machinery with mem ops only
aliceb-nv Jan 30, 2026
e88d5ef
remove debug log machinery
aliceb-nv Jan 30, 2026
6202972
Merge branch 'release/26.02' into determinism
aliceb-nv Jan 30, 2026
c91127b
refactoring and simplification work
aliceb-nv Jan 30, 2026
12e095c
switch to openmp for syncs, add infeas test
aliceb-nv Jan 30, 2026
e68941e
minor touchups
aliceb-nv Jan 30, 2026
00158e0
unify update_tree, fix timing issue
aliceb-nv Jan 30, 2026
5f929f4
unify b&b worker struct
aliceb-nv Jan 30, 2026
8c4f417
Revert "unify b&b worker struct"
aliceb-nv Jan 30, 2026
a23d8af
Merge branch 'release/26.02' into determinism
aliceb-nv Feb 2, 2026
f7d0c93
Merge branch 'reliability-branching' into determinism
aliceb-nv Feb 3, 2026
71d1272
replaced locks with atomics
nguidotti Feb 3, 2026
cc14fee
cleanup
aliceb-nv Feb 3, 2026
326037c
Merge branch 'reliability-branching' into determinism
aliceb-nv Feb 3, 2026
70e6c73
cleanup
aliceb-nv Feb 3, 2026
faa4952
fix bsp deadlock on timelimit
aliceb-nv Feb 3, 2026
e23c16c
unify update_tree
aliceb-nv Feb 3, 2026
222cda0
fix pseudocost update
nguidotti Feb 3, 2026
649e295
Merge branch 'release/26.02' into reliability-branching
nguidotti Feb 3, 2026
cf2f577
more cleanup
aliceb-nv Feb 3, 2026
3aab472
Merge branch 'reliability-branching' into determinism
aliceb-nv Feb 3, 2026
ff1aaf4
more cleanup
aliceb-nv Feb 4, 2026
a53b38a
deleted assignment in omp_mutex_t to avoid double destruction.
nguidotti Feb 4, 2026
0826aba
addressing reviewer comments
nguidotti Feb 4, 2026
929e0b5
fix compilation
nguidotti Feb 4, 2026
af718df
update naming
aliceb-nv Feb 4, 2026
36b211b
additional refactoring
nguidotti Feb 4, 2026
5edbfbf
variable renaming
nguidotti Feb 4, 2026
2b9da53
fix compilation
nguidotti Feb 4, 2026
62a058b
coderabbit suggestions
nguidotti Feb 4, 2026
5a54f85
more cleanup
aliceb-nv Feb 4, 2026
0f6df39
fix negative pseudocost
nguidotti Feb 4, 2026
56d5ead
changed initial score
nguidotti Feb 4, 2026
a72c85c
adding more safeguards
nguidotti Feb 4, 2026
0b14897
fix initial value
nguidotti Feb 4, 2026
ebe7aa3
Merge remote-tracking branch 'cuopt/release/26.02' into reliability-b…
nguidotti Feb 5, 2026
d65f258
renaming variables
nguidotti Feb 5, 2026
725363d
split locks in pseudocost
nguidotti Feb 5, 2026
4879d1f
progress
aliceb-nv Feb 5, 2026
46d59b3
fix build
aliceb-nv Feb 5, 2026
d1989cc
fix crash in timtab1 due to double infinite pseudocost
nguidotti Feb 5, 2026
f6d2a94
fix race condition
aliceb-nv Feb 6, 2026
6417074
small tweaks
nguidotti Feb 6, 2026
e5fdae1
Merge branch 'release/26.02' into reliability-branching
nguidotti Feb 6, 2026
9e4b855
Merge branch 'reliability-branching' into determinism
aliceb-nv Feb 6, 2026
d5a7149
Merge branch 'reliability-branching' into determinism
aliceb-nv Feb 6, 2026
91e0168
renamed variable
nguidotti Feb 6, 2026
fd4f5a8
Merge branch 'reliability-branching' into determinism
aliceb-nv Feb 6, 2026
515d17c
fix incorrect lower bounds during the cut passes
nguidotti Feb 6, 2026
d8cde66
cleanup, fix race
aliceb-nv Feb 6, 2026
084072a
Merge branch 'reliability-branching' into determinism
aliceb-nv Feb 6, 2026
1df294b
more cleanup
aliceb-nv Feb 6, 2026
0deb0fd
Merge branch 'release/26.02' into determinism
aliceb-nv Feb 6, 2026
a05d4c2
more cleanup
aliceb-nv Feb 6, 2026
91bb13f
Merge branch 'release/26.02' into determinism
aliceb-nv Feb 6, 2026
6914c8a
bump1
aliceb-nv Feb 6, 2026
ff47875
bump2
aliceb-nv Feb 6, 2026
57129b7
address review comments
aliceb-nv Feb 6, 2026
1332fbd
review comments
aliceb-nv Feb 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 35 additions & 10 deletions benchmarks/linear_programming/cuopt/run_mip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ int run_single_file(std::string file_path,
bool write_log_file,
bool log_to_console,
int reliability_branching,
double time_limit)
double time_limit,
double work_limit,
bool deterministic)
{
const raft::handle_t handle_{};
cuopt::linear_programming::mip_solver_settings_t<int, double> settings;
Expand Down Expand Up @@ -197,14 +199,17 @@ int run_single_file(std::string file_path,
}
}
}
settings.time_limit = time_limit;
settings.heuristics_only = heuristics_only;
settings.num_cpu_threads = num_cpu_threads;
settings.log_to_console = log_to_console;
settings.time_limit = time_limit;
settings.work_limit = work_limit;
settings.heuristics_only = heuristics_only;
settings.num_cpu_threads = num_cpu_threads;
settings.log_to_console = log_to_console;
settings.determinism_mode = deterministic ? CUOPT_MODE_DETERMINISTIC : CUOPT_MODE_OPPORTUNISTIC;
settings.tolerances.relative_tolerance = 1e-12;
settings.tolerances.absolute_tolerance = 1e-6;
settings.presolve = true;
settings.reliability_branching = reliability_branching;
settings.seed = 42;
cuopt::linear_programming::benchmark_info_t benchmark_info;
settings.benchmark_info_ptr = &benchmark_info;
auto start_run_solver = std::chrono::high_resolution_clock::now();
Expand Down Expand Up @@ -258,7 +263,9 @@ void run_single_file_mp(std::string file_path,
bool write_log_file,
bool log_to_console,
int reliability_branching,
double time_limit)
double time_limit,
double work_limit,
bool deterministic)
{
std::cout << "running file " << file_path << " on gpu : " << device << std::endl;
auto memory_resource = make_async();
Expand All @@ -274,7 +281,9 @@ void run_single_file_mp(std::string file_path,
write_log_file,
log_to_console,
reliability_branching,
time_limit);
time_limit,
work_limit,
deterministic);
// this is a bad design to communicate the result but better than adding complexity of IPC or
// pipes
exit(sol_found);
Expand Down Expand Up @@ -344,7 +353,12 @@ int main(int argc, char* argv[])
.default_value(std::string("t"));

program.add_argument("--time-limit")
.help("time limit")
.help("time limit in seconds")
.scan<'g', double>()
.default_value(std::numeric_limits<double>::infinity());

program.add_argument("--work-limit")
.help("work unit limit (for deterministic mode)")
.scan<'g', double>()
.default_value(std::numeric_limits<double>::infinity());

Expand All @@ -362,6 +376,11 @@ int main(int argc, char* argv[])
.scan<'i', int>()
.default_value(-1);

program.add_argument("-d", "--determinism")
.help("enable deterministic mode")
.default_value(false)
.implicit_value(true);

// Parse arguments
try {
program.parse_args(argc, argv);
Expand All @@ -376,6 +395,7 @@ int main(int argc, char* argv[])
std::string run_dir_arg = program.get<std::string>("--run-dir");
bool run_dir = run_dir_arg[0] == 't';
double time_limit = program.get<double>("--time-limit");
double work_limit = program.get<double>("--work-limit");

bool run_selected = program.get<std::string>("--run-selected")[0] == 't';
int n_gpus = program.get<int>("--n-gpus");
Expand All @@ -391,6 +411,7 @@ int main(int argc, char* argv[])
double memory_limit = program.get<double>("--memory-limit");
bool track_allocations = program.get<std::string>("--track-allocations")[0] == 't';
int reliability_branching = program.get<int>("--reliability-branching");
bool deterministic = program.get<bool>("--determinism");

if (num_cpu_threads < 0) { num_cpu_threads = omp_get_max_threads() / n_gpus; }

Expand Down Expand Up @@ -479,7 +500,9 @@ int main(int argc, char* argv[])
write_log_file,
log_to_console,
reliability_branching,
time_limit);
time_limit,
work_limit,
deterministic);
} else if (sys_pid < 0) {
std::cerr << "Fork failed!" << std::endl;
exit(1);
Expand Down Expand Up @@ -520,7 +543,9 @@ int main(int argc, char* argv[])
write_log_file,
log_to_console,
reliability_branching,
time_limit);
time_limit,
work_limit,
deterministic);
}

return 0;
Expand Down
8 changes: 8 additions & 0 deletions cpp/include/cuopt/linear_programming/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define CUOPT_DUAL_INFEASIBLE_TOLERANCE "dual_infeasible_tolerance"
#define CUOPT_ITERATION_LIMIT "iteration_limit"
#define CUOPT_TIME_LIMIT "time_limit"
#define CUOPT_WORK_LIMIT "work_limit"
#define CUOPT_PDLP_SOLVER_MODE "pdlp_solver_mode"
#define CUOPT_METHOD "method"
#define CUOPT_PER_CONSTRAINT_RESIDUAL "per_constraint_residual"
Expand All @@ -49,6 +50,7 @@
#define CUOPT_CUDSS_DETERMINISTIC "cudss_deterministic"
#define CUOPT_PRESOLVE "presolve"
#define CUOPT_DUAL_POSTSOLVE "dual_postsolve"
#define CUOPT_MIP_DETERMINISM_MODE "mip_determinism_mode"
#define CUOPT_MIP_ABSOLUTE_TOLERANCE "mip_absolute_tolerance"
#define CUOPT_MIP_RELATIVE_TOLERANCE "mip_relative_tolerance"
#define CUOPT_MIP_INTEGRALITY_TOLERANCE "mip_integrality_tolerance"
Expand All @@ -57,6 +59,7 @@
#define CUOPT_MIP_HEURISTICS_ONLY "mip_heuristics_only"
#define CUOPT_MIP_SCALING "mip_scaling"
#define CUOPT_MIP_PRESOLVE "mip_presolve"
#define CUOPT_MIP_SEED "mip_seed"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving the user the option to set the random seed is important. I'm glad you added this.

My only suggestion is that we might want to call this just "seed" or "random_seed" as it is possible we would us this beyond MIP.

#define CUOPT_MIP_RELIABILITY_BRANCHING "mip_reliability_branching"
#define CUOPT_MIP_CUT_PASSES "mip_cut_passes"
#define CUOPT_MIP_MIXED_INTEGER_ROUNDING_CUTS "mip_mixed_integer_rounding_cuts"
Expand All @@ -72,6 +75,10 @@
#define CUOPT_NUM_GPUS "num_gpus"
#define CUOPT_USER_PROBLEM_FILE "user_problem_file"

/* @brief MIP determinism mode constants */
#define CUOPT_MODE_OPPORTUNISTIC 0
#define CUOPT_MODE_DETERMINISTIC 1

/* @brief LP/MIP termination status constants */
#define CUOPT_TERIMINATION_STATUS_NO_TERMINATION 0
#define CUOPT_TERIMINATION_STATUS_OPTIMAL 1
Expand All @@ -83,6 +90,7 @@
#define CUOPT_TERIMINATION_STATUS_PRIMAL_FEASIBLE 7
#define CUOPT_TERIMINATION_STATUS_FEASIBLE_FOUND 8
#define CUOPT_TERIMINATION_STATUS_CONCURRENT_LIMIT 9
#define CUOPT_TERIMINATION_STATUS_WORK_LIMIT 10

/* @brief The objective sense constants */
#define CUOPT_MINIMIZE 1
Expand Down
18 changes: 18 additions & 0 deletions cpp/include/cuopt/linear_programming/mip/solver_settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class mip_solver_settings_t {
tolerances_t tolerances;

f_t time_limit = std::numeric_limits<f_t>::infinity();
f_t work_limit = std::numeric_limits<f_t>::infinity();
i_t node_limit = std::numeric_limits<i_t>::max();
bool heuristics_only = false;
i_t reliability_branching = -1;
Expand All @@ -108,6 +109,23 @@ class mip_solver_settings_t {
std::vector<std::shared_ptr<rmm::device_uvector<f_t>>> initial_solutions;
bool mip_scaling = false;
bool presolve = true;
/**
* @brief Determinism mode for MIP solver.
*
* Controls the determinism behavior of the MIP solver:
* - CUOPT_MODE_OPPORTUNISTIC (0): Default mode, allows non-deterministic
* parallelism for better performance
* - CUOPT_MODE_DETERMINISTIC (1): Ensures deterministic results across runs
* at potential cost of performance
*/
int determinism_mode = CUOPT_MODE_OPPORTUNISTIC;
/**
* @brief Random seed for the MIP solver.
*
* Controls the initial seed for random number generation in the solver.
* Use -1 to generate a random seed.
*/
i_t seed = -1;
// this is for extracting info from different places of the solver during
// benchmarks
benchmark_info_t* benchmark_info_ptr = nullptr;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* clang-format off */
/*
* SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
/* clang-format on */
Expand Down Expand Up @@ -30,6 +30,7 @@ enum class mip_termination_status_t : int8_t {
Infeasible = CUOPT_TERIMINATION_STATUS_INFEASIBLE,
Unbounded = CUOPT_TERIMINATION_STATUS_UNBOUNDED,
TimeLimit = CUOPT_TERIMINATION_STATUS_TIME_LIMIT,
WorkLimit = CUOPT_TERIMINATION_STATUS_WORK_LIMIT,
};

template <typename i_t, typename f_t>
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# cmake-format: off
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# cmake-format: on

set(UTIL_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/utilities/seed_generator.cu
${CMAKE_CURRENT_SOURCE_DIR}/utilities/logger.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utilities/version_info.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utilities/timestamp_utils.cpp)
${CMAKE_CURRENT_SOURCE_DIR}/utilities/timestamp_utils.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utilities/work_unit_scheduler.cpp)

add_subdirectory(linear_programming)
add_subdirectory(math_optimization)
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/dual_simplex/barrier.cu
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ class iteration_data_t {
// v = alpha * A * w + beta * v = alpha * A * Dinv * A^T * y + beta * v
matrix_vector_multiply(A, alpha, w, beta, v);
if (debug) {
printf("||A|| = %.16e\n", vector_norm2<i_t, f_t>(A.x));
printf("||A|| = %.16e\n", vector_norm2<i_t, f_t>(A.x.underlying()));
printf("||w|| = %.16e\n", vector_norm2<i_t, f_t>(w));
printf("||v|| = %.16e\n", vector_norm2<i_t, f_t>(v));
}
Expand Down
19 changes: 12 additions & 7 deletions cpp/src/dual_simplex/basis_solves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <dual_simplex/tic_toc.hpp>
#include <dual_simplex/triangle_solve.hpp>

#include <raft/common/nvtx.hpp>

namespace cuopt::linear_programming::dual_simplex {

template <typename i_t>
Expand Down Expand Up @@ -57,14 +59,14 @@ void get_basis_from_vstatus(i_t m,

namespace {

template <typename i_t, typename f_t>
template <typename i_t, typename f_t, typename VectorI>
void write_singleton_info(i_t m,
i_t col_singletons,
i_t row_singletons,
const csc_matrix_t<i_t, f_t>& B,
const std::vector<i_t>& row_perm,
const std::vector<i_t>& row_perm_inv,
const std::vector<i_t>& col_perm)
const VectorI& row_perm,
const VectorI& row_perm_inv,
const VectorI& col_perm)
{
FILE* file = fopen("singleton_debug.m", "w");
if (file != NULL) {
Expand Down Expand Up @@ -94,7 +96,7 @@ void write_singleton_info(i_t m,
fclose(file);
}

template <typename i_t, typename f_t>
template <typename i_t, typename f_t, typename VectorI>
void write_factor_info(const char* filename,
i_t m,
i_t row_singletons,
Expand All @@ -104,8 +106,8 @@ void write_factor_info(const char* filename,
const csc_matrix_t<i_t, f_t>& D,
const csc_matrix_t<i_t, f_t>& L,
const csc_matrix_t<i_t, f_t>& U,
const std::vector<i_t>& row_perm,
const std::vector<i_t>& col_perm)
const VectorI& row_perm,
const VectorI& col_perm)
{
FILE* file = fopen(filename, "w");
if (file != NULL) {
Expand Down Expand Up @@ -165,6 +167,7 @@ i_t factorize_basis(const csc_matrix_t<i_t, f_t>& A,
std::vector<i_t>& deficient,
std::vector<i_t>& slacks_needed)
{
raft::common::nvtx::range scope("LU::factorize_basis");
const i_t m = basic_list.size();
constexpr f_t medium_tol = 1e-12;

Expand Down Expand Up @@ -779,6 +782,8 @@ i_t b_transpose_solve(const csc_matrix_t<i_t, f_t>& L,
// U'*r = c
// L'*w = r

raft::common::nvtx::range scope("LU::b_transpose_solve");

// Solve for r such that U'*r = c
std::vector<f_t> r = rhs;
upper_triangular_transpose_solve(U, r);
Expand Down
4 changes: 4 additions & 0 deletions cpp/src/dual_simplex/basis_updates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <dual_simplex/basis_updates.hpp>
#include <dual_simplex/initial_basis.hpp>
#include <dual_simplex/triangle_solve.hpp>
#include <raft/common/nvtx.hpp>

#include <cmath>
#include <limits>
Expand All @@ -35,6 +36,7 @@ i_t basis_update_t<i_t, f_t>::b_solve(const std::vector<f_t>& rhs,
std::vector<f_t>& solution,
std::vector<f_t>& Lsol) const
{
raft::common::nvtx::range scope("LU::b_solve");
const i_t m = L0_.m;
assert(row_permutation_.size() == m);
assert(rhs.size() == m);
Expand Down Expand Up @@ -86,6 +88,7 @@ template <typename i_t, typename f_t>
i_t basis_update_t<i_t, f_t>::b_transpose_solve(const std::vector<f_t>& rhs,
std::vector<f_t>& solution) const
{
raft::common::nvtx::range scope("LU::b_transpose_solve");
// Observe that
// P*B = L*U
// B'*P' = U'*L'
Expand Down Expand Up @@ -2263,6 +2266,7 @@ int basis_update_mpf_t<i_t, f_t>::refactor_basis(
std::vector<i_t>& nonbasic_list,
std::vector<variable_status_t>& vstatus)
{
raft::common::nvtx::range scope("LU::refactor_basis");
std::vector<i_t> deficient;
std::vector<i_t> slacks_needed;
std::vector<i_t> superbasic_list; // Empty superbasic list
Expand Down
Loading