Knitro in Parallel

20 views
Skip to first unread message

Andy

unread,
Apr 20, 2018, 7:33:55 AM4/20/18
to AMPL Modeling Language
Dear all,

I am trying to solve a MINP using KNITRO and would like to use all cores on my PC. However, although I did set par_numthreads=4, only one core is being used. I am working on a linux machine and am using the Matlab AMPL API.

Thanks!

AMPL Google Group

unread,
Apr 20, 2018, 12:11:03 PM4/20/18
to Ampl Modeling Language
Are you setting the option par_numthreads with "ampl.setOption('par_numthreads', '4');"? If that is the case, please use the following instead:
ampl.setOption('knitro_options', 'par_numthreads=4');

Best regards,
Filipe

--
Filipe Brandão
am...@googlegroups.com
{#HS:565371635-5722#}
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.



Andy

unread,
Apr 21, 2018, 9:28:27 AM4/21/18
to AMPL Modeling Language
Thanks Filipe, 
I am indeed using 

ampl.setOption('knitro_options', 'par_numthreads=4');

but only a single core is used both on my linux machine as well as on my mac. I guess that is the reason why knitro is currently outperformed a lot by cplex for QMIP. Maybe it's a bug in knitro?

AMPL Google Group

unread,
Apr 21, 2018, 3:42:20 PM4/21/18
to Ampl Modeling Language
A list of the possibilities for parallel processing Knitro is given at

https://www.artelys.com/tools/knitro_doc/2_userGuide/parallelism.html

Depending on the Knitro algorithms and computational options that you select, some of these possibilities may apply to your Knitro runs, or none of them may apply. If you think that some of these possibilities do apply, then let us know which ones, and we can investigate further.

One way in which Knitro differs from CPLEX is that Knitro does not offer a parallel branch-and-bound procedure for MIP problems. So if Knitro and CPLEX are both building a large MIP search tree for your problem, CPLEX may have an advantage because it can parallelize the tree search while Knitro cannot.

--
Robert Fourer
am...@googlegroups.com
{#HS:565371635-5722#}
On Sat, Apr 21, 2018 at 1:28 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
Thanks Filipe,
I am indeed using

ampl.setOption('knitro_options', 'par_numthreads=4');

but only a single core is used both on my linux machine as well as on my mac. I guess that is the reason why knitro is currently outperformed a lot by cplex for QMIP. Maybe it's a bug in knitro?


Am Freitag, 20. April 2018 18:11:03 UTC+2 schrieb AMPL Google Group:



On Fri, Apr 20, 2018 at 4:10 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Are you setting the option par_numthreads with "ampl.setOption('par_numthreads', '4');"? If that is the case, please use the following instead:
ampl.setOption('knitro_options', 'par_numthreads=4');

Best regards,
Filipe

--
Filipe Brandão
am...@googlegroups.com


Reply all
Reply to author
Forward
0 new messages