Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two GPUs, one is AMD (fglrx-updates) and one nVidia (nvidia-current), drivers from x-swat PPA. The AMD card is used byt xorg (without problems). Both devices show up in lspci|grep VGA:

01:00.0 VGA compatible controller: ATI Technologies Inc Device 6718
02:00.0 VGA compatible controller: nVidia Corporation Device 1200 (rev a1)

The nvidia kernel module is loaded (dmesg|grep nvidia):

[   16.033488] nvidia 0000:02:00.0: enabling device (0000 -> 0003)
[   16.033501] nvidia 0000:02:00.0: PCI INT A -> GSI 40 (level, low) -> IRQ 40
[   16.033507] nvidia 0000:02:00.0: setting latency timer to 64

OpenCL problem

I created /etc/OpenCL/vendors/nvidia.icd containing


The device is detected, platform NVIDIA CUDA, device GeForce GTX 560 Ti. However, no code gets compiled for the device, clBuildProgram always returns CL_BUILD_RPOGRAM_FAILURE and querying clGetProgramBuildInfo crashes with uninformative backtrace

#0  0x00007ffff7442bef in ?? () from /lib/x86_64-linux-gnu/
#1  0x00007ffff22c0e67 in ?? () from /usr/lib/nvidia-current/

The program is build with cl.h from Intel's SDK; that is OK since everything was fine until I installed the AMD card alongside.

Running /usr/share/doc/python-pyopencl/examples/ crashes just the same (in pyopencl::program::get_build_info).

Any hint on what is wrong?

share|improve this question

The implementation probably can't dlopen one of the libraries it uses, try running your app with LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH ./yourapp, and if that doesn't help run it with strace, and look out for libraries it's unable to load and adjust the path so it can find them.

share|improve this answer
It segfaults in (calling strlen from glibc); is found just fine, it is given (including path, which avoids the need for LD_LIBRARY_PATH) in the ICD file in /etc/OpenCL/vendors. – eudoxos Feb 9 '12 at 0:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.