OpenCL is an open, cross-platform API standard for accessing GPUs. It is an
alternative to using NVIDIA's CUDA C language. OpenCL works on more
platforms, including Intel Phi and ATI GPUs, but on NVIDIA cards, you are
generally coding in CUDA C often produces best performance. The GPUs at
LLNL are NVIDIA cards. Because of the need to support multiple platform
features, OpenCL requires more "setup code" than CUDA C.
Please read the LC GPU Technology
page to familiarize yourself with the LLNL GPU setup.
Location: OpenCL is split into the library, which is part of the
NVIDIA driver package in /usr/lib64/nvidia , and the headers are in
where VERSION is whatever is the latest in the /opt directory.
Settings: Other than compiling with libOpenCL.so and including
the appropriate headers, you do not need any special variables to run
OpenCL. You might need to set LD_LIBRARY_PATH if you do not use
-rpath in your link lines.
To compile an OpenCL program, you simply use your favorite GNU, icc or PGI compilers, and link against the OpenCL library. For example, to
compile a program called vectoradd.cpp into a GPU program:
g++ -L/usr/lib64/nvidia -lOpenCL
vectoradd.cpp -o vectoradd
Note the line has been broken into two for readability, but should be
typed as one command.
There is no need to download any software to use GPUs on LC machines.
Livermore Computing does not support installation of desktop OpenCL
drivers. Please ask your desktop system administrator for