<?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 Segmentation fault with intel opencl for linux in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/Segmentation-fault-with-intel-opencl-for-linux/m-p/1109188#M5253</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have tried to accelerate our program with intel opencl on Windows 7.The program works successfully.&lt;/P&gt;

&lt;P&gt;And now,we want to switch to Linux(with the same hardware) . So we installed the driver and&amp;nbsp; intel opencl SDK for linux.We download the sample code and also running without any fault.However, after running my own program ,it returns Segmentation fault.We use GDB to locate the fault and we get this:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;2529            status = clEnqueueNDRangeKernel(
(gdb) n
2538                NULL);
(gdb) n
2541            status=clFinish(cmdQueue1);
(gdb) p status
$2 = 0
(gdb) n

Thread 3 "GAKnot1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee418700 (LWP 3221)]&lt;/PRE&gt;

&lt;P&gt;More Details:&lt;/P&gt;

&lt;P&gt;OS:Ubuntu 16.04LTS&lt;/P&gt;

&lt;P&gt;Driver Version:1.2.0.400&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (PS:from clinfo)&lt;/P&gt;

&lt;P&gt;Devices Name:Intel(R) Core(TM) i7-6700k CPU @ 4.00GHz&amp;nbsp; (PS:from clinfo)&lt;/P&gt;

&lt;P&gt;We installed SRB4 driver package.&lt;/P&gt;

&lt;P&gt;My question is as follows:&lt;/P&gt;

&lt;P&gt;1.Does it mean the Segmentation Fault is caused by kernel?&lt;/P&gt;

&lt;P&gt;2.How to debug with kernel?Are there any tools for Ubuntu ?&lt;/P&gt;

&lt;P&gt;Thanks for your attention.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2017 07:33:13 GMT</pubDate>
    <dc:creator>wang_f_</dc:creator>
    <dc:date>2017-03-03T07:33:13Z</dc:date>
    <item>
      <title>Segmentation fault with intel opencl for linux</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Segmentation-fault-with-intel-opencl-for-linux/m-p/1109188#M5253</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have tried to accelerate our program with intel opencl on Windows 7.The program works successfully.&lt;/P&gt;

&lt;P&gt;And now,we want to switch to Linux(with the same hardware) . So we installed the driver and&amp;nbsp; intel opencl SDK for linux.We download the sample code and also running without any fault.However, after running my own program ,it returns Segmentation fault.We use GDB to locate the fault and we get this:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;2529            status = clEnqueueNDRangeKernel(
(gdb) n
2538                NULL);
(gdb) n
2541            status=clFinish(cmdQueue1);
(gdb) p status
$2 = 0
(gdb) n

Thread 3 "GAKnot1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffee418700 (LWP 3221)]&lt;/PRE&gt;

&lt;P&gt;More Details:&lt;/P&gt;

&lt;P&gt;OS:Ubuntu 16.04LTS&lt;/P&gt;

&lt;P&gt;Driver Version:1.2.0.400&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (PS:from clinfo)&lt;/P&gt;

&lt;P&gt;Devices Name:Intel(R) Core(TM) i7-6700k CPU @ 4.00GHz&amp;nbsp; (PS:from clinfo)&lt;/P&gt;

&lt;P&gt;We installed SRB4 driver package.&lt;/P&gt;

&lt;P&gt;My question is as follows:&lt;/P&gt;

&lt;P&gt;1.Does it mean the Segmentation Fault is caused by kernel?&lt;/P&gt;

&lt;P&gt;2.How to debug with kernel?Are there any tools for Ubuntu ?&lt;/P&gt;

&lt;P&gt;Thanks for your attention.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 07:33:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Segmentation-fault-with-intel-opencl-for-linux/m-p/1109188#M5253</guid>
      <dc:creator>wang_f_</dc:creator>
      <dc:date>2017-03-03T07:33:13Z</dc:date>
    </item>
    <item>
      <title>Sorry for the delayed reply.</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/Segmentation-fault-with-intel-opencl-for-linux/m-p/1109189#M5254</link>
      <description>&lt;P&gt;Sorry for the delayed reply. &amp;nbsp;Very glad you were able to get the samples to work, since this is good evidence that your install is correct.&lt;/P&gt;

&lt;P&gt;If clFinish returns 0 this should indicate that all queued commands (including the kernel execution) have finished. &amp;nbsp;However, i&lt;SPAN style="font-size: 13.008px;"&gt;t is suspicious that the segmentation fault happens right after clFinish.&lt;/SPAN&gt;&amp;nbsp;Is there any way you can send a reproducer? &amp;nbsp;Please feel free to send a private message if you don't want the code on a public forum.&lt;/P&gt;

&lt;P&gt;There is a GPU kernel debugger for Linux. &amp;nbsp;For more info: &lt;A href="https://software.intel.com/en-us/node/671870"&gt;https://software.intel.com/en-us/node/671870&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;From the Developer Guide: "It's important to use separate machines, as the debugging on the GPU takes place at real-time and the screen cannot render (is frozen) while you are debugging your kernel on the GPU."&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 01:44:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/Segmentation-fault-with-intel-opencl-for-linux/m-p/1109189#M5254</guid>
      <dc:creator>Jeffrey_M_Intel1</dc:creator>
      <dc:date>2017-03-08T01:44:40Z</dc:date>
    </item>
  </channel>
</rss>

