Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am attempting to install ViennaCL-1.2.1 in scientific linux for future GPU computing. When I attempt to call make, i get a variety of errors, with most along the lines "undefined reference to 'clXXXXX'. I am assuming this is due to it not properly finding my OpenCL library. What I don't know is if I have the sufficient libraries. In /usr/lib I have libOpenCL.so, and I have installed the most up-to-date NVIDIA driver for my graphics card. The driver supports OpenCL, but do I need more downloads from the NVIDIA site to use the ViennaCL library?

EDIT: I solved the above make issue (I believe) by simply rerunning cmake. I think that I hadn't properly installed the libraries when I first ran cmake and it made silent errors when creating the make files. However this has simply changed the nature of the problem.

Now, whenever I run any of the tutorials or benchmarks included with ViennaCL, I get a fatal error, where 'ViennaCL encountered an unknown OpenCL Error'. It says this could be due to several compilation errors, but does not go into any further detail. The only one that does not throw an error is 'bandwidth-reduction' which from the manual is found to be the only one that does not require OpenCL.

For reference, here is my installation process for ViennaCL and the GPU drivers:

- sftp ViennaCL-1.2.1 to ~/Documents/packageInstall
- cd /usr/include
- sudo mkdir viennacl
- sudo cp -r ~/Documents/packageInstall/ViennaCL-1.2.1/viennacl/* /usr/include/viennacl
- sudo mkdir CL
- sudo cp -r ~/Documents/packageInstall/ViennaCL-1.2.1/CL/* /usr/include/CL
- sftp gpucomputingsdk_4.2.9_linux.run to ~/Documents/packageInstall
- sftp cudatoolkit_4.2.9_linux_64_rhel6.0.run to ~/Documents/packageInstall
- cd ~/Documents/packageInstall
- sudo sh ./cudatoolkit_4.2.9_linux_64_rhel6.0.run
- sudo sh ./gpucomputingsdk_4.2.9_linux.run
- cd ViennaCL-1.2.1/build
- cmake ..
- sudo make
- ./examples/tutorial/blas1 (or any other example)
share|improve this question
add comment

2 Answers

You're right, this sounds a lot like a linker error.
Please make sure the linker flags are correctly set, e.g. -lOpenCL

share|improve this answer
    
you were right, it is an OpenCL library access problem, but I am still unable to find what the problem is. I believe I have corrected the linker flag issue however. –  Godric Seer May 29 '12 at 19:29
add comment
up vote 0 down vote accepted

With significant pointers from Karl Rupp, I solved the problem by adding the user attempting to run the programs to the 'Video' group, then also manually starting the nvidia service on each boot. The 'Video' group was required to allow access to the OpenCL library, and the drivers must be initiated for the GPU to be accessible.

share|improve this answer
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.