GPU¶
The Gilbreth cluster nodes contain NVIDIA GPUs that support CUDA and OpenCL. See the detailed hardware overview for the specifics on the GPUs in Gilbreth.
This section illustrates how to use SLURM to submit a simple GPU program.
Suppose that you named your executable file gpu_hello from the sample code gpu_hello.cu. Prepare a job submission file with an appropriate name. In this example, the file is named gpu_hello.sub.
Example Job Submission File¶
Submit the Job¶
Submit the job:
Requesting a GPU from the scheduler is required.
You can specify the total number of GPUs, the number of GPUs per node, or the number of GPUs per task.
View Output¶
After job completion, view the new output file in your directory:
Example output:
View results in the file for all standard output:
Example output:
If the job failed to run, view error messages in the file slurm-myjobid.out.
Requesting Multiple GPUs¶
To use multiple GPUs in your job, specify a larger value for the GPU specification parameter.
Be aware of the number of GPUs installed on the node or nodes you are requesting. The scheduler cannot allocate more GPUs than physically exist.
See the detailed hardware overview and the output of the sfeatures command for specifics on the GPUs in Gilbreth.