I set solver.options['parallel/maxnthreads'] = 16
, but found the solution time did't decrease.
I installed it directly through conda install with a version of 9.1.0, and I wonder if I need to compile it myself, like https://scipopt.org/doc/html/CONCSCIP.php.
1 Answer
Based on what mentioned on the SCIP host:
The parameters parallel/maxnthreads and parallel/minnthreads can be used to configure the number of threads that sould be used for solving. SCIP will try to use the configured maximum number of threads. If the problem that is currently read is too large SCIP will automatically use fewer threads, but never go below the configured minimum number of threads.
You will need to define something like this:
m.Options = {"limits/time": 10, "parallel/maxnthreads": 16}
SolverFactory('scip').solve(m, tee= True, options = m.Options, load_solutions=True).write()
and the result shows:
reading user parameter file <scip.set>
===========================
limits/time = 10
parallel/maxnthreads = 16
-
$\begingroup$ Thank you for your answer! But this doesn't seem any different than setting
solver.options
directly, at least on the output of the log. In addition, I would like to add that I am currently solving global NLP problems, and I wonder if this will have any impact. $\endgroup$ Commented Oct 21 at 10:09 -
$\begingroup$ @ZhiyuZhang, in regards to impact, I suggest taking a look at this SO question, and both its answers. $\endgroup$ Commented Oct 21 at 10:59