Skip to content
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

Add support for MOI.NumberOfThreads #221

Merged
merged 2 commits into from
Sep 8, 2023
Merged

Add support for MOI.NumberOfThreads #221

merged 2 commits into from
Sep 8, 2023

Conversation

hannes-uppman
Copy link
Contributor

Closes #220

@odow
Copy link
Member

odow commented Sep 7, 2023

I avoided adding this previously because of #186

if param.name == "threads" && Sys.iswindows()
@warn(
"Ignoring threads parameter due to known bugs in CBC. Read " *
"https://github.com/jump-dev/Cbc.jl/issues/186 for more details.",
)
return
end

But I guess it doesn't hurt.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.37% 🎉

Comparison is base (f495d97) 87.67% compared to head (17f952e) 88.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #221      +/-   ##
==========================================
+ Coverage   87.67%   88.05%   +0.37%     
==========================================
  Files           2        2              
  Lines         349      360      +11     
==========================================
+ Hits          306      317      +11     
  Misses         43       43              
Files Changed Coverage Δ
src/MOI_wrapper/MOI_wrapper.jl 88.25% <100.00%> (+0.38%) ⬆️

☔ View full report in Codecov by Sentry.

📢 Have feedback on the report? Share it here.

@hannes-uppman
Copy link
Contributor Author

I see.
Would it be better to have MOI.supports(::Optimizer, ::MOI.NumberOfThreads) return false on Windows?
Not having support on e.g. Linux because of a problem on Windows seems bad.

@odow
Copy link
Member

odow commented Sep 7, 2023

I think this is fine to say "yes" and then throw a warning. I'm taking a look at the segfault issue. It used to be very sporadic. But it seems regular now.

@hannes-uppman
Copy link
Contributor Author

Ok! Thanks!

@odow odow merged commit 3eb89fc into jump-dev:master Sep 8, 2023
9 of 10 checks passed
@hannes-uppman hannes-uppman deleted the threads branch September 8, 2023 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support MOI.NumberOfThreads
2 participants