comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Confusion about nthread and ncore
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Confusion about nthread and ncore [message #89753 is a reply to message #89745] Sat, 29 November 2014 16:40 Go to previous message
chuxiangning is currently offline  chuxiangning
Messages: 17
Registered: September 2012
Junior Member
On Thursday, November 27, 2014 1:05:52 AM UTC-8, Víctor Cazcarra wrote:
> El martes, 25 de noviembre de 2014 18:38:48 UTC+1, chu xiangning escribió:
>> Thanks for your suggestion!
>> I've tested my program under different cases by setting nthreads to different values. (cpu,tpool_nthreads = 3)
>> I have an i7 cpu, which has 4 cores and 8 threads(2 per cpu).
>> It turns out the program runs faster when I set nthread to 4 instead of 8 (IDL default). This result is expected anyway.
>> As a suggestion to IDL, I would suggest they change the default value of nthreads according to number of cores.
>>
>>
>> nthread time (sec)
>> 1 7.923
>> 2 4.458
>> 3 3.451
>> 4 3.055
>> 6 3.162
>> 8 3.298
>
> Hi,
>
> I think that it always depends on your program. if your program can do some works in parrallel automatically, for example if you work with big matricies IDL do some parallelization so it is better not using all the threads.
>
> I was working with IDL_bridge trying to split a big loop to work in parallel and for me it worked better using the number of threads instead of the number of cores.
>
> I am not a hardware expert but I guess that it also depends on the structure of your processor.
>
> In any case, It is a good idea always testing your program and choose the best compromise between number of threads and time.

Thanks for weighing in.
Yes it depends on the programs.
In some of my program, I also have large matrix and IDL automatically use parallel calculation.
The problem is, by setting CPU to use number of cores instead of number of threads, the program runs faster.
It is also true if you run several IDLs together.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: rebinning two arrays? or re: finding exclusive elements between 2 not-quite identical arrays?
Next Topic: How to check if the widget_table is empty?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:26:05 PDT 2025

Total time taken to generate the page: 1.59853 seconds