[AMPL 24710] Threads and CPLEX license


In advance, thank you very much for all the help provided.

This time I have two questions:

  1. Ask you, how is it possible to use more available threads on my machine (server), without the license restricting them to 32? I have 80 threads available, and 265gb RAM.

  2. Is it possible that I can use my own CPLEX (IBM) license to run the problem? if so, how can i use my own cplex license?

Thank you very much for your attention and help,


By default, CPLEX limits the number of threads to 32. To request more threads, add an explicit setting of the threads parameter – for example, threads=48 – to your cplex_options string. (The CPLEX for AMPL version that you are using does not place any licensing restrictions on the number of threads.)

If you are solving a problem that has integer variables, then more threads require more memory and more communication overhead. As a result, choosing the largest possible number of threads may not give the fastest results. You should experiment with different settings of threads= . . . to see what works well for your problem. (There is more information in the Parallel optimization section of the CPLEX documentation.)

If there is a cplexamp or cplexamp.exe file in the CPLEX distribution that you received from IBM, then you can use it with AMPL. Just put it in the same location as your AMPL and CPLEX files, and set “option solve cplexamp;” before solving. However, this might be an older version of CPLEX than the one that we (AMPL Optimization) distribute, and it will not make any difference to the number of threads that you can use.