Unsorted Notes

Compiling NVidia CUDA examples on Tegnér

How to compile NVIDIA SDK examples on the cluster Tegnér.

It is convenient to have the CUDA examples at hand when developing GPU programs. They can be used as starting examples and allow quick tests of the GPU features. Furthermore, one can test if the development environment provides all depending packages and allows to compile and link programs for all GPU features.

The examples can be easily compiled with a few commands.

1. Load the CUDA environment module

$ module load cuda/7.0

2. Copy the NVidia CUDA examples to a directory where you have write rights

$ cp -a /pdc/vol/cuda/cuda-7.0/NVIDIA_CUDA-7.0_Samples .

3. Compile the examples

$ cd NVIDIA_CUDA-7.0_Samples/
$ make

4. Make the directory with the compiled programs your working directory and test some of the example programs:

$ cd bin/x86_64/linux/release/

$ ./deviceQuery
$ ./bandwidthTest
$ ./matrixMul
$ ./matrixMulCUBLAS


2015-05-06 – Category: programming – Tags: cuda gpu