<?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 Enabling/disabling Hyperthreading? in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912874#M4721</link>
    <description>I'm wondering if someone has answers to the following questions.&lt;BR /&gt;
&lt;BR /&gt;
1. Is there some way to enable or disable hyperthreading, while the machine is running?&lt;BR /&gt;
2. While the machine is runnng, is there a utility that tells me whether hyperthreading is on or off?&lt;BR /&gt;
&lt;BR /&gt;
   - Thanks,&lt;BR /&gt;
   - Rao.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;</description>
    <pubDate>Thu, 31 Aug 2006 02:08:50 GMT</pubDate>
    <dc:creator>rao</dc:creator>
    <dc:date>2006-08-31T02:08:50Z</dc:date>
    <item>
      <title>Enabling/disabling Hyperthreading?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912874#M4721</link>
      <description>I'm wondering if someone has answers to the following questions.&lt;BR /&gt;
&lt;BR /&gt;
1. Is there some way to enable or disable hyperthreading, while the machine is running?&lt;BR /&gt;
2. While the machine is runnng, is there a utility that tells me whether hyperthreading is on or off?&lt;BR /&gt;
&lt;BR /&gt;
   - Thanks,&lt;BR /&gt;
   - Rao.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Aug 2006 02:08:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912874#M4721</guid>
      <dc:creator>rao</dc:creator>
      <dc:date>2006-08-31T02:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling/disabling Hyperthreading?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912875#M4722</link>
      <description>In case these answer part of your question:&lt;BR /&gt;Not knowing whether you count reboot as "while machine is running," you can reboot with the number of processors set to number of physical cores. If your BIOS enumerates logical processors in the correct order, this will hide the additional hyperthreaded logical processors. This does not recover the ITLB used by those logical processors, but it is essentially the same in effect for dual core processors as disabling HT in BIOS.&lt;BR /&gt;The usual ways to see if hyperthreading is enabled are with the performance monitoring utilities, such as top or Windows Task Manager. In linux, you could check /proc/cpuinfo, where hyperthreaded logical CPUs are referred to as "siblings," but will appear only with HT enabled.&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Aug 2006 05:11:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912875#M4722</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2006-08-31T05:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Enabling/disabling Hyperthreading?</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912876#M4723</link>
      <description>&lt;P&gt;I would suggest the following:&lt;/P&gt;
&lt;P&gt;Set the environment variable &lt;SPAN class="Code"&gt;OMP_NUM_THREADS to the number of processor cores.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;Depending on your operating system the OpenMP threads may be satisfactorily distributed amoung the processor cores.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;If this is not satisfactory then augment &lt;SPAN class="Code"&gt;OMP_NUM_THREADS by creating your own environment variable that specifies the processor affinities. e.g.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt; OMP_THREAD_AFFINITIES = 0 2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;For this you will need to write an initialization routine (conditionaly compiled in when compiling for OpenMP) that checks for the presense of OMP_THREAD_AFFINITIES.&lt;BR /&gt;If present, then thread processor affinities are set to the order specified. You will have to specify what to do when &lt;SPAN class="Code"&gt;OMP_NUM_THREADS is not equal to the list specified by OMP_THREAD_AFFINITIES. Example:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;If &lt;SPAN class="Code"&gt;OMP_NUM_THREADS .lt. list specified by OMP_THREAD_AFFINITIES then ignore excess entries in list.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;If &lt;SPAN class="Code"&gt;OMP_NUM_THREADS .gt. list specified by OMP_THREAD_AFFINITIES then:&lt;BR /&gt;a) Stop assigning affinities (remainder threads unassigned)&lt;BR /&gt;b) rewind list specified by OMP_THREAD_AFFINITIES and continue assigning affinities.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;You may also want to consider having an entry in the list specified by OMP_THREAD_AFFINITIES indicating no preference. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt; OMP_THREAD_AFFINITIES = 0 2 ? 4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;My preference was to use a script file as I have more complex requirements. My system has NUMA archetecture and I wanted to have much more control over the thread allocation. There are other issues that can be handled in the script file method over that which you can specify with environment variables (plus you are not cluttering up the environment variables). A sample of my script file follows:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;============================================&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;! Threads=n&lt;BR /&gt;! Optional command. Must be in the range of 1 to number of processors&lt;BR /&gt;! This is used to specify the number of main level threads&lt;BR /&gt;! If not specified Threads defaults to the number of processors&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;Threads=4Optional argument restricting max number of main level threads&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;! Note, for SEV2 it is detrimental to performance to request more threads than what&lt;BR /&gt;! will be available at run time.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN class="Code"&gt;&lt;SPAN class="Code"&gt;
&lt;P&gt;&lt;BR /&gt;! Affinity=b&lt;BR /&gt;! Optional command.&lt;BR /&gt;! Must have T or F for True/False&lt;BR /&gt;! Default is T&lt;BR /&gt;! If present forces (True) or not (False) processor affinity to thread&lt;/P&gt;
&lt;P&gt;Affinity=T&lt;/P&gt;
&lt;P&gt;! BlockTime=n&lt;BR /&gt;! Optional command.&lt;BR /&gt;! Default = 0&lt;BR /&gt;! Maximum time in miliseconds
 to burn waiting for additional work&lt;BR /&gt;BlockTime=0&lt;/P&gt;
&lt;P&gt;! Nested=b&lt;BR /&gt;! Optional command.&lt;BR /&gt;! Must have T or F for True/False&lt;BR /&gt;! Default is T&lt;BR /&gt;Nested=T&lt;/P&gt;
&lt;P&gt;! Dynamic=b&lt;BR /&gt;! Optional command.&lt;BR /&gt;! Must have T or F for True/False&lt;BR /&gt;! Default is F&lt;BR /&gt;! True permits the runtime system to alter the number of threads&lt;BR /&gt;! between 1 and the number requested.&lt;BR /&gt;Dynamic=F&lt;/P&gt;
&lt;P&gt;! Reserve=n&lt;BR /&gt;! Optional command.&lt;BR /&gt;! Default = 0&lt;BR /&gt;! Number of processors to reserve (beginning a 0) from thread&lt;BR /&gt;! assignments to tethers. &lt;BR /&gt;Reserve=0Optional argument, number of processors to reserve&lt;/P&gt;
&lt;P&gt;! Bias=n&lt;BR /&gt;! Optional command. &lt;BR /&gt;! Used to specify number of threads that will receive preload weights&lt;BR /&gt;! If not specified the default is Bias=0&lt;BR /&gt;! If specified n must be in range of 0 to number of processors-1&lt;BR /&gt;! And the Bias=n line must be followed by n lines indicating processing&lt;BR /&gt;! weights.&lt;/P&gt;
&lt;P&gt;Bias=3Optional argument supplying the number of preload weights&lt;BR /&gt;100&lt;BR /&gt;0&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;! Objects=n&lt;BR /&gt;! Optional section. (Currently not implimented)&lt;BR /&gt;! If not specified all Objects have same weighting for thread assignment.&lt;BR /&gt;! If specified n must be same as number of Objects in INGOSS.&lt;BR /&gt;! And the Objects=n line must be followed by n lines indicating processing&lt;BR /&gt;! weights and an optional number of second level threads to assign to Object.&lt;BR /&gt;!&lt;BR /&gt;! The format of the weights lines are:&lt;BR /&gt;! w&lt;BR /&gt;! or&lt;BR /&gt;! w,m&lt;BR /&gt;!&lt;BR /&gt;! If of form "w" then w is an arbitrary number indicating a relative number&lt;BR /&gt;! (to other weights) of processing load. And m is implicitly set to 1.&lt;BR /&gt;! You could specify for w a percent or mill rate. Or perhaps use a function&lt;BR /&gt;! based on the number of attachment points and/or control options 3DOF/6DOF, etc...&lt;BR /&gt;!&lt;BR /&gt;! If of form "w,m" then m must be in the range of 1 to number of processors&lt;BR /&gt;!&lt;BR /&gt;! Note, it is detrimental to performance to request more threads than what&lt;BR /&gt;! will be available at run time.&lt;/P&gt;
&lt;P&gt;Objects=6&lt;BR /&gt;! Object 1 weight&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;! Object 2 weight&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;! Object 3 weight&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;! Object 4 weight&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;! Object 5 weight&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;! Object 6 weight&lt;BR /&gt;0&lt;/P&gt;
&lt;P&gt;! Tethers=n&lt;BR /&gt;! Optional section.&lt;BR /&gt;! If not specified all Tethers have same weighting for thread assignment.&lt;BR /&gt;! If specified n must be same as number of Tethers in INGOSS.&lt;BR /&gt;! And the Tethers=n line must be followed by n lines indicating processing&lt;BR /&gt;! weights and an optional number of second level threads to assign to Tether.&lt;BR /&gt;!&lt;BR /&gt;! The format of the weights lines are&lt;BR /&gt;! w&lt;BR /&gt;! or&lt;BR /&gt;! w,d&lt;BR /&gt;! or&lt;BR /&gt;! w,d,p&lt;BR /&gt;!&lt;BR /&gt;! If of form "w" then w is an arbitrary number indicating a relative number&lt;BR /&gt;! (to other weights) of processing load. And m is implicitly set to 1.&lt;BR /&gt;! You could specify for w a percent or mill rate. Or perhaps use a function&lt;BR /&gt;! based on the number of beads and/or control options deployment, etc...&lt;BR /&gt;!&lt;BR /&gt;! If of form "w,d" then "d" is the number of ends with deployment (0:2)&lt;BR /&gt;! and if d=2 p assumes 2&lt;/P&gt;
&lt;P&gt;! If of form "w,d,p" then "d" is the number of ends with deployment (0:2)&lt;BR /&gt;! and "p" is the number of partitions. p .ge. d&lt;BR /&gt;!&lt;BR /&gt;! Additional notes.&lt;BR /&gt;!&lt;BR /&gt;! For SEV2 configurations weights that work well are computed by&lt;BR /&gt;! w=number of beads (*1.2 if of t
ype with deployment scenario)&lt;BR /&gt;! You may also want to factor in Aero, electro, etc...&lt;BR /&gt;!&lt;BR /&gt;Tethers=8&lt;BR /&gt;! Tether 1 weight (number of beads 100 * 120% DS1)&lt;BR /&gt;120,0,1&lt;/P&gt;
&lt;P&gt;! Tether 2 weight (number of beads)&lt;BR /&gt;100,0,1&lt;/P&gt;
&lt;P&gt;! Tether 3 weight (number of beads 100 * 120% DS1)&lt;BR /&gt;120,0,1&lt;/P&gt;
&lt;P&gt;! Tether 4 weight (number of beads 100 * 120% DS1)&lt;BR /&gt;120,0,1&lt;/P&gt;
&lt;P&gt;! Tether 5 weight (number of beads 100 * 120% DS1)&lt;BR /&gt;120,0,1&lt;/P&gt;
&lt;P&gt;! Tether 6 weight (number of beads 2000)&lt;BR /&gt;2000,0,8&lt;/P&gt;
&lt;P&gt;! Tether 7 weight (number of beads 2000 * 120% DS1)&lt;BR /&gt;2200,1,1&lt;/P&gt;
&lt;P&gt;! Tether 8 weight (number of beads 250 * 120% DS1)&lt;BR /&gt;300,1,2&lt;/P&gt;
&lt;P&gt;====================&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;</description>
      <pubDate>Thu, 31 Aug 2006 23:57:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912876#M4723</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2006-08-31T23:57:35Z</dc:date>
    </item>
    <item>
      <title>How to identify</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912877#M4724</link>
      <description>&lt;P&gt;How to identify hyperthreading is supported on intel processor on 64 bit os using c++?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 04:54:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912877#M4724</guid>
      <dc:creator>p__Rahul</dc:creator>
      <dc:date>2018-04-10T04:54:17Z</dc:date>
    </item>
    <item>
      <title>how to determine number</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912878#M4725</link>
      <description>&lt;P&gt;how to determine number number of logical processors per physical processor in 64 bit OS in&amp;nbsp; 64 bit c++ application?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 04:55:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Enabling-disabling-Hyperthreading/m-p/912878#M4725</guid>
      <dc:creator>p__Rahul</dc:creator>
      <dc:date>2018-04-10T04:55:53Z</dc:date>
    </item>
  </channel>
</rss>

