<?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 Problem with reducers and array notation (__sec_reduce_min) in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742315#M932</link>
    <description>Hello Tim,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am sorry, but I do not understand how we will exceed array bounds..&lt;BR /&gt;&lt;BR /&gt;A[0:5] implies we start at A[0] and access&amp;nbsp;5 elements&amp;nbsp;starting at A[0], so in essence, we are&amp;nbsp;trying to find the min of A[0], A[1], A[2], A[3] and A[4].&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Balaji V. Iyer.&amp;nbsp;</description>
    <pubDate>Sat, 11 Aug 2012 02:16:17 GMT</pubDate>
    <dc:creator>Balaji_I_Intel</dc:creator>
    <dc:date>2012-08-11T02:16:17Z</dc:date>
    <item>
      <title>Problem with reducers and array notation (__sec_reduce_min)</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742312#M929</link>
      <description>Hi,&lt;DIV&gt;I tried to create an example finding the minimum of values in an array using the __sec_reduce_min()-reducer. However, i got various error messages that i believe point out some bugs. I used the latest version of the cilk-branch (downloaded today, 21:00 EST) only with the flags -lcilkrts and -fcilkplus. I am running a Fedora 16 x86-64.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[cpp]using namespace std;

int main(int argc, char** argv) {
        double* A = new double[5]; 
        for (int i = 0; i &amp;lt; 5; i++) A&lt;I&gt; = i;
        __sec_reduce_min(A[0:5]);
        return 0;
        
}[/cpp]&lt;/I&gt;&lt;/PRE&gt; &lt;/DIV&gt;&lt;DIV&gt;This code produces the following error:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&lt;DIV id="_mcePaste"&gt;test.cpp: In function ‘int main(int, char**)’:&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;test.cpp:18:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2055&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;}&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;&amp;nbsp;^&lt;/DIV&gt;&lt;DIV id="_mcePaste"&gt;test.cpp: In function ‘int main(int, char**)’:test.cpp:18:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:2055 } ^&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;If you change the line with the reducer to&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;[cpp]double myvar = __sec_reduce_min(A[0:5]);[/cpp]&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The error message becomes:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;test.cpp: In function ‘int main(int, char**)’:&lt;/DIV&gt;&lt;DIV&gt;test.cpp:15:1: internal compiler error: in get_expr_operands, at tree-ssa-operands.c:1001&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;^&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I actually got a third error message in another function. I was trying to build a k-means implementation. Unfortunately, i can't reproduce the error; i used an older version of cilk to compile; now, when i use the latest version, it produces the second error message i wrote. I assume, that the third bug is already fixed. If i find it, i will post it.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 Aug 2012 20:04:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742312#M929</guid>
      <dc:creator>leifblaese</dc:creator>
      <dc:date>2012-08-10T20:04:59Z</dc:date>
    </item>
    <item>
      <title>Problem with reducers and array notation (__sec_reduce_min)</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742313#M930</link>
      <description>Hello Leif,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have reproduced the problem. I will get back to you as soon as I fix it.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Balaji V. Iyer.</description>
      <pubDate>Fri, 10 Aug 2012 21:41:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742313#M930</guid>
      <dc:creator>Balaji_I_Intel</dc:creator>
      <dc:date>2012-08-10T21:41:14Z</dc:date>
    </item>
    <item>
      <title>Problem with reducers and array notation (__sec_reduce_min)</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742314#M931</link>
      <description>&lt;OL class="dp-cpp" start="1"&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;double*&amp;nbsp;A&amp;nbsp;=&amp;nbsp;new&amp;nbsp;double[5];&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/LI&gt;&lt;LI class="alt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for&amp;nbsp;(int&amp;nbsp;i&amp;nbsp;=&amp;nbsp;0;&amp;nbsp;i&amp;nbsp;&amp;lt;&amp;nbsp;5;&amp;nbsp;i++)&amp;nbsp;A&lt;I&gt;&amp;nbsp;=&amp;nbsp;i;&amp;nbsp;&amp;nbsp;&lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;__sec_reduce_min(A[0:5]);&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Sorry, I still find the notation difficult to remember, particularly with plain C99 or C++ next to CEAN.&amp;nbsp; In the notations of other languages, you would exceed the array bounds in this reduction.&amp;nbsp; Of course, in CEAN this means 5 elements, ending with A[4].&lt;/P&gt;</description>
      <pubDate>Sat, 11 Aug 2012 00:55:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742314#M931</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-08-11T00:55:36Z</dc:date>
    </item>
    <item>
      <title>Problem with reducers and array notation (__sec_reduce_min)</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742315#M932</link>
      <description>Hello Tim,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am sorry, but I do not understand how we will exceed array bounds..&lt;BR /&gt;&lt;BR /&gt;A[0:5] implies we start at A[0] and access&amp;nbsp;5 elements&amp;nbsp;starting at A[0], so in essence, we are&amp;nbsp;trying to find the min of A[0], A[1], A[2], A[3] and A[4].&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Balaji V. Iyer.&amp;nbsp;</description>
      <pubDate>Sat, 11 Aug 2012 02:16:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742315#M932</guid>
      <dc:creator>Balaji_I_Intel</dc:creator>
      <dc:date>2012-08-11T02:16:17Z</dc:date>
    </item>
    <item>
      <title>Problem with reducers and array notation (__sec_reduce_min)</title>
      <link>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742316#M933</link>
      <description>Hello Leif,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; I have fixed the problem and checked in&amp;nbsp;a patch to Cilk Plus gcc. Please let me know if you have further issues.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Balaji V. Iyer.</description>
      <pubDate>Sat, 11 Aug 2012 21:07:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Problem-with-reducers-and-array-notation-sec-reduce-min/m-p/742316#M933</guid>
      <dc:creator>Balaji_I_Intel</dc:creator>
      <dc:date>2012-08-11T21:07:39Z</dc:date>
    </item>
  </channel>
</rss>

