Nvidia CUDA OpenCL Examples Missing Libraries

Hi all,

I downloaded one of the OpenCL examples from Nvidia’s website, VectorAdd
https://developer.nvidia.com/opencl

However, when I try to make in oclVectorAdd/NVIDIA GPU Computing SDK/OpenCL/src/oclVectorAdd, I get the following error:
/usr/bin/ld: cannot find -lshrutil_x86_64
collect2: error: ld returned 1 exit status
make: *** […/…/…//OpenCL//bin//linux/release/oclVectorAdd] Error 1

Any ideas on how to fix this? This problem seems to occur with all the OpenCL examples.

Thanks

Even though they appear to be independent, these OpenCL sample codes are not really maintained as independently buildable projects. They were extracted from the NVIDIA GPU Computing SDK, back when that SDK was still shipping (in CUDA 4.2 timeframe and before).

The easiest way to “fix” it in my opinion is to download the CUDA 4.2 SDK from here:

https://developer.nvidia.com/cuda-toolkit-42-archive

You only need the SDK, not the toolkit or driver.

Download the SDK, unzip/install it, and then go to the top level OpenCL directory in the SDK and execute make from there. Since this isn’t really a supported sequence, you may have to fix things up along the way. Read the documentation that gets installed with the SDK.

So it did make successfully from the top level OpenCL directory.

However, it still has not created any executables anywhere. I do see that it formed an obj folder for each benchmark, in which there is another folder named release, which contains object (.o) files.

How should I try to run a specific benchmark now?

Thanks again.

The built executables are placed in:

SDK_ROOT/OpenCL/bin/linux/release

where SDK_ROOT is whatever path you used when installing the SDK.

ok that worked!

thank you very much!