<?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: Itanium2 CPU(Madison) calculation problem in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941662#M97509</link>
    <description>As your PA-RISC compilation should have noted, 5000000000 is too large an integer&lt;BR /&gt;value for i.  Mine said (on PA):&lt;BR /&gt;   cc: "div.c", line 27: warning 602:&lt;BR /&gt;   Integer constant exceeds its storage.&lt;BR /&gt;&lt;BR /&gt;i, BTW, is a double (floating point) ...&lt;BR /&gt;which is bad (from the name, it should&lt;BR /&gt;be an int of some kind).&lt;BR /&gt;&lt;BR /&gt;Did you really want i to be a 64-bit integer?&lt;BR /&gt;(If so, add "LL" suffix to 5000000000&lt;BR /&gt;and make i "long long int", or "int64_t")&lt;BR /&gt;&lt;BR /&gt;If this helps, don't forget points, please :)&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 09 Feb 2007 20:22:43 GMT</pubDate>
    <dc:creator>Stan Sieler</dc:creator>
    <dc:date>2007-02-09T20:22:43Z</dc:date>
    <item>
      <title>Itanium2 CPU(Madison) calculation problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941660#M97507</link>
      <description>&lt;P&gt;My customer complain about Itanium CPU(Madison) compared to SD PA-RISC(1.1GHz).&lt;BR /&gt;Here is CPU info below.&lt;BR /&gt;Model : SD&lt;BR /&gt;CPU info:&lt;BR /&gt; Number of CPUs = 16&lt;BR /&gt; Clock speed = 1600 MHz&lt;BR /&gt; Bus speed = 400 MT/s&lt;BR /&gt;&lt;BR /&gt;Customer ran simple C program (+,-,*,/).&lt;BR /&gt;Here is Result.&lt;BR /&gt;&lt;BR /&gt;-------------------------------&lt;BR /&gt;plus : 18.9sec&lt;BR /&gt;minus : 18.9sec&lt;BR /&gt;multiply : 18.9sec&lt;BR /&gt;divide : 47.0sec&lt;BR /&gt;-------------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;--------------------------------&lt;BR /&gt;&lt;BR /&gt;plus : 23.1sec&lt;BR /&gt;minus : 23.1sec&lt;BR /&gt;multiply : 23.1sec&lt;BR /&gt;divide : 23.1sec&lt;BR /&gt;--------------------------------&lt;BR /&gt;Customer ask me why divide is so slow on Itanium. Is there any way to reduce time?&lt;BR /&gt;&lt;BR /&gt;Here is source code and complie option.&lt;BR /&gt;#include &lt;BR /&gt;#include &lt;BR /&gt;#include &lt;BR /&gt;#include &lt;BR /&gt;#include &lt;BR /&gt;#include &lt;BR /&gt;double start_time,end_time,t_runtime;&lt;BR /&gt;double i,j;&lt;BR /&gt;double gettime();&lt;BR /&gt;main(argc, argv)&lt;BR /&gt;int argc;&lt;BR /&gt;char *argv[];&lt;BR /&gt;{&lt;BR /&gt; char command[80];&lt;BR /&gt; if(argc != 1 ) {&lt;BR /&gt; printf(" Usage : bmt1-4 \n");&lt;BR /&gt; exit(0);&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; j=1;&lt;BR /&gt; start_time = gettime();&lt;BR /&gt; for(i = 1; i &amp;lt; 5000000000; i++ ) {&lt;BR /&gt; j = j/i;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; end_time = gettime();&lt;BR /&gt; t_runtime = end_time-start_time;&lt;BR /&gt; printf("Running Count [%f] Time:[%f]\n",i, t_runtime);&lt;BR /&gt; exit(0);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;double gettime()&lt;BR /&gt;{&lt;BR /&gt; struct timeval tv;&lt;BR /&gt; (void) gettimeofday (&amp;amp;tv, (struct timezone *) 0);&lt;BR /&gt; return ((double) tv.tv_sec + (1.0e-6 * (double) tv.tv_usec));&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;cc -DD64 +O3 -o div "cpu_cal_divi.c"&lt;BR /&gt;&lt;BR /&gt;complier version 6.13&lt;BR /&gt;&lt;BR /&gt;Any one can help me?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;P.S. This thread has been moved from HP 9000 to HP-UX &amp;gt; languages. -HP Forum Moderator&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Aug 2014 02:40:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941660#M97507</guid>
      <dc:creator>Jeong Jin-wook</dc:creator>
      <dc:date>2014-08-21T02:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Itanium2 CPU(Madison) calculation problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941661#M97508</link>
      <description>Two things to try:&lt;BR /&gt;&lt;BR /&gt;1. You might get more joy posting this on the Itanium-dev mailing list here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/dspp/ml/ml_MailingLists_IDX/1,1275,,00.html#24" target="_blank"&gt;http://h21007.www2.hp.com/dspp/ml/ml_MailingLists_IDX/1,1275,,00.html#24&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2. HP Provide a free tool for diagnosing perf issues on Itanium - Caliper - maybe have your customer run this over the issue:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1174,00.html" target="_blank"&gt;http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1174,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Fri, 09 Feb 2007 07:14:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941661#M97508</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2007-02-09T07:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Itanium2 CPU(Madison) calculation problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941662#M97509</link>
      <description>As your PA-RISC compilation should have noted, 5000000000 is too large an integer&lt;BR /&gt;value for i.  Mine said (on PA):&lt;BR /&gt;   cc: "div.c", line 27: warning 602:&lt;BR /&gt;   Integer constant exceeds its storage.&lt;BR /&gt;&lt;BR /&gt;i, BTW, is a double (floating point) ...&lt;BR /&gt;which is bad (from the name, it should&lt;BR /&gt;be an int of some kind).&lt;BR /&gt;&lt;BR /&gt;Did you really want i to be a 64-bit integer?&lt;BR /&gt;(If so, add "LL" suffix to 5000000000&lt;BR /&gt;and make i "long long int", or "int64_t")&lt;BR /&gt;&lt;BR /&gt;If this helps, don't forget points, please :)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Feb 2007 20:22:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941662#M97509</guid>
      <dc:creator>Stan Sieler</dc:creator>
      <dc:date>2007-02-09T20:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Itanium2 CPU(Madison) calculation problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941663#M97510</link>
      <description>I forgot to mention that using a 64-bit floating point variable as a "counter" or "control variable" in a for loop is about 20 times slower than using an int64 &lt;BR /&gt;(on PA, and about 7 times slower on IPF).&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Feb 2007 20:32:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941663#M97510</guid>
      <dc:creator>Stan Sieler</dc:creator>
      <dc:date>2007-02-09T20:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Itanium2 CPU(Madison) calculation problem</title>
      <link>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941664#M97511</link>
      <description>There is no hardware floating point divide on IPF.  There is only a reciprocal approximation instruction, frcpa&lt;BR /&gt;&lt;BR /&gt;Your for-loop that only tests the divide, takes 12 bundles with nothing being able to be used in most of the instruction slots, just 12 FP instructions.&lt;BR /&gt;&lt;BR /&gt;In a real application, the other NOP slots would have some useful work being done.&lt;BR /&gt;&lt;BR /&gt;(I moved your i,j variables as locals and made sure the loop wasn't removed.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Is there any way to reduce time?&lt;BR /&gt;&lt;BR /&gt;You "reduce" it by measuring a real application, not this toy benchmark.</description>
      <pubDate>Sat, 10 Feb 2007 00:29:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/itanium2-cpu-madison-calculation-problem/m-p/3941664#M97511</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-02-10T00:29:38Z</dc:date>
    </item>
  </channel>
</rss>

