scikit-cuda

Overview

scikit-cuda is a python module to provide Python interfaces to many of the functions in the CUDA device/runtime, CUBLAS, CUFFT, and CUSOLVER libraries distributed as part of NVIDIA’s CUDA Programming Toolkit.

Version 0.5.1 is installed on the CSF (the most recent official release, we are aware that 0.5.3 is available but it is still noted in the change log of the software developer as ‘Under Development’, we tend to stick to stable releases of software).

Restrictions on use

There are no restrictions on accessing this software on the CSF.

Please ensure you cite your usage in any published works.

Set up procedure

We now recommend loading modulefiles within your jobscript so that you have a full record of how the job was run. See the example jobscript below for how to do this. Alternatively, you may load modulefiles on the login node and let the job inherit these settings.

Load the following modulefiles:

module load apps/python/scikit-cuda/0.5.1

This will load automatically the Anaconda python modulefile (provides python 3.7) and CUDA 10.1.136

Running the application

Please do not run your code on the login node. Jobs should be submitted to the compute nodes via batch.

Your python scripts should use:

import skcuda

or a specific component of your choice.

Serial batch job submission

Create a batch submission script (which will load the modulefile in the jobscript), for example:

#!/bin/bash --login
#$ -cwd             # Job will run from the current directory
                    # NO -V line - we load modulefiles in the jobscript

module load apps/python/amico/1.0.2

python my_script.py

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

Parallel batch job submission

Create a batch submission script (which will load the modulefile in the jobscript), for example:

#!/bin/bash --login
#$ -cwd             # Job will run from the current directory
#$ -pe smp.pe 8     # Number of cores. Can be 2--32.
                    # NO -V line - we load modulefiles in the jobscript

module load apps/python/amico/1.0.2

# Specify how many cores are available. $NSLOTS is set to the number given above.
export OMP_NUM_THREADS=$NSLOTS

python my_script.py

Submit the jobscript using:

qsub scriptname

where scriptname is the name of your jobscript.

Last modified on July 30, 2020 at 2:27 pm by Pen Richardson