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

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

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,JonDetails in here:context.txt

5 帖子 / 0 全新

hi Jon,

Thanks for you report.

Please check thatOpenCL APIsreturn valid context handles.


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 2id=0 CL_PLATFORM_NAME=NVIDIA CUDAid=1 CL_PLATFORM_NAME=Intel OpenCLIntel platform is 1Context OKCL_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

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?


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.ThanksRami