dirkschumacher / rcbc

COIN-OR branch and cut (CBC) bindings for R
https://dirkschumacher.github.io/rcbc/
Other
19 stars 5 forks source link

no match for threads argument #55

Open Cdevenish opened 2 years ago

Cdevenish commented 2 years ago

Hi, thanks for the package.

I have installed and tried the example code, but it appears not to recognise the threads argument in cbc_args

The last three lines on the console after running the code below are (although a solution is found):

command line - problem -threads 1 -verbose 2 -solve -quit (default strategy 1) No match for threads - ? for list of commands No match for 1 - ? for list of commands

I'd like to run with multiple threads and be sure that this is happending. Thanks for any help.

This is with cbc version 2.10.5 Build Date Apr 1 2021; rcbc 0.1.0.9001; r 4.1.1. installed on Windows 10 64bit.

Here is a reproducible example:

remotes::install_github("dirkschumacher/rcbc")
library(rcbc)

## test cbc
result <- cbc_solve(
   obj = c(1, 2),
   mat = matrix(c(1, 1), ncol = 2, nrow = 1),
   is_integer = c(TRUE, TRUE),
   row_lb = -Inf, row_ub = 1, max = TRUE,
   col_lb = c(0, 0), col_ub = c(1, 1),
   cbc_args = list(threads = "1", verbose = "2"))
dirkschumacher commented 2 years ago

Maybe it is because the windows binary is not compiled for multithreading? Can you try the same on linux?

Cdevenish commented 2 years ago

I could try it, but it wouldn't be practical for me to use on linux. If there is a pre compiled binary with multithreading support for windows, would it be possible to use with rcbc? Or would it have to come from here: https://github.com/rwinlib/cbc I'm at the limits of my understanding of these processes....