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

solving with 1 core in Linux #49

Closed
momeni133 opened this issue Nov 21, 2017 · 1 comment
Closed

solving with 1 core in Linux #49

momeni133 opened this issue Nov 21, 2017 · 1 comment
Labels

Comments

@momeni133
Copy link

Dear all
In the Linux, the problem created with 100% CPU usage and 8 cores. When the job finished (after 26 h) I received two warnings:
Warning messages:
1: : ... may be used in an incorrect context: ‘.fun(piece, ...)’

2: : ... may be used in an incorrect context: ‘.fun(piece, ...)’

Now I'm trying to solve the created problem. But Rsymphony is using only 1 core. Why in the problem creating step it used 8 cores but in the solving step only one?

@jeffreyhanson
Copy link
Contributor

The set_number_of_threads is used to globally control the number of threads used for processing GIS data prior to solving reserve selection problems. If multiple cores are specified for pre-processing data (set via the set_number_of_threads function), then R will create the warnings you're seeing. You can safely disregard these warnings.

To set the number of threads used for solving a problem, check out the add_*_solver functions (e.g. add_gurobi_solver). Unfortunately, Rsymphony package does not allow users to control the number of threads to use for solving problem, so the add_rsymphony_solver function does not have a threads argument. It seems that on certain systems the Rsymphony and lpsymphony packages will only use one thread for solving problems, and on other systems these packages will automatically use all of the threads for solving problems - but there is not yet an mechanism to control this within R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants