How to increase CPU usage in complex models

Hello dear Community,

I’m currently solving a lot of complex models in AMPL, using C++ so that it runs the model in each library case. The thing is that when I run the code, my CPU usage is really low, in 14%. I would like to use more of the capabilities of my pc, and I wonder whether there is any option or command to do that. Thank your for your help.


In the Image, you can see the usage of my CPU while running the code.

It looks like only one of the computer’s 8 cores is being used. Some solvers implement parallel algorithms that can take advantage of multiple cores, but that may depend on the type of problem and the solver options chosen. Which solver are you using?

You could also consider running run more than one AMPL and/or solver process at the same time. Are you using C++ through AMPL’s C++ API? The we may be able to suggest an approach to try.

Yes I’m using C++ through AMPL’s C++ API. The solver I’m using is CPLEX.

Please try the following test. Before solving, use the C++ API to set AMPL’s show_stats option to 1. Then post all of the additional output that results. That will give some indication as to what CPLEX solver options are applicable.