GPU Jobs
make use of a GPU you need to submit a job request specifying the gpu partition and the number of gpus you require with the --gpus=<number> argument.
sbatch -p gpu --gpus=1 --account=<GroupName> ... srun -p gpu --gpus=1 --account=<GroupName> ...Example Interactive GPU Job
The following commands show how to start an interactive job with gpu support and run the nvidia-smi command.
Start Interactive Job
The following command will start an interactive job running on a gpu node requesting 1 GPU.
srun --pty --account=<GroupName> -p gpu --gpus=1 bashThe above command starts a job with the CUDA_VISIBLE_DEVICES environment variable will be set to the allocated GPUs. This environment variable allows programs to determine which of the available GPUs to use.
Run gpu-enabled command
nvidia-smiExit Interactive Job
exit
Next: Software