DSPSR user documentation: dspsr

Configure dspsr to use one or more Graphics Processing Units

To compile dspsr with CUDA support, first set the PACKAGES environment variable to include the directory in which the cuda software has been installed; e.g.
setenv PACKAGES /usr/local/cuda-4.2
then run the dspsr configure script; e.g.
cd dspsr/
./configure
When the configure script finishes, you can verify that CUDA was detected by running
grep CUDA Makefile 
this should output something like
CUDA_CFLAGS = -I/usr/local/cuda-4.2/include
CUDA_LIBS = -L/usr/local/cuda-4.2/lib64 -lcudart
Then run
make
make install
and verify that cuda is a command-line option; e.g.
dspsr -h | grep cuda
should yield
  -cuda devices     comma-separated list of CUDA devices
You're now ready to go! The argument to the -cuda command-line option is a comma separated list of cuda device identifiers. For example
 -cuda 0 
run on device 0
 -cuda 0,1 
run using two posix threads, one controlling device 0 and the other controlling device 1
 -cuda 0,0,1,1 
run using four posix threads, the first two run two different streams on device 0 and the last two run two different streams on device 1
CUDA streams enable computation to occur in parallel with host-to-device data transfers on the PCI bus, which can increase efficiency.