"numthreads" does not have an effect on Knitro/MATLAB

15 views
Skip to first unread message

libao...@gmail.com

unread,
Dec 1, 2024, 11:17:50 AM12/1/24
to Artelys Knitro forum

I would like to turn on ‘numthreads>1’ to take advantage of a multi core computer and speed up computation. However, I find it does not have a significant effect on the attached example, where I added “'linsolver_numthreads', 16,'numthreads',16” to options and checked time.

exampleNLP1Problem.7z

Richard Waltz

unread,
Dec 2, 2024, 12:14:55 PM12/2/24
to Artelys Knitro forum
Hi,

The example model you are solving is a very small toy problem with only 2 variables.  There is overhead using parallelism such that you are unlikely to notice any speedup using a parallel linear solver such as MKL PARIDSO until you are solving problems with at least thousands or tens of thousands of variables.  In addition, on very small problems, there are other things (other than linear algebra) that take a significant percentage of the solve time and that cannot be parallelized.

Regards,
-Richard Waltz


From: kni...@googlegroups.com <kni...@googlegroups.com> on behalf of libao...@gmail.com <libao...@gmail.com>
Sent: Saturday, November 30, 2024 9:38 PM
To: Artelys Knitro forum <kni...@googlegroups.com>
Subject: [Knitro] "numthreads" does not have an effect on Knitro/MATLAB
 

I would like to turn on ‘numthreads>1’ to take advantage of a multi core computer and speed up computation. However, I find it does not have a significant effect on the attached example, where I added “'linsolver_numthreads', 16,'numthreads',16” to options and checked time.

--
You received this message because you are subscribed to the Artelys "Knitro Nonlinear Optimization Solver" google group.
To post to this group, send email to kni...@googlegroups.com
To unsubscribe from this group, send email to knitro-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/knitro?hl=en
Thank You,
Artelys
http://www.artelys.com/en/optimization-tools/knitro
---
You received this message because you are subscribed to the Google Groups "Artelys Knitro forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knitro+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/knitro/47f67c3b-175d-4a01-9c90-ddbd5ec62b24n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages