OpenCL example makefile not found for libshrutil_x86 build

Hi all,

Running Ubuntu 12.04, CUDA 5.0
Attempting to build one of the OpenCL examples I manually downloaded.

I tried to build in the OpenCL dir but get these errors:

dlowell@rnd03:~/NVSDK/OpenCL$ make
make[1]: Entering directory `/home/dlowell/NVSDK/OpenCL/common'
cc1plus: warning: command line option ‘-Wimplicit’ is valid for C/ObjC but not for C++ [enabled by default]
ar: creating ../..//OpenCL//common//lib/liboclUtil_x86_64.a
a - obj/release/oclUtils.cpp.o
make[1]: Leaving directory `/home/dlowell/NVSDK/OpenCL/common'
make[1]: Entering directory `/home/dlowell/NVSDK/shared'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `/home/dlowell/NVSDK/shared'
make: *** [shared/libshrutil.so] Error 2

NVSDK is my replacement name for the annoying “NVIDIA GPU Computing SDK”
Using relative paths everything should take care if itself. I also tried this under the original naming. I can’t really move forward to try building the examples since they require this particular library.

My PATH:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/cuda:/usr/local/cuda/bin:/usr/local/cuda/include:/home/dlowell/bin/cudaUtils/1_Utilities/deviceQueriy:/usr/lib/x86_64-linux-gnu

My LD_LIBRARY_PATH:

/opt/intel/composer_xe_2011_sp1.6.233/compiler/lib/intel64:/opt/intel/composer_xe_2011_sp1.6.233/mkl/lib/intel64:/usr/local/cuda/lib64:/usr/lib:/usr/lib/x86_64-linux-gnu:/home/dlowell/NVSDK/shared/lib

Something seems to be missing. Anyone have a idea?

Thanks

hi redratio1,

I too was having this problem, I thought it was my fault but actually I think the samples are wrong. I think there’s a missing makefile, due to NVIDIA removing the openCL samples from the 5.0 SDK, and making you download them one by one.

Fix: you must download the sdk 4.2 kit, which has all the samples zipped. Linux link:

http://streamcomputing.eu/downloads/?Nvidia_OpenCL_SDK_4_2_Linux.zip

and mirror

https://github.com/sschaetz/nvidia-opencl-examples/archive/master.zip.

Then the makefile in /OpenCL/ completes properly (at least for me on ubuntu 12.04).

Credit & more about it on this blog asking for nvidia to start supporting opencl properly again

For OpenCL I needed to download whole CUDA SDK 4.2.9 as sschaetz’s git does not provide shrUtils.h and CUDA 5.0 does not contain ocl at all :(
Explanation in link above.
It complied and run on Fedora 18 x64 and Fedora 16 x64 just fine.
OCL examples here for your convenience :


yum -y install gcc libXmu-devel