<?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 GPU compilation : trap situation ? in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925464#M1495</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I try to run my kernel on Intel GPU but during compilation I got the following error :&lt;/P&gt;

&lt;P&gt;"error: trap situation detected...aborting"&lt;/P&gt;

&lt;P&gt;"error: midlevel compiler failed build."&lt;/P&gt;

&lt;P&gt;What that ?&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2013 14:48:05 GMT</pubDate>
    <dc:creator>Polar01</dc:creator>
    <dc:date>2013-12-02T14:48:05Z</dc:date>
    <item>
      <title>GPU compilation : trap situation ?</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925464#M1495</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I try to run my kernel on Intel GPU but during compilation I got the following error :&lt;/P&gt;

&lt;P&gt;"error: trap situation detected...aborting"&lt;/P&gt;

&lt;P&gt;"error: midlevel compiler failed build."&lt;/P&gt;

&lt;P&gt;What that ?&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2013 14:48:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925464#M1495</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2013-12-02T14:48:05Z</dc:date>
    </item>
    <item>
      <title>Not sure about the trap</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925465#M1496</link>
      <description>&lt;P&gt;Not sure about the trap message but looks like the compiler crashed for some reason. Can you attach the kernel? Or isolate the crash to the snippet of code that is causing the crash?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Raghu&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2013 17:13:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925465#M1496</guid>
      <dc:creator>Raghupathi_M_Intel</dc:creator>
      <dc:date>2013-12-03T17:13:58Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925466#M1497</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It is for a commercial software... so, I cannot put the kernel publicly on the forum.&lt;/P&gt;

&lt;P&gt;Please, can you contact my by email, then I will send you the kernel ?&lt;/P&gt;

&lt;P&gt;Krys&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2013 07:55:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925466#M1497</guid>
      <dc:creator>Polar01</dc:creator>
      <dc:date>2013-12-04T07:55:35Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925467#M1498</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I post this because I faced the same problem and I thought that it would be useful to share my solution, as this is the only post I have found about it.&lt;BR /&gt;
	The problem is quite silly (and, somehow, embarrasing).&lt;BR /&gt;
	I could isolate the line that is crashing my code with the same problem. It is:&lt;/P&gt;

&lt;P&gt;unsigned int A[2];&lt;BR /&gt;
	A[0] = 1; //This does not compile. Trap Situation error.&lt;/P&gt;

&lt;P&gt;However, replacing the previous line by this line, it compiled:&lt;/P&gt;

&lt;P&gt;unsigned int A[2];&lt;BR /&gt;
	A[0] = 0; //This does compile&lt;/P&gt;

&lt;P&gt;That was strange and I spent some time working around the declaration of A, which I felt that was somehow wrong.&lt;BR /&gt;
	In fact, assigning to A[0] any value, expression or variable different than 0, results in a Trap Situation.&lt;/P&gt;

&lt;P&gt;After some time, I figured out that I had a wrong declaration of variable unrelated to A:&lt;/P&gt;

&lt;P&gt;unsigned int currentSnapshot[0]; //Wrong declaration&lt;/P&gt;

&lt;P&gt;This declaration was undetected by the compiler and resulted in an unexpected behavior with the error messages:&lt;/P&gt;

&lt;P&gt;"error: trap situation detected...aborting"&lt;BR /&gt;
	"error: midlevel compiler failed build."&lt;/P&gt;

&lt;P&gt;I hope that this helps someone who is facing similar problems.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2014 09:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/GPU-compilation-trap-situation/m-p/925467#M1498</guid>
      <dc:creator>Alejandro_V_</dc:creator>
      <dc:date>2014-01-17T09:06:00Z</dc:date>
    </item>
  </channel>
</rss>

