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.

Device unavailable creating context with debugger enabled

Kazys_S_
Beginner
1,265 Views

Hi,

I'm running a test of the OpenCL SDK to try the debugger. I have a simple program which runs as expected when launching with the OpenCL debugging *not* enabled (disabled). Once I enable the OpenCL debugger and launch, the device context creation fails (clCreateContext() or clCreateContextFromType()), reporting CL_DEVICE_NOT_AVAILABLE.

I'm running with the following setup:

  • Windows 7
  • Visual Studio 2015
  • CPU: Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz
  • Platform: Intel(R) OpenCL
  • Version: OpenCL 1.2

As I mentioned, the same code, targeting the same context works as expected so long as OpenCL debugging is disabled.

Can anyone shed some light what the issue may be so I can start OpenCL debugging?

Thanks in advance.

 

0 Kudos
6 Replies
Robert_I_Intel
Employee
1,265 Views

Hi Kazys,

What version of Intel(R) SDK for OpenCL Applications do you have? What version of the CPU driver?

BTW, if you have this chip: http://ark.intel.com/products/64593/Intel-Xeon-Processor-E5-2630-15M-Cache-2_30-GHz-7_20-GTs-Intel-QP ​ we may have discontinued support for it.

 

0 Kudos
Kazys_S_
Beginner
1,265 Views

Hi Robert,

Thanks for the prompt reply. Driver and SDK details are as follows:

  • SDK version: 6.0.0.1049.
  • Driver version: 5.2.0.10002 installed as part of the OpenCL runtime, version 16.1

I am running the chip you've linked. If, as you suggest, support has been discontinued, does that mean it is impossible to debug OpenCL code without the latest hardware or can I download an use an older version of the SDK to do so?

 

0 Kudos
Robert_I_Intel
Employee
1,265 Views

Hi Kazys,

Try to install a standalone CPU driver from here: https://software.intel.com/en-us/articles/opencl-drivers#core_xeon

It might work. The other thing to try is to download the previous version of the SDK and the 15.1 standalone driver from the link above.

Your mileage may vary.

0 Kudos
Kazys_S_
Beginner
1,265 Views

Hi Robert,

So I've managed some success. In the end the critical issue is to set the platform to "Experimental OpenCL 2.0 CPU Only Platform" rather than "Intel(R) OpenCL" (the latter being a OpenCL 1.2).

The following results were achieved using version 15 of the SDK and the stand alone driver, but the previous failures appeared to be the same when using version 16 (I'll try to provide an update later). I also changed to testing within the Intel OpenCLSamples solution (GodRays), rather than my own test code.

Using the OpenCL 2 platform, I am able to debug normal and OpenCL code as expected. Using the Intel OpenCL 1.2 platform, I am unable to debug though due to different issues than west code fails to create the context, while the sample code crashes with Access Violations on calling clFinish(). Within my test code I still fail to get past device context creation even with the OpenCL 2 platform, so I'll continue to see what can be done here.

Reading the getting started guide, there is a suggestion of requiring OpenCL 2 for debugging (under Intel® Media Studio Server). I guess I underestimated the importance of the statement.

Robert, is it an explicit requirement to use an OpenCL 2 driver? If so, I'll move on to trying to identify why my code fails on context creation. Otherwise, I can provide additional information and callstack detailing the failures with the OpenCL 1.2 driver. If OpenCL 2 is required, then I would request an explicit error message when using an unsupported driver.

Thanks,

Kazys.

0 Kudos
Kazys_S_
Beginner
1,265 Views

Turns out the reasons for the CL_DEVICE_NOT_AVAILABLE failure are both silly and convoluted. The short story is that my environment variables did not correctly reflect the installation of the Intel OpenCL SDK. In particular, the path variable did not include the SDK "bin" directories.

In summary, there were two issues preventing me from debugging OpenCL:

  1. Incorrect environment variables, especially the path, resulting in a CL_DEVICE_NOT_AVAILABLE error when trying to create the device.
  2. Using the wrong OpenCL driver, resulting in an access violation crash. An OpenCL 2.0 driver appears to be required.

 

0 Kudos
Achille_P_
Beginner
1,265 Views

I'm having a similar problem. 

I've a laptop with a Core i7-3630qm and HD 4000, Windows 10 64 bit, and Visual Studio 2013. Drivers installed correctly and I've been able to use OpenCL through the CPU-only runtime installed with the driver (first) and after updating it to the 15.1 stand-alone version. The OpenCL CPU-only version reported was 5.0.0.57. OpenCL CPU-only was working at this point. I also tried to update to the 16.1 stand-alone version, but the installer fails saying that the HD graphics driver is already installed. With version 15.1 everything went smooth.

Unfortunately, I then installed the latest version of the OpenCL SDK. I now have the new experimental platform (version 6.1.*), but the 5.0.0.57 runtime is unusable because of the CL_DEVICE_NOT_AVAILABLE error. Before installing the SDK, this runtime was working. On another machine (without the integrated HD graphics), I managed to have both runtimes working. 

So what happened to the 5.0.0.57 runtime during the installation of the SDK? The CL_DEVICE_NOT_AVAILABLE error appears when I try to use such platform/device from standard OpenCL-based applications: I didn't even tried (yet) to use it through Visual Studio and in debug-mode. 

I suspect that this issue could be related to another problem I've already reported:

https://software.intel.com/en-us/forums/opencl/topic/595288

Cheers

 

0 Kudos
Reply