clCreateCommandQueue CL_INVALID_DEVICE

Hi,

I’m trying to run the example programs in the OpenCL 1.0 SDK. oclBandwidthTest and oclDeviceQuery seem to run just fine. Output of oclDeviceQuery is copied below, and it seems that the GPU devices are recognized. However, all of the other example programs run into errors on clCreateCommandQueue, returning a value of -33, which is CL_INVALID_DEVICE. Any ideas what may be going wrong?

FYI, I’m running on 64-bit CentOS 5.3, with an upgraded compiler gcc 4.4.1.

Thanks in advance for any help,
–Chris

oclDeviceQuery.exe Starting…

OpenCL SW Info:

CL_PLATFORM_VERSION: OpenCL 1.0
OpenCL SDK Version: 1.00.00.07

OpenCL Device Info:

There are 2 devices supporting OpenCL:

Device Tesla C1060:
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
CL_DEVICE_MAX_COMPUTE_UNITS: 30
CL_DEVICE_MAX_WORK_ITEM_SIZES: 512 / 512 / 64
CL_DEVICE_MAX_WORK_GROUP_SIZE: 512
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1 MHz
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_GLOBAL_MEM_SIZE: 4095 MByte
CL_DEVICE_LOCAL_MEM_SIZE: 16 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_EXTENSIONS:
cl_khr_byte_addressable_store
cl_nv_compiler_options
cl_nv_device_attribute_query
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics

Device Tesla C1060:
CL_DEVICE_TYPE: CL_DEVICE_TYPE_GPU
CL_DEVICE_MAX_COMPUTE_UNITS: 30
CL_DEVICE_MAX_WORK_ITEM_SIZES: 512 / 512 / 64
CL_DEVICE_MAX_WORK_GROUP_SIZE: 512
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1 MHz
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_GLOBAL_MEM_SIZE: 4095 MByte
CL_DEVICE_LOCAL_MEM_SIZE: 16 KByte
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
CL_DEVICE_QUEUE_PROPERTIES: CL_QUEUE_PROFILING_ENABLE
CL_DEVICE_EXTENSIONS:
cl_khr_byte_addressable_store
cl_nv_compiler_options
cl_nv_device_attribute_query
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics

System Info:

TEST PASSED…

Press ENTER to exit…

ideas :

  • gcc 4.4 is too recent test with a gcc 4.3
  • check your drivers with nvidia-setting utilities

do the cuda sdk example work?

Thanks for the ideas. I built and installed gcc 4.3.4 and still have the same problem with the OpenCL examples (oclBandwidthTest and oclDeviceQuery run fine; all others crash on clCreateCommandQueue). The programs in the C CUDA SDK run fine.

When I try to run “nvidia-settings”, I get the error "You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run ‘nvidia-xconfig’ as root), and restart the X server. However, I do not have root priviliges. The system administrator also mentioned having difficulty running nvidia-settings, because it cannot be run remotely and the workstation has no video head. I believe that since the C CUDA SDK examples work this is not the problem, but maybe someone can confirm that or correct me if I’m wrong.

I plan to look a little more closely at what is happening when I build the CUDA and OpenCL SDKs. I noticed some -L references to /usr/X11R6/lib64, which doesn’t exist on my system; also references to /usr/lib64 instead of the lib64 associated with the location where I installed gcc and g++ 4.3.4.

Thanks again for your response. Any other suggestions would be appreciated.

–Chris

–Chris