Skip to main content

Hi,

I am not sure if this post is a Question or Idea!
I aim to solve thousands of GMPs in parallel using asynchronous solver sessions. I use Gurobi which allows for 32 concurrent solver sessions. 

With the help of ​@Marcel Hunting, I could implement the procedure effectively. In a For loop, the procedure generates a GMP and then sends it to an asynchronous solver session. Then, in another For loop, it recovers the solution and writes the outcomes. 

Although the GMP generation became much faster since January 2025 update (my compliments to the dev team!), the current bottleneck is the GMP generation and solution recovery rather than solve time of each instance. 

In an example, I tried running 320 instances with 4 parallel solver sessions. Total solve time was 13600 seconds, in which around 13000 seconds were spend on GMP generation. Here, although Gorubi allows for 32 parallel sessions, adding more parallel solver sessions does not contribute to total solve time. Hence, I can only use a fraction of the full capacity of the solver and the hardware. 

I believe the total solve time can reduce drastically if GMP generation and solution recovery can run in parallel. Perhaps a workaround would be running two Aimms instances at the same time. But, still it does not help using full capacity of the solver and hardware. 

Is it possible to parallelize GMP generation? 

Hi ​@afattahi. We currently have no plans to parallelize GMP generation.

How do the instances differ? Would generating the GMP once and then using GMP update functions like GMP::Row::SetRightHandSideMulti and GMP::Coefficient::SetMulti work? These functions are usually much faster than generating a math program. You could also use the profiler to check which constraints take the most time to generate.

To improve storing/passing of solutions you might want to switch off the Solvers General option 'Always store basics’ if you are not interested in the basis.


Hi ​@Marcel Hunting,

I am aware of the Row update functions. But, to provide higher flexibility to the user, I prioritized generating the GMP all over each time. 
This is unfortunate that parallelizing AIMMS is not on the development plans. This issue is not only limiting GMP generation, but also communication with the solver. Therefore, user cannot fully use the potential of solver sessions. 

The comparison article on Medium (Benchmarking Optimization Tools for Scale: AIMMS vs. Pyomo & JuMP | AIMMS Community) shows clear advantage of AIMMS when it comes to problem generation. However, the 12x - 20x advantage of AIMMS quickly vanishes when JuMP generates problems in parallel. 

 

Thanks to profiler, I could find the constraints that take time to generate and improve them.

Also, thanks for the last tip. I will include it in my model. However, passing the solution to AIMMS is not very time consuming according to the profiler.   


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator