<?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 Re: Restricting Number of Cores in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887271#M3591</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
In WinAPI you may play with SetProcessAffinityMask. Using this function you may set processors (cores) on which threads of process may run.&lt;BR /&gt;&lt;BR /&gt;M&lt;BR /&gt;</description>
    <pubDate>Tue, 10 Mar 2009 17:12:19 GMT</pubDate>
    <dc:creator>Marcin_Prochownik</dc:creator>
    <dc:date>2009-03-10T17:12:19Z</dc:date>
    <item>
      <title>Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887259#M3579</link>
      <description>&lt;DIV class="pad5x10"&gt;&lt;/DIV&gt;
&lt;DIV class="pad5x10"&gt;Is there any way that i can turn off any number of cores e.g. i want to use 10 cores out of available 32 cores in multicore machine. Is it possible?&lt;BR /&gt; &lt;BR /&gt; Also is it possible for example JVM to use 2 cores on Quad core machine ? &lt;BR /&gt; &lt;BR /&gt; Thanks.&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Mar 2009 15:16:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887259#M3579</guid>
      <dc:creator>allo6</dc:creator>
      <dc:date>2009-03-05T15:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887260#M3580</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417163"&gt;allo6&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV class="pad5x10"&gt;Is there any way that i can turn off any number of cores e.g. i want to use 10 cores out of available 32 cores in multicore machine. Is it possible?&lt;/DIV&gt;
&lt;DIV class="pad5x10"&gt;Also is it possible for example JVM to use 2 cores on Quad core machine ? &lt;BR /&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;1 - just use 10 threads, and you will use only 10 cores of your multicore machine (through a thread pool I mean)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;2 - don't know :)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;Vincent&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Mar 2009 15:38:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887260#M3580</guid>
      <dc:creator>fraggy</dc:creator>
      <dc:date>2009-03-05T15:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887261#M3581</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/412902"&gt;fraggy&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;1 - just use 10 threads, and you will use only 10 cores of your multicore machine (through a thread pool I mean)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;2 - don't know :)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN style="font-style: italic;"&gt;Vincent&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;OK, Thanks. But i want other idle core to shut down/power off, Any idea ???&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Mar 2009 15:42:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887261#M3581</guid>
      <dc:creator>allo6</dc:creator>
      <dc:date>2009-03-05T15:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887262#M3582</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417163"&gt;allo6&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV class="pad5x10"&gt;Is there any way that i can turn off any number of cores e.g. i want to use 10 cores out of available 32 cores in multicore machine. Is it possible?&lt;BR /&gt;&lt;BR /&gt;Also is it possible for example JVM to use 2 cores on Quad core machine ? &lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;What are you useing for a threading tool?&lt;BR /&gt;What operating system?&lt;BR /&gt;&lt;BR /&gt;If OpenMP, you can seta restriction using environment variable&lt;BR /&gt;&lt;BR /&gt; SET OMP_NUM_THREADS=10&lt;BR /&gt;&lt;BR /&gt;Or at compile tile&lt;BR /&gt;&lt;BR /&gt;export&lt;BR /&gt; OMP_NUM_THREADS=10&lt;BR /&gt; &lt;BR /&gt;Or at run time&lt;/P&gt;
&lt;P&gt; OMP_SET_NUM_THREADS()&lt;BR /&gt;&lt;BR /&gt;Also, on Windows and Linux you can restrict the number of cores available to a process (applicaiton).&lt;BR /&gt;(you will have to look that one up)&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2009 15:42:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887262#M3582</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-03-05T15:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887263#M3583</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417163"&gt;allo6&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;OK, Thanks. But i want other idle core to shut down/power off, Any idea ???&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;When thread idel it suspends.</description>
      <pubDate>Thu, 05 Mar 2009 15:43:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887263#M3583</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-03-05T15:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887264#M3584</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;What are you useing for a threading tool?&lt;BR /&gt;What operating system?&lt;BR /&gt;&lt;BR /&gt;If OpenMP, you can seta restriction using environment variable&lt;BR /&gt;&lt;BR /&gt; SET OMP_NUM_THREADS=10&lt;BR /&gt;&lt;BR /&gt;Or at compile tile&lt;BR /&gt;&lt;BR /&gt; export&lt;BR /&gt; OMP_NUM_THREADS=10&lt;BR /&gt; &lt;BR /&gt;Or at run time&lt;/P&gt;
&lt;P&gt;OMP_SET_NUM_THREADS()&lt;BR /&gt;&lt;BR /&gt;Also, on Windows and Linux you can restrict the number of cores available to a process (applicaiton).&lt;BR /&gt;(you will have to look that one up)&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;/P&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I want to do it for Operating system (Solaris/Linux/Windows etc) , to swtich off extra cores, so that my application typically sees less cores(Logical processors) to run its threads&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Mar 2009 15:45:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887264#M3584</guid>
      <dc:creator>allo6</dc:creator>
      <dc:date>2009-03-05T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887265#M3585</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417163"&gt;allo6&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;I want to do it for Operating system (Solaris/Linux/Windows etc) , to swtich off extra cores, so that my application typically sees less cores(Logical processors) to run its threads&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;The OMP_NUM_THREADS environment variable does this for OpenMP threaded programs. Other threading tools may use a different technique (i.e. read the documentation).&lt;BR /&gt;&lt;BR /&gt;Most operating systems have the concept of Environment Variables (Windows/Solaris/Linux do). A process inherits the environment variables from which it is run. Typically a system has system wide environment variables and the user runs applications (processes) within a command shell (CMD on Windows) and this command shell starts with the environment variables of the environment in which it was spawned from, and subsequent to start, the command shell (copies of)environment variables can be added to, deleted, or changed.&lt;BR /&gt;&lt;BR /&gt;On Windows, you can (stepse vary depending of version of Windows)perform: &lt;BR /&gt;&lt;BR /&gt; Start | Control Pannel | System | Advanced | Environment Variables | User Variables | New&lt;BR /&gt;&lt;BR /&gt;And in there add OMP_NUM_THREADS as variable name and 10 as value.&lt;BR /&gt;&lt;BR /&gt;*** Then rember you did this *** when you next project doesn't use all 16 cores.&lt;BR /&gt;&lt;BR /&gt;Alternately, you can create aBatch file (command script) toissue:&lt;BR /&gt;&lt;BR /&gt; SET OMP_NUM_THREADS=10&lt;BR /&gt; YourProgramName.exe&lt;BR /&gt;&lt;BR /&gt;Then create a shortcut to the batch file and launch your application that way. Now the limitation only applies to the application launched by way of the shortcut.&lt;BR /&gt;&lt;BR /&gt;Linux has similar techniques.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Mar 2009 17:18:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887265#M3585</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-03-05T17:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887266#M3586</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;The OMP_NUM_THREADS environment variable does this for OpenMP threaded programs. Other threading tools may use a different technique (i.e. read the documentation).&lt;BR /&gt;&lt;BR /&gt;Most operating systems have the concept of Environment Variables (Windows/Solaris/Linux do). A process inherits the environment variables from which it is run. Typically a system has system wide environment variables and the user runs applications (processes) within a command shell (CMD on Windows) and this command shell starts with the environment variables of the environment in which it was spawned from, and subsequent to start, the command shell (copies of)environment variables can be added to, deleted, or changed.&lt;BR /&gt;&lt;BR /&gt;On Windows, you can (stepse vary depending of version of Windows)perform: &lt;BR /&gt;&lt;BR /&gt; Start | Control Pannel | System | Advanced | Environment Variables | User Variables | New&lt;BR /&gt;&lt;BR /&gt;And in there add OMP_NUM_THREADS as variable name and 10 as value.&lt;BR /&gt;&lt;BR /&gt;*** Then rember you did this *** when you next project doesn't use all 16 cores.&lt;BR /&gt;&lt;BR /&gt;Alternately, you can create aBatch file (command script) toissue:&lt;BR /&gt;&lt;BR /&gt; SET OMP_NUM_THREADS=10&lt;BR /&gt; YourProgramName.exe&lt;BR /&gt;&lt;BR /&gt;Then create a shortcut to the batch file and launch your application that way. Now the limitation only applies to the application launched by way of the shortcut.&lt;BR /&gt;&lt;BR /&gt;Linux has similar techniques.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thanks&lt;BR /&gt;But i want to use Java (JVM) not OpenMP to use less cores. Any idea please? &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Mar 2009 17:53:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887266#M3586</guid>
      <dc:creator>allo6</dc:creator>
      <dc:date>2009-03-05T17:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887267#M3587</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417163"&gt;allo6&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Thanks&lt;BR /&gt;But i want to use Java (JVM) not OpenMP to use less cores. Any idea please? &lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;OpenMP is not an application. It is a threading model tool used to build applications.&lt;BR /&gt;&lt;BR /&gt;IF (capitals to stress) your JVM is multi-threaded AND IF the multi-threaded code were compiled using OpenMP as threading tool THEN setting the OMP_NUM_THREADS=10 will fix the problem.&lt;BR /&gt;&lt;BR /&gt;IF your JVM is NOT multi-threaded AND if you run a collection of JVMs AND if you want these collections of JVMs to run ONLY with a sub-set of cores THEN look at using process affinity to restrict each JVM to a subset of 10 cores on your system.&lt;BR /&gt;&lt;BR /&gt;On Windows, run the TaskManager | Processes | Click on title tab "Image Name" to sort alphabetically | Right-click on 1st JVM and set the affinity mask to the cores you want. Repete for all JVMs.&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;On Windows, in the header of the applicaiton, there exists two bit masks. These contain affinity masks (one is preferred the other is required). Some time spent with Google will get you the information you need to set this mask.&lt;BR /&gt;&lt;BR /&gt;On Linux, from a command line, you can issue (our use option) that in effect says "for all processes spawned from this shell, restrict it to this xxxx affinity mask"&lt;BR /&gt;&lt;BR /&gt;Windows may have a similar thing (google is your friend).&lt;BR /&gt;&lt;BR /&gt;The problem you are having in getting the information you want, is you are not specifying your circumstances to the extent necessary to inform the viewers of this forum with the information they need to provide you with the answer you want.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Mar 2009 18:27:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887267#M3587</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-03-05T18:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887268#M3588</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417163"&gt;allo6&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; But i want to use Java (JVM) not OpenMP to use less cores. Any idea please? &lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;I believe your JVM must have such command line parameter. Investigate the list of JVM's command line parameters.&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Mar 2009 19:35:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887268#M3588</guid>
      <dc:creator>Dmitry_Vyukov</dc:creator>
      <dc:date>2009-03-05T19:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887269#M3589</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;OpenMP is not an application. It is a threading model tool used to build applications.&lt;BR /&gt;&lt;BR /&gt;IF (capitals to stress) your JVM is multi-threaded AND IF the multi-threaded code were compiled using OpenMP as threading tool THEN setting the OMP_NUM_THREADS=10 will fix the problem.&lt;BR /&gt;&lt;BR /&gt;IF your JVM is NOT multi-threaded AND if you run a collection of JVMs AND if you want these collections of JVMs to run ONLY with a sub-set of cores THEN look at using process affinity to restrict each JVM to a subset of 10 cores on your system.&lt;BR /&gt;&lt;BR /&gt;On Windows, run the TaskManager | Processes | Click on title tab "Image Name" to sort alphabetically | Right-click on 1st JVM and set the affinity mask to the cores you want. Repete for all JVMs.&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;On Windows, in the header of the applicaiton, there exists two bit masks. These contain affinity masks (one is preferred the other is required). Some time spent with Google will get you the information you need to set this mask.&lt;BR /&gt;&lt;BR /&gt;On Linux, from a command line, you can issue (our use option) that in effect says "for all processes spawned from this shell, restrict it to this xxxx affinity mask"&lt;BR /&gt;&lt;BR /&gt;Windows may have a similar thing (google is your friend).&lt;BR /&gt;&lt;BR /&gt;The problem you are having in getting the information you want, is you are not specifying your circumstances to the extent necessary to inform the viewers of this forum with the information they need to provide you with the answer you want.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thanks dear, i got the answer in your last reply, Mow hopefully will be able to restrict core for JVM, Thanks&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Mar 2009 10:07:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887269#M3589</guid>
      <dc:creator>allo6</dc:creator>
      <dc:date>2009-03-06T10:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887270#M3590</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="margin-top: 5px; width: 100%;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/417163"&gt;allo6&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;
&lt;DIV class="pad5x10"&gt;Is there any way that i can turn off any number of cores e.g. i want to use 10 cores out of available 32 cores in multicore machine. Is it possible?&lt;BR /&gt;&lt;BR /&gt;Also is it possible for example JVM to use 2 cores on Quad core machine ? &lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/DIV&gt;
&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
If you are trying to restrict the number of processors recognized by the operating system, and are using Windows, you could try the &lt;STRONG&gt;/numprocs=&lt;EM&gt;number&lt;/EM&gt;&lt;/STRONG&gt; switch in the &lt;EM&gt;boot.ini&lt;/EM&gt;. This switch will limit the number of processors used by Windows. It is useful for performance testing, and troubleshooting hardware issues related to defective CPUs.&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Mar 2009 16:45:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887270#M3590</guid>
      <dc:creator>mmissana</dc:creator>
      <dc:date>2009-03-10T16:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887271#M3591</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
In WinAPI you may play with SetProcessAffinityMask. Using this function you may set processors (cores) on which threads of process may run.&lt;BR /&gt;&lt;BR /&gt;M&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Mar 2009 17:12:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887271#M3591</guid>
      <dc:creator>Marcin_Prochownik</dc:creator>
      <dc:date>2009-03-10T17:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Restricting Number of Cores</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887272#M3592</link>
      <description>&lt;BR /&gt;I've recently uploaded a video showing how to change the number of cores using Windows Vista affinity settings. You can do the same for JVM and you will restrict the number of cores. However, you have to take into account L2 and L3 cache issues.&lt;BR /&gt;&lt;BR /&gt;This is the link to my video &lt;A href="http://www.youtube.com/watch?v=-Jfg3IHBNS0"&gt;http://www.youtube.com/watch?v=-Jfg3IHBNS0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It includes a book promotion. However, you can stop it before the promotion :)&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Gastn Hillar</description>
      <pubDate>Wed, 11 Mar 2009 22:17:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Restricting-Number-of-Cores/m-p/887272#M3592</guid>
      <dc:creator>gaston-hillar</dc:creator>
      <dc:date>2009-03-11T22:17:00Z</dc:date>
    </item>
  </channel>
</rss>

