<?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: Sending instructions to one core in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893489#M3888</link>
    <description>Thanks.  I had thought of setting affinity but wasn't sure whether or not the RDMSR would just be sent to the first core anyway.  So I will get the temperature of the second core by sending IA32_THERM_STATUS on a thread that's bound to the second core?  Or are you not certain of that?</description>
    <pubDate>Sat, 16 Dec 2006 04:59:11 GMT</pubDate>
    <dc:creator>xt_knight</dc:creator>
    <dc:date>2006-12-16T04:59:11Z</dc:date>
    <item>
      <title>Sending instructions to one core</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893487#M3886</link>
      <description>I was wondering how to send a specific instruction to one core in a dual-core CPU.  For example, I want to read the thermal status of the second core.  I can't find out how to send a rdmsr instruction to the second core.
&lt;BR /&gt;
&lt;BR /&gt;Is there another way by which I am supposed to be able to retrieve the temperature from the DTS (digital temperature sensor) of one core?</description>
      <pubDate>Fri, 15 Dec 2006 10:54:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893487#M3886</guid>
      <dc:creator>xt_knight</dc:creator>
      <dc:date>2006-12-15T10:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sending instructions to one core</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893488#M3887</link>
      <description>&lt;P&gt;A common way of doing this is to create a thread that is forced to run on the target core. If using Windows, for example, look at the SetThreadAffinityMask() function.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2006 23:42:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893488#M3887</guid>
      <dc:creator>James_M_Intel1</dc:creator>
      <dc:date>2006-12-15T23:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sending instructions to one core</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893489#M3888</link>
      <description>Thanks.  I had thought of setting affinity but wasn't sure whether or not the RDMSR would just be sent to the first core anyway.  So I will get the temperature of the second core by sending IA32_THERM_STATUS on a thread that's bound to the second core?  Or are you not certain of that?</description>
      <pubDate>Sat, 16 Dec 2006 04:59:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893489#M3888</guid>
      <dc:creator>xt_knight</dc:creator>
      <dc:date>2006-12-16T04:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sending instructions to one core</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893490#M3889</link>
      <description>I've not tested it, but I believe that is correct.</description>
      <pubDate>Sat, 16 Dec 2006 05:05:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893490#M3889</guid>
      <dc:creator>James_M_Intel1</dc:creator>
      <dc:date>2006-12-16T05:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sending instructions to one core</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893491#M3890</link>
      <description>if you are on Linux, you can write a kernel module with the following:
int temperature[NR_CPUS];

void get_temp(int cpu)
{
  int this_cpu = smp_processor_id();
  if(this_cpu == cpu)
    __temp_read(NULL);
  else
    smp_call_function_single(cpu,__temp_read,NULL,1,1);
  return temperature[cpu];
}

void __temp_read(void *info)
{
  u32 low,high;
  int cpu = get_cpu();
  rdmsr(IA32_THERM_STATUS,low,high)
  temperature[cpu] = low | MASK; // get temp
}</description>
      <pubDate>Mon, 22 Sep 2008 21:05:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893491#M3890</guid>
      <dc:creator>prasadae</dc:creator>
      <dc:date>2008-09-22T21:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sending instructions to one core</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893492#M3891</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/304922"&gt;prasadae&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; if you are on Linux, you can write a kernel module with the following: int temperature[NR_CPUS];  void get_temp(int cpu) {   int this_cpu = smp_processor_id();   if(this_cpu == cpu)     __temp_read(NULL);   else     smp_call_function_single(cpu,__temp_read,NULL,1,1);   return temperature[cpu]; }  void __temp_read(void *info) {   u32 low,high;   int cpu = get_cpu();   rdmsr(IA32_THERM_STATUS,low,high)   temperature[cpu] = low | MASK; // get temp } &lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or just use Linux NUMA API:&lt;/P&gt;&lt;P&gt;&lt;A href="http://linux.die.net/man/3/numa_run_on_node"&gt;http://linux.die.net/man/3/numa_run_on_node&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;numa_run_on_node_mask&lt;/STRONG&gt;() runs the current thread and its children only on nodes specified in &lt;/EM&gt;&lt;EM&gt;nodemask. They will not migrate to CPUs of other nodes until the node affinity is reset with a new call to &lt;STRONG&gt;numa_run_on_node_mask&lt;/STRONG&gt;(). Passing &lt;/EM&gt;&lt;EM&gt;numa_all_nodes permits the kernel to schedule on all nodes again.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2008 12:16:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/Sending-instructions-to-one-core/m-p/893492#M3891</guid>
      <dc:creator>Dmitry_Vyukov</dc:creator>
      <dc:date>2008-10-02T12:16:55Z</dc:date>
    </item>
  </channel>
</rss>

