CUDA¶
Description¶
The NVIDIA CUDA Toolkit provides a development environment for creating high performance GPU-accelerated applications. The toolkit includes GPU-accelerated libraries, debugging and optimization tools, a C/C++ compiler and a runtime library to deploy your application.
Environment Modules¶
Run module spider cuda
to find out what environment modules are available for this application.
Environment Variables¶
- HPC_CUDA_DIR - installation directory
- HPC_CUDA_BIN - executable directory
- HPC_CUDA_INC - includes directory
- HPC_CUDA_LIB - library directory
Additional Usage Information¶
Environment¶
For CUDA development please load the "cuda" module. Doing so will ensure that your environment is set up correctly for the use of the CUDA compiler, header files, and libraries. The cuda versions below are currently supported on hipergator.
Expand to view example of loading/using cuda.
$ module spider cuda
-------------------------------------------------------------
cuda:
-------------------------------------------------------------
Description:
NVIDIA CUDA Toolkit
Versions:
cuda/10.0.130
cuda/11.0.207
cuda/11.1.0
cuda/11.4.3
cuda/11.6
cuda/12.2.0
cuda/12.2.2
cuda/12.4.1
--------------------------------------------------------------------------------------------------------------------
For detailed information about a specific "cuda" module (including how to load the modules) use the module full name.
For example:
$ module spider cuda/10.0.130
--------------------------------------------------------------------------------------------------------------------
$ module load cuda/10.0.130
$ which nvcc
/apps/compilers/cuda/10.0.130/bin/nvcc
$ printenv | grep CUDA
HPC_CUDA_LIB=/apps/compilers/cuda/10.0.130/lib64
HPC_CUDA_DIR=/apps/compilers/cuda/10.0.130
HPC_CUDA_BIN=/apps/compilers/cuda/10.0.130/bin
HPC_CUDA_INC=/apps/compilers/cuda/10.0.130/include
UFRC_FAMILY_CUDA_VERSION=10.0.130
Selecting CUDA Arch Flags¶
When compiling with NVCC, you need to specify the Nvidia architecture that the CUDA files will be compiled for. Please refer to GPU Feature List for CUDA naming scheme sm_xy where x denotes the GPU generation and y denotes the version. The table below lists the SM flags for the three types of GPUs on HiPerGator.
SM | Nvidia Cards |
---|---|
SM_61 | GeForce GTX 1080Ti |
SM_75 | GeForce RTX 2080Ti |
SM_80 | DGX A100 |
Sample GPU Batch Job Scripts¶
See the Sample Job Scripts page for an example.
Categories¶
programming, library, graphics