pycuda


Introduction:

PYCUDA is an interface which allows Python programs to execute
CUDA kernels on the GPU.

Web Site:

Reference:

Usage:

On any ARC cluster, check the installation details
by typing “module spider pycuda”.

PYCUDA requires that the appropriate modules be loaded before it can
be used. One version of the appropriate commands for use on NewRiver is:

module purge
module load intel/15.3
module load python/2.7.10
module load mkl/11.2.3
module load cuda/7.0.28
module load pycuda/2016.1.2
    

Examples:

The following batch file runs a Python script for the Mandelbrot
set using PYCUDA:

#! /bin/bash
#
#PBS -l walltime=00:05:00
#PBS -l nodes=1:ppn=1:gpus=1
#PBS -W group_list=newriver
#PBS -q open_q
#PBS -j oe
#
cd $PBS_O_WORKDIR
#
module purge
module load intel/15.3
module load python/2.7.10
module load mkl/11.2.3
module load cuda/7.0.28
module load pycuda/2016.1.2
#
python mandelbrot_pycuda.py

A complete set of files to carry out a similar process are available in
pycuda_example.tar