OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

win7 64bit crash in clGetContextInfo(..., CL_CONTEXT_PROPERTIES, ... )

jonwright
Beginner
699 Views
Hello,

I have been trying to compile pyopencl for windows 64 bit, so using msvc9 for 64 bit from the platform SDK. The problem boils down to a crash on clGetContextInfo which I've tried to reduce below. Can you confirm whether you also see the crash and whether it is my faulty code or a glitch in the SDK?
Many thanks,
Jon
Details in here:
0 Kudos
4 Replies
Evgeny_F_Intel
Employee
699 Views

hi Jon,

Thanks for you report.

Please check thatOpenCL APIsreturn valid context handles.

Evgeny

0 Kudos
jonwright
Beginner
699 Views
Thanks for your reply, I modified the code to check the context handle it seems OK. A call to get CL_CONTEXT_DEVICES also works using this handle. It came from a stripped down test case arising from a crash on the pyopencl test suite:
size_t devices_size;
cl_int errcode_ret = -42;
// ... snip what is same as in original code attached above...
hContext = clCreateContext( NULL, 1,
&cdDevice, NULL, NULL, &errcode_ret );
if( errcode_ret == CL_SUCCESS) printf("Context OK\n");
errcode_ret = clGetContextInfo( hContext, CL_CONTEXT_DEVICES,
0, NULL, &devices_size);
if( errcode_ret == CL_SUCCESS) printf("CL_CONTEXT_DEVICES OK\n");
clGetContextInfo( hContext, CL_CONTEXT_PROPERTIES,
0, NULL, &size );
The output I get is:
Number of platforms 2
id=0 CL_PLATFORM_NAME=NVIDIA CUDA
id=1 CL_PLATFORM_NAME=Intel OpenCL
Intel platform is 1
Context OK
CL_CONTEXT_DEVICES OK
... and it crashes on the call with CL_CONTEXT_PROPERTIES. Are you able to reproduce this behaviour or do I have something bad in my setup?
Many thanks,
Jon
0 Kudos
Shoham_L_Intel
Employee
699 Views
Hi Jon

I am checking your issue. Everything looks by the book spec wise, and I couldn't yet recreate it, but I still have some tests to run.

In the meantime, I see that you also have NVidia OpenCL installed. Does this issue also appear when only the Intel SDK is enabled?

Shoham
0 Kudos
Rami_J_Intel
Employee
699 Views
Hi Jon;
This is a known bug at the current release of OpenCL SDK; The bug occurs when querying for context properties which where specified as NULL at context creation time, using the clGetContextInfo CL API.
This bug will be resolved at next release of the SDK.
Thanks
Rami
0 Kudos
Reply