-
Notifications
You must be signed in to change notification settings - Fork 24
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
Multiple threads #242
Comments
I am using Julia v1.7.3 and these versions of JuMP and SCIP.jl: |
I believe the parameter used to allow concurrent solve is TPI=tinycthreads |
Yes, at build time you need to make sure it is built with TPI=omp or TPI=tny. Otherwise, the parameter is fine, only it is important to trigger the solve not via SCIPsolve(), which is always sequential, but via SCIPsolveConcurrent(). I don't know whether this is interfaced here. |
How is SCIP built (TPY= none, omp, or tny) when obtained in Julia as a package? |
=none sadly for now, we'll try tny for the next release. For now you should
compile SCIP yourself and build as instructed on the readme
…On Thu, Sep 29, 2022, 18:49 stumarcus576 ***@***.***> wrote:
How is SCIP built (TPY= none, omp, or tny) when obtained in Julia as a
package?
—
Reply to this email directly, view it on GitHub
<#242 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2FDMRMQUWRSN6ODLIO7GTWAXCCBANCNFSM57XWII3A>
.
You are receiving this because you commented.Message ID: <scipopt/SCIP.
***@***.***>
|
If SCIP is built with TPY = tny, the default concurrent/scip.../prefprio parameters (https://www.scipopt.org/doc/html/PARAMETERS.php) are used, and the max and min number of threads parallel/maxnthreads and parallel/minnthreads are set to 4, will the SCIP solver of type < scip > use 4 threads? Or will SCIP invoke 4 solver instances of type < scip >, each in it own thread? |
The latter. |
But random seeds and child selection rules will be different. |
Is this still an issue? I see that Yggdrasil's build script has TPY = tny: https://github.com/JuliaPackaging/Yggdrasil/blob/b63ce418a9a21dbfc79728b50e8d8d664e9dfc9a/S/SCIP/build_tarballs.jl#L35 |
there are experiments in the branch concurrent, but I would say SCIP concurrent is very experimental and not polished at the moment, which is why it's not merged yet. |
I am trying to use multiple (24) threads to solve a MILP with SCIP by setting the parallel/maxnthreads parameter. My Julia code is shown below. Based on monitoring htop, it seems like SCIP is only using a single thread. Are there other parameters that can be set to enable multithreading in SCIP?
using JuMP
using SCIP
m = read_from_file("input.mps")
optimizer = SCIP.Optimizer()
MOI.set(optimizer, MOI.RawOptimizerAttribute("parallel/maxnthreads"), 24)
set_optimizer(m, () -> optimizer)
The text was updated successfully, but these errors were encountered: