Skip to content
Merged
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions cpp/src/linear_programming/utilities/cython_solve.cu
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ std::pair<std::vector<std::unique_ptr<solver_ret_t>>, double> call_batch_solve(
// Limit parallelism as too much stream overlap gets too slow
const int max_thread = compute_max_thread(data_models);

if (solver_settings->get_parameter<int>(CUOPT_METHOD) == CUOPT_METHOD_CONCURRENT) {
CUOPT_LOG_INFO("Concurrent mode not supported for batch solve. Using PDLP instead. ");
CUOPT_LOG_INFO(
"Set the CUOPT_METHOD parameter to CUOPT_METHOD_PDLP or CUOPT_METHOD_DUAL_SIMPLEX to avoid "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This would be printed even if the user does not specify anything and leave it default right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep. I think that is the correct behavior. IF the user leaves Concurrent as the default setting, we want to switch it and ask them to switch it themselves.

"this warning.");
solver_settings->set_parameter(CUOPT_METHOD, CUOPT_METHOD_PDLP);
}

#pragma omp parallel for num_threads(max_thread)
for (std::size_t i = 0; i < size; ++i)
list[i] = std::move(call_solve(data_models[i], solver_settings));
Expand Down