From 90824580a9ebc9bf879a377fa51635354ec5f27f Mon Sep 17 00:00:00 2001 From: Bulle Mostovoi Date: Fri, 18 Sep 2026 09:51:45 +0200 Subject: [PATCH 1/4] a --- cpp/cuopt_cli.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/cuopt_cli.cpp b/cpp/cuopt_cli.cpp index 40176159f4..aafff0d9ac 100644 --- a/cpp/cuopt_cli.cpp +++ b/cpp/cuopt_cli.cpp @@ -524,7 +524,8 @@ int main(int argc, char* argv[]) settings.get_pdlp_settings().num_gpus = requested_gpus; } if (requested_gpus > device_count) { - CUOPT_LOG_ERROR("num_gpus=%d exceeds the number of visible CUDA devices (%d).", + auto log = dummy_logger(settings); + CUOPT_LOG_ERROR("num-gpus=%d exceeds the number of visible CUDA devices: %d.", requested_gpus, device_count); return -1; From d12198fc01020ab9975c12db0ac73d41446e56c8 Mon Sep 17 00:00:00 2001 From: Bulle Mostovoi Date: Tue, 22 Sep 2026 10:13:56 +0200 Subject: [PATCH 2/4] changed error to warning --- cpp/cuopt_cli.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpp/cuopt_cli.cpp b/cpp/cuopt_cli.cpp index aafff0d9ac..140e9b162d 100644 --- a/cpp/cuopt_cli.cpp +++ b/cpp/cuopt_cli.cpp @@ -525,10 +525,12 @@ int main(int argc, char* argv[]) } if (requested_gpus > device_count) { auto log = dummy_logger(settings); - CUOPT_LOG_ERROR("num-gpus=%d exceeds the number of visible CUDA devices: %d.", + CUOPT_LOG_ERROR("num-gpus=%d exceeds the number of visible CUDA devices: %d. Falling back to %d GPUs.", requested_gpus, + device_count, device_count); - return -1; + requested_gpus = device_count; + settings.get_pdlp_settings().num_gpus = requested_gpus; } memory_resources.reserve(requested_gpus); for (int i = 0; i < requested_gpus; ++i) { From 616ec03c1882d812ec8bf0e50972f30fc079fca7 Mon Sep 17 00:00:00 2001 From: Bulle Mostovoi Date: Wed, 23 Sep 2026 11:47:35 +0200 Subject: [PATCH 3/4] c --- cpp/cuopt_cli.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/cuopt_cli.cpp b/cpp/cuopt_cli.cpp index 140e9b162d..e482405c57 100644 --- a/cpp/cuopt_cli.cpp +++ b/cpp/cuopt_cli.cpp @@ -525,12 +525,12 @@ int main(int argc, char* argv[]) } if (requested_gpus > device_count) { auto log = dummy_logger(settings); - CUOPT_LOG_ERROR("num-gpus=%d exceeds the number of visible CUDA devices: %d. Falling back to %d GPUs.", - requested_gpus, - device_count, - device_count); - requested_gpus = device_count; - settings.get_pdlp_settings().num_gpus = requested_gpus; + CUOPT_LOG_ERROR( + "num-gpus=%d exceeds the number of visible CUDA devices: %d. Falling back to %d GPUs.", + requested_gpus, + device_count, + device_count); + return -1; } memory_resources.reserve(requested_gpus); for (int i = 0; i < requested_gpus; ++i) { From d9cc103ad6d979ed580e7e33e59d1728b8a08613 Mon Sep 17 00:00:00 2001 From: Bulle Mostovoi Date: Wed, 23 Sep 2026 11:57:36 +0200 Subject: [PATCH 4/4] fixedprints --- cpp/cuopt_cli.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cpp/cuopt_cli.cpp b/cpp/cuopt_cli.cpp index e482405c57..362ac38d57 100644 --- a/cpp/cuopt_cli.cpp +++ b/cpp/cuopt_cli.cpp @@ -525,11 +525,9 @@ int main(int argc, char* argv[]) } if (requested_gpus > device_count) { auto log = dummy_logger(settings); - CUOPT_LOG_ERROR( - "num-gpus=%d exceeds the number of visible CUDA devices: %d. Falling back to %d GPUs.", - requested_gpus, - device_count, - device_count); + CUOPT_LOG_ERROR("num-gpus=%d exceeds the number of visible CUDA devices: %d. Aborting solve.", + requested_gpus, + device_count); return -1; } memory_resources.reserve(requested_gpus);