- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Forum Members,
one way recommended to control the number of threads inan application using Intel IPP is to useippSetNumThreads. Actually I did this at the beginning of my main function and set the number of threads to 1. However, when the application is running on our hpc-cluster with Quadcore or Octocore Nodes, the application creates 4 Threads instead of one. Due to the fact, that my code itself creates no threads at all, I was wondering why the Intel Ipp Library is creating more than one thread. (The cluster is running under SLES 10.1 in combination with Intel Ipp 6.0). Has anyone else observed this behaviour. Are there any restrictions or requirements whereippSetNumThreads has to be called or is it not sufficient to call ippSetNumThreads once?
Thomas
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Thomas,
Intel IPP is threaded using OpenMP API. The OpenMP run time will create number of threads equal to number of cores on your system. How much threads will do real work for IPP depends on value you set with ippSetNumThreads function. In your case these additional threads are always in sleep state and do not require any cpu cycles.
Regards,
Vladimir
Intel IPP is threaded using OpenMP API. The OpenMP run time will create number of threads equal to number of cores on your system. How much threads will do real work for IPP depends on value you set with ippSetNumThreads function. In your case these additional threads are always in sleep state and do not require any cpu cycles.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
Hi Thomas,
Intel IPP is threaded using OpenMP API. The OpenMP run time will create number of threads equal to number of cores on your system. How much threads will do real work for IPP depends on value you set with ippSetNumThreads function. In your case these additional threads are always in sleep state and do not require any cpu cycles.
Regards,
Vladimir
Intel IPP is threaded using OpenMP API. The OpenMP run time will create number of threads equal to number of cores on your system. How much threads will do real work for IPP depends on value you set with ippSetNumThreads function. In your case these additional threads are always in sleep state and do not require any cpu cycles.
Regards,
Vladimir
Hi Vladimir,
thanks for your interesting answer, but I think I do not really understand the behaviour of IPP in this case. According to your argumentation, a call ofippGetNumThreads previously toippSetNumThreads should be equal to the number of threads after callingippSetNumThreads. However in my case, the number of threads returned byippGetNumThreads is larger (NThreads=8) than the observed number of threads after setting ippSetNumThreads (NThreads=4). Does this mean, that some of the Threads are switched in sleep state and others are destroyed?
Thanks,
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GetNumThreads should return default number which is equal to number of cores on your system if you did not call SetNumThreads before. But after you set some particular number of threads with SetNumThreads call, then GetNumThreads should return this number.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Vladimir Dudnik (Intel)
GetNumThreads should return default number which is equal to number of cores on your system if you did not call SetNumThreads before. But after you set some particular number of threads with SetNumThreads call, then GetNumThreads should return this number.
Regards,
Vladimir
So my question is, why is the number of threads returned by ippGetNumThreads (directly after starting the program and without calling ippSetNumThreads) different to the number of observable threads when the program is running? In my case the number of 'possible' threads returned by ippGetNumThreads (without calling ippSetNumThreads before) is 8 and the number of observable threads running in the system after calling ippSetNumThreads( 1 ) is 4. I'm not sure, but considering your post, I think, there should be 8 threads again (7 threads in the sleep state and one thread working)?
Maybe this is due to some internals of the library and there are always 4 threads independent of the number of available cores in the system, or some of the threads are destroyed?
ippGetNumThreads in the manual:This function returns the number of OMP threads specified by the user previously. If it has not been specified,the function returns the initial number of threads that depends on the number of logical processors.
Best regards,
Thomas
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thomas,
I think it is specific for OpenMP run time how many threads it will create by default. But you may be sure that with ippSetNumThreads(N) you direct IPP (and underlaying OpenMP run time) to only useN threads.
Regards,
Vladimir
I think it is specific for OpenMP run time how many threads it will create by default. But you may be sure that with ippSetNumThreads(N) you direct IPP (and underlaying OpenMP run time) to only useN threads.
Regards,
Vladimir
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page