The Nvidia CUDA development kit has been updated to version 4.1.
DAS-4/ASTRON has succesfully correlated three hours of data coming from 288 LOFAR antennas, possibly setting a world record.
The GPU page documents how the OpenCL implementations on DAS-4 can be used.
DAS-4/VU achieved the 16th place on the Graph500 list. A very good result, as all higher-ranked systems are significantly bigger.
DAS-4 supports the OpenNebula package for Cloud computing.
GPUs on DAS-4 (see Special Nodes) can be programmed using two paradigms: CUDA and OpenCL.
CUDA is supported by Nvidia GPUs. The current CUDA 4.1 implementation can be added to your environment as follows:
$ module load cuda41/toolkit
Documentation for writing and building CUDA applications is then available from $CUDA_INSTALL_PATH/doc/CUDA_C_Programming_Guide.pdf. An SGE job script to submit a CUDA application on a host with a GTX480 GPU could then look like this:
#!/bin/sh #$ -S /bin/sh #$ -l gpu=GTX480 #$ -l h_rt=00:15:00 #$ -cwd . /etc/bashrc module load cuda41/toolkit ./cuda-app opts
Environment modules containing settings for additional CUDA tools (module cuda41/tools), BLAS implementation (cuda41/blas), FFT implementation (cuda41/fft), and profiler (cuda41/profiler) are also available.
OpenCL is supported by Nvidia GPUs, AMD GPUs and regular host CPUs. Three implementations are available: opencl-nvidia, opencl-amd and opencl-intel. All OpenCL implementations employ a common "libOpenCL.so" dynamic library, so when switching between OpenCL implementations, be sure to use "module unload" to undefine the previous settings.
In the examples below, a simple OpenCL demo application cldemo.c is used that displays the platforms found, selects one, and scales an array of integers by a factor of two using OpenCL.
The Nvidia OpenCL implementation supports only Nvidia GPUs. It can be used as follows:
$ module load opencl-nvidia $ gcc -I$OPENCL_INCLUDE -c cldemo.c $ gcc -L$OPENCL_LIB -lOpenCL cldemo.o -o cldemo-nvidia $ cat cldemo-nvidia.job #!/bin/sh #$ -S /bin/bash #$ -l h_rt=00:10:00 #$ -l gpu=GTX480 #$ -j y #$ -cwd . /etc/bashrc module load opencl-nvidia ./cldemo-nvidia $ qsub cldemo-nvidia.job
Note that the Nvidia OpenCL implementation also imports the Nvidia CUDA environment.
The AMD OpenCL implementation supports both AMD GPUs and regular host CPUs. It can be used as follows:
$ module load opencl-amd $ gcc -I$OPENCL_INCLUDE -c cldemo.c $ gcc -L$OPENCL_LIB -lOpenCL cldemo.o -o cldemo-amd $ cat cldemo-amd.job #!/bin/sh #$ -S /bin/sh #$ -l h_rt=00:10:00 #$ -j y #$ -cwd . /etc/bashrc module load opencl-amd ./cldemo-amd $ qsub cldemo-amd.job
The Intel OpenCL implementation supports regular host CPUs. It can be used as follows:
$ module load opencl-intel $ gcc -I$OPENCL_INCLUDE -c cldemo.c $ gcc -L$OPENCL_LIB -lOpenCL cldemo.o -o cldemo-intel $ cat cldemo-intel.job #!/bin/sh #$ -S /bin/sh #$ -l h_rt=00:10:00 #$ -j y #$ -cwd . /etc/bashrc module load opencl-intel ./cldemo-intel $ qsub cldemo-intel.job