Alex
Alex

Reputation: 1469

clBuildProgram crash on NVidia cards

I have an OpenCL application that runs fine when using an AMD GPU.

When using an NVidia card, the clBuildProgram call crashes the application (does not even return a failure value, just a crash). When debugging, the crash yields:

read access violation in the nvopencl.dll module. code 0xc0000005. The debugger indicates the clGetExportTable function (inside nvopencl.dll) as source of the violation.

By commenting random parts of the kernels, I have reached this point:

In the code fragment:

if (something){
     //some stuff
     float3 gradient = (float3)(0,1,0);
     gradient = normalize(gradient);
     return;
}

By deleting the "gradient = normalize(gradient);" line, the clBuildProgram does not crash, but letting it there, crashed the program. the gradient variable is not even used inside the kernel, so it is not related to any other part of it. And the normalize funcion by itself should not be the source of the problem, because it is used in other parts of the code.

I think it may be related to some driver bug. Because installing the latest CUDA version (6.5) makes the OpenCL Volume Rendering sample binaries distributed by NVidia to misbehave, while using a CUDA 6 installation make the Volume Rendering sample to work properly.

My code is related to volume rendering techniques, that is why I think that it may be related, but my problem appears with both CUDA 6.5 and CUDA 6 installations.

Have you experienced something similar? What could be the cause of the problem, and how can I handle it?

Thank you.

Upvotes: 2

Views: 682

Answers (1)

Alex
Alex

Reputation: 1469

After further analysis, the problem seems to be a bug in the drivers, as Xapa mentioned.

Upvotes: 0

Related Questions