I would like to test my Intel Graphic HD 530 with an OpenCL code. To do that, I used the vecAdd example along with the following compilation and run command
$ cc vecAdd.c -o vecAdd.out -lOpenCL -lm
In file included from /usr/include/CL/cl.h:32,
from /usr/include/CL/opencl.h:38,
from vecAdd.c:4:
/usr/include/CL/cl_version.h:34:9: note: #pragma message: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)
34 | #pragma message("cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)")
| ^~~~~~~
vecAdd.c: In function ‘main’:
vecAdd.c:82:5: warning: ‘clCreateCommandQueue’ is deprecated [-Wdeprecated-declarations]
82 | queue = clCreateCommandQueue(context, device_id, 0, &err);
| ^~~~~
In file included from /usr/include/CL/opencl.h:38,
from vecAdd.c:4:
/usr/include/CL/cl.h:1781:1: note: declared here
1781 | clCreateCommandQueue(cl_context context,
| ^~~~~~~~~~~~~~~~~~~~
$ ./vecAdd.out
Segmentation fault (core dumped)
I am not able to find the cause of that segmentation fault. In fact, I am not sure whether there is a problem with the code or it is not possible to offload the kernel on the device. Any idea how to pinpoint the problem?
P.S: More information about the device
$ sudo lshw -numeric -C display
*-display
description: VGA compatible controller
product: HD Graphics 530 [8086:1912]
vendor: Intel Corporation [8086]