Using CUDA

Description

The only supported way of running applications, using CUDA compilers, and libraries on PIXELS is via the module command.

The Environment Modules is a software package which allows you to dynamically modify your user environment by using portable modulefiles.

As a user, you can add and remove modulefiles from the current environment.

CUDA-3.0 and CUDA 4.0 are installed on PIXELS2 and PIXELS3.

CUDA-2.3, CUDA-3.0 and CUDA-4.0 are installed on PIXELS4.

To see a list of applications, type

$ module avail

To load CUDA 3.0, type

module load cuda/3.0

To load CUDA 4.0, type

module load cuda/4.0

This will set the environmental variables PATH and LD_LIBRARY_PATH.

Quick List of Commands

Command Description
module list Lists modules currently loaded in a user’s environment. A module is considered loaded when its associated modulefile has been executed and the user’s environment contains the changes from the modulefile.
module avail Lists all available modules on a system.
module show Shows environment changes that will be made by loading a given module.
module load Loads a module.
module add Same as module load
module unload Unloads a module.
module rm Same as module unload
module help Shows help for a module.
module swap Swaps a currently loaded module for an unloaded module.

Using the Environment Modules commands as explained above, you can remove, replace, or append to these. For example,

module purge    # will remove all modules
module rm cuda # will remove the cuda module (whichever one is currently loaded)