<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Shashi,  in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096854#M25065</link>
    <description>Shashi, 

For nest threading,  yes, it is better to disable internal IPP threading, and use the external high level threading. 

ippSetNumThreads(1) will make IPP choose one threading.  but IPP functions will still use OpenMP runtime libraries.   If you do not plan  to use IPP internal threading,  the code can link with non-threaded IPP function, which will not use OpenMP runtime libraries any more. 

Thanks,
chao</description>
    <pubDate>Tue, 22 Dec 2015 05:48:08 GMT</pubDate>
    <dc:creator>Chao_Y_Intel</dc:creator>
    <dc:date>2015-12-22T05:48:08Z</dc:date>
    <item>
      <title>Switching ippSetNumThreads in threads</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096851#M25062</link>
      <description>&lt;P&gt;I have an application that has several threads. We are using IPP 7.0.&lt;/P&gt;

&lt;P&gt;I want certain functions to run IPP in multi threaded model and some in single threaded model&lt;/P&gt;

&lt;P&gt;So I switch between&amp;nbsp;ippSetNumThreads(1) to&amp;nbsp;ippSetNumThreads(N) where N is the number of cores in the machine.&lt;/P&gt;

&lt;P&gt;Please answer these questions&lt;/P&gt;

&lt;P&gt;1) Thread1 sets&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;ippSetNumThreads(1)&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;and makes a call. Is that guaranteed to run with only one thread ? What if there was a context switch and the other thread also made a call to&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;ippSetNumThreads(N) ?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;2) What is the best practice to assure that certain IPP functions run with desired number of threads when we have many threads that make IPP calls ?&lt;/P&gt;

&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;

&lt;P&gt;Shashi&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2015 00:44:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096851#M25062</guid>
      <dc:creator>Shashi_K_</dc:creator>
      <dc:date>2015-12-05T00:44:15Z</dc:date>
    </item>
    <item>
      <title>Hi Shashi,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096852#M25063</link>
      <description>&lt;P&gt;Hi Shashi,&lt;/P&gt;

&lt;P&gt;ippSetNumThreads()&amp;nbsp;&amp;nbsp;will set the "max" number of the threading the library can run.&amp;nbsp;&amp;nbsp; If the problem size is&amp;nbsp;too small, or the threading is not efficient, the library may not create that number of threadings.&lt;/P&gt;

&lt;P&gt;It looks that you are working on the nested threading.&amp;nbsp; Both the application and IPP function may have the threadings.&amp;nbsp; For this case, we are recommend to use the high level application threading, other than internal IPP threading, check this article for some info on this:&lt;BR /&gt;
	&lt;A href="https://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-threading-openmp-faq"&gt;https://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-threading-openmp-faq&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Chao&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 04:13:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096852#M25063</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2015-12-07T04:13:56Z</dc:date>
    </item>
    <item>
      <title>Thanks a lot for your answer</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096853#M25064</link>
      <description>&lt;P&gt;Thanks a lot for your answer Chao.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;We are using an older version of IPP. And our code base is pretty big. Moving to newer IPP is currently not an option. We have to stick to version 7.0.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Given we will still use 7.0, you recommend us to use&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;ippSetNumThreads(1) everywhere to avoid nested thread issues ?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Shashi&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2015 15:21:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096853#M25064</guid>
      <dc:creator>Shashi_K_</dc:creator>
      <dc:date>2015-12-07T15:21:03Z</dc:date>
    </item>
    <item>
      <title>Shashi,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096854#M25065</link>
      <description>Shashi, 

For nest threading,  yes, it is better to disable internal IPP threading, and use the external high level threading. 

ippSetNumThreads(1) will make IPP choose one threading.  but IPP functions will still use OpenMP runtime libraries.   If you do not plan  to use IPP internal threading,  the code can link with non-threaded IPP function, which will not use OpenMP runtime libraries any more. 

Thanks,
chao</description>
      <pubDate>Tue, 22 Dec 2015 05:48:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Switching-ippSetNumThreads-in-threads/m-p/1096854#M25065</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2015-12-22T05:48:08Z</dc:date>
    </item>
  </channel>
</rss>

