Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

/usr/lib/nvidia-current/libcuda.so

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/libc.so.6
#1  0x00007ffff22c0e67 in ?? () from /usr/lib/nvidia-current/libcuda.so

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/benchmark.py crashes just the same (in pyopencl::program::get_build_info).

Any hint on what is wrong?

share|improve this question
add comment

1 Answer 1

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
1  
It segfaults in libcuda.so (calling strlen from glibc); libcuda.so 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
add comment

Your Answer

 
discard

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.