-
|
Woohoo! This has been a long time coming and a BIG "thank you" is deserved, so... Thank You! Now how do we use it and when during the solving is it used and what kind of performance improvement has been seen? I set 'parallel=on' and 'threads=8' and see the following output: So I assume it is working but my CPU is sitting at 7-8% which is what I'd see with a single thread. In contrast, when run as 7 processes in a 'first to finish' race the CPU is usually around 45-50% meaning each core is being utilized. BTW - this is on multi-commodity flow problems with assignment, budget and capacity constraints. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
|
Since you have only "1 max workers", you have "Parallel search off", so no parallelism Looking at the method that defines the maximum number of workers, HiGHS/highs/mip/HighsMipSolver.h Line 161 in 8396001 with more than one thread - as your output states - the only way to have "1 max workers" is if the parallel option is not on (since your original MIP is not a sub-MIP). How are you setting NB @Opt-Mucca |
Beta Was this translation helpful? Give feedback.
-
# Testing HiGHS Parallel MIP
model.setOptionValue("parallel", "On")
model.setOptionValue("threads", 8)AHA! I see it... it should be "on" not "On". 🤦 Well, it was closer than my first try of 'true'. Now I see... and the CPU% is consistently hitting ~50% and then dropping to ~10% and going right back up. During a restart/symmetry detection it stays in the low range and then goes back up. That's exactly what I would expect for the sharing and restarting. 👍 LP Iters is about 3x more than the 1 worker and B&B Expl% is ~3.5x. Thank you (again)! Excellent! Time for some benching. (I'll report some results later.) So, as a general high level 'how this works' what's the story? The workers are processes with state sharing and the worker count is based on the CPU count, not a given option value? And, threads are per worker instance, still controlled by the 'threads' option, or are threads not considered in the workers? (Not that threads ever really did anything for MIP anyhow). |
Beta Was this translation helpful? Give feedback.
-
|
@Thell Thanks for the kind words! The current change is somewhere between 20-25% performance improvement on four cores (the feature is very much in the stage where minor changes can still have pretty large effects). As you observed though, the node throughput and LP iterations increase a lot. As @jajhall said in the previous answer: To currently use "parallel MIP" set High level overview of how it works: Any feedback, especially if it's performance related, is welcome. I'm interested in what numbers you observe. A side point: Any chance you'd want to share the multi-commodity flow instance? There is a long-term plan to write a MCF separator, and getting some instances early would be helpful. |
Beta Was this translation helpful? Give feedback.
-
|
Nice! I think I will be saying bye-bye First to Finish. 👋 Runtimes (s):
¹ - Custom multi-process First-to-Finish controller with solution sharing using 7 processes The RHS of the 'budget' constraint for the model is set at 600 and is the only value to be altered in the test runs. |
Beta Was this translation helpful? Give feedback.
Since you have only "1 max workers", you have "Parallel search off", so no parallelism
Looking at the method that defines the maximum number of workers,
HiGHS/highs/mip/HighsMipSolver.h
Line 161 in 8396001
with more than one thread - as your output states - the only way to have "1 max workers" is if the parallel option is not on (since your original MIP is not a sub-MIP).
How are you setting
parallel=on?NB @Opt-Mucca