NVIDIA OpenCL sample compile-Collection of common programming errors
-
The OpenCL SDK samples in the NVIDIA GPU Computing SDK require a GPU with CUDA Compute Architecture to run properly. For a complete list of CUDA-Architecture compute-enabled GPUs, see the list online at: http://www.nvidia.com/object/cuda_learn_products.html
-
The OpenCL applications in the NVIDIA GPU Computing SDK require version 258.19 of the NVIDIA Display Driver or later to run on 32 bit or 64 bit Linux. This required driver is made available to registered developers at: https://nvdeveloper.nvidia.com/login.asp?action=login
Please make sure to read the Driver Installation Hints Document before you install the driver: http://www.nvidia.com/object/driver_installation_hints.html
-
Uninstall any previous versions of the NVIDIA GPU Computing SDK
-
Install the NVIDIA GPU Computing SDK by running the installer provided for your OS.
The default installation folder for the OpenCL SDK is:
Linux $(HOME)/NVIDIA_GPU_Computing_SDK/
In the following we will refer to the path that the SDK is installed into as .
-
Build the 32-bit or 64-bit (match the installation OS), release and debug
configurations, of the entire set of SDK projects and utility dependencies. a. Go to /OpenCL b. Build:- release configuration by typing “make”.
- debug configuration by typing “make dbg=1”.
Running make at the top level first builds the shared and common utility libraries used by the SDK samples (these libraries are simply for convenience and are not part of the OpenCL distribution and are not required for your own OpenCL programs). Make then builds each of the projects in the SDK.
-
Run the examples from the release or debug directory located in /OpenCL/bin/linux/[release|debug].
-
Most of the SDK applications output messages to a console window that are of interest from the standpoint of understanding basic OpenCL program flow, and several of the applications generate graphics output in a separate OpenGL window.
-
Many of the SDK applications present some timing information useful for obtaining an overall perspective of program structure and flow and the time required for setup and execution of significant functions. The SDK example code, however, has generally been simplified for instructional purposes and is not optimized. Advanced optimization techniques are beyond the scope of this SDK, and any timing information presented by the samples is not intended for such usage as benchmarking.
-
All of the applications additionally log all the console information to a session log file in the same directory as the executables. Those files are named clearly after the name of the sample app, but with a .txt extension.
-
For convenience, the Makefile in /OpenCL can be used to execute all SDK samples sequentially by typing “make runall” or “make dbg=1 runall”.
-