clBuildProgram() crashes when running samples built with VS2012

clBuildProgram() crashes when running samples built with VS2012


We are now working with the OpenCL SDK, however we ran into some issues while running the provided application samples.

In all samples, the function clBuildProgram() would:

1. Either hang forever or crash with access violation in clang_compiler.dll if running on CPU, or

2. Crash with access violation in igdfcl64.dll if running on GPU (with -g option).


Some descriptions of the platform we used are described as follows:

OS: Windows 8 build 9200

SDK: 2012 and 2013 beta (all result in the same problem)

CPU: i7 3520M

GPU: HD 4000; external graphic card present, but disabled

Driver: ver. 


Any suggestions on this issue?


12 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I am trying to replicate your issue. Will let you know my findings.


I am not able to reproduce your issue. I have windows 8 pro and a later driver than your's. All of the SDK samples run both on CPU and GPU. Can you reinstall the graphics driver and 2013 Beat SDK in that order and try again. Not sure where you got the driver, but can you try upgrading to a later version?


Hi Raghu,

We have tried the following drivers: - the latest WHQL driver provided - our previous driver; as we did not locate and install it manually, we assume that it was installed by Windows Update - the latest test driver
all 3 result in the same situation.
Could you please inform us the version you used for testing, so we can also try it out on our enviornment?

However, we did notice that the results of running on CPU were related to how the CPU-only runtime were installed:
1. If installed from OCLSetup.exe included in any driver package, clBuildProgram() would hang
2. If installed or repaired by the SDK, clang_compiler.dll would crash and generate stack dumps on the console (please find a sample dump in the attachments)

Hope the above information would help, and thank you for helping out.


Downloadimage/jpeg stack-dump.jpg507.49 KB

Hi Li,

I just installed 2792 and all the samples run both on the CPU and GPU. I think the problem is with the way you are installing. You do not need to run OCLsetup to install the OCL components. Moreover this will install GPU components only. I recommend that you re-install the graphics driver and the OCL SDK. I dont think the order matters.

Let me know if this helps.


Hi Raghu,

We have tried the following steps:
1. Uninstall driver/SDK/runtime, delets samples and reboot
2. Reinstall x64 driver and reboot
3. Reinstall x64 SDK (no runtime or OCLSetup installation)
4. Unpack the samples and build them in x64, both debug/release

2 machines were tested with exactly the same packages and steps, but both machines fall into the same issue.

We'll let you know if there are any new findings.

Hi Raghu,

We have found the cause of this issue: samples built with Visual Studio 2012 (11.0.50727.1) will cause clBuildProgram() to crash.
If built with VS2010, the samples will run without any problem.

Are there any reports about the VS2012 compatibility of OpenCL SDK?


Thanks for the information. I have VS2012. So I will take a look. Meanwhile I will find out more about VS2012 support.


I am able to reproduce the issue. WIll get back to you on what I find.



I learnt that the current version of the SDK does not support VS2012. It will be supported in future versions of the SDK.


Hi, are you absolutely sure that samples work fro other VS versions on your machine? Eg.g for VS2010 or VS2008?

Hi Maxim,

We're not sure about VS2008 (as we don't have a copy at hand), however sample executables built from VS2010 solutions in the package (in x64 release setting) with VS2010 (10.0.30319.1) all worked properly in both CPU and GPU settings.

As for VS2012, we tend to build and run the VS2010 solution with it in almost the same procedure (except the project update process performed by VS2012), and the generated executables crashed as described in previous posts.

If there are any other information about the building and running procedure that I should pay attention to and/or provide, please let me know.
Thank you for helping out.

Leave a Comment

Please sign in to add a comment. Not a member? Join today