CUDA For GPUs
The optional CUDA packages should be deployed in order to take advantage of the computational capabilities of NVIDIA GPUs. The packages may already be in place, and ready for deployment on the cluster, depending on the particular BCM software that was obtained. If the CUDA packages are not in place, then they can be picked up from the BCM repositories, or a local mirror.
9.1 Installing CUDA
9.1.1 CUDA Packages Available
At the time of writing of this section (December 2025), the CUDA 13.0 package is the most recent version available in the BCM YUM, zypper, and APT repositories. An up-to-date list of packages available for a particular distribution and architecture can be viewed at https://service.bcm.nvidia.com/packages-dashboard/.
9.1.1.1 Example: CUDA Packages Available For Rocky Linux 9.3
At the time of writing of this section (December 2025), a cluster administrator can manage these packages for Rocky Linux 9.5:
* optional, intended only for hardware containing an NVSwitch, such as a DGX system
The packages of type shared in the preceding table should be installed on the head nodes of a cluster using CUDA-compatible GPUs. The packages of type local should be installed to all nodes that access the GPUs. In most cases this means that the cuda-driver and cuda-dcgm packages should be installed in a software image (section 2.1.2 of the Administrator Manual).
If a head node also accesses GPUs, then the cuda-driver and cuda-dcgm packages should be installed on it, too.
For packages of type shared, the particular CUDA version that is run on the node can be selected via a modules environment command:
Example
module add shared cuda12.1
Release notes and features list for the CUDA packages:
-
Release notes for the NVIDIA toolkit can be found at https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html.
-
The features list for the NVIDIA toolkit can be found at https://docs.nvidia.com/cuda/cuda-features-archive/index.html.
CUDA packages that the cluster administrator normally does not manage: As an aside, there are also the additional CUDA DCGM packages:
At the time of writing of this paragraph (December 2025) the latest DCGM version supported was 4.1.1.1. A yum info cuda-dcgm or apt show cuda-dcgm should reveal the current latest available version for the cluster.
- Release notes for the DCGM versions are available at https://docs.nvidia.com/datacenter/dcgm/latest/release-notes/changelog.html.
9.1.1.2 CUDA Package That The Cluster Administrator May Wish To Install For CUDA Programming
CUB is a CUDA programming library that developers may wish to access. It is provided by the package cm-cub-cuda, from the Machine Learning (cm-ml) repository.
9.1.1.3 CUDA Package Installation Basic Sanity Check
-
The NVIDIA GPU hardware should be detectable by the kernel, otherwise the GPUs cannot be used by the drivers. Running the
lspcicommand on the device with the GPU before the CUDA package driver installation is a quick check that should make it clear if the NVIDIA hardware is detected in the first place:Example
running
lspcionnode001which is where the GPU should be:If the hardware is not detected by the kernel already, then the administrator should reassess the situation.
-
Only after CUDA package installation has taken place, and after rebooting the node with the GPU, and allowing CMDaemon some time (a few minutes) to detect the change, are GPU details visible using the
sysinfocommand:Example
running
sysinfoonnode001, which is where the GPU is, viacmshon the head node, whilecuda-dcgmis not yet ready:Example
running
sysinfoonnode001, which is where the GPU is, viacmshon the head node, aftercuda-dcgmis ready:
9.1.1.4 CUDA Package Installation Guidelines For Compilation With Login Nodes
-
CUDA compilation should take place on a node that uses NVIDIA GPUs during compilation.
- Using a workload manager to allocate this task to GPU nodes is recommended.
-
Cross compilation of CUDA software is generally not a best practice due to resource consumption, which can even lead to crashes.
-
If, despite this, cross compilation with a CPU is done, then the
cuda-driverpackage should be installed on the node on which the compilation is done, and the GPU-related services on the node, such as:-
cuda-driver.service -
nvidia-persistenced.service -
cuda-dcgm.service
should be disabled.
-
-
9.1.2 CUDA Package Dependencies
The CUDA packages require access to the BCM repositories and to the distribution repositories.
In particular, the freeglut, freeglut-devel, and xorg-x11-util-macros packages are required. The installation ISO/DVD that Red Hat provides contains packages from the main repository, and does not contain these packages. For convenience, these packages are provided with a BCM installation ISO/DVD for Red Hat. Updates must however come from a subscription to the Red Hat supplementary/optional channels. Packages that are needed for a working BCM cluster, and which are provided by the BCM installation ISO/DVD, but which are not provided in the Red Hat installation DVD, are discussed in general in section 11.6.2 of the Administrator Manual, where the problems that such package dependencies can cause when creating a software image for a cluster with cm-create-image are discussed.
As a separate issue:
shows that one of the dependencies of the cuda-driver package in RHEL8 (not in RHEL9) is the freeglut-devel package, so for RHEL8 and derivatives it should be installed on a node that accesses a GPU. If the CUDA SDK source is to be compiled on the head node (with the head node not accessing a GPU, and with the cuda-driver package not installed) then the freeglut, freeglut-devel, and libXi-devel packages should be installed on the head node.
The cuda-driver package is used to compile the kernel drivers which manage the GPU. Therefore, when installing cuda-driver with yum, several other X11-related packages are installed too, due to package dependencies.
The cuda*-sdk packages can be used to compile libraries and tools that are not part of the CUDA toolkit, but used by CUDA software developers, such as the deviceQuery binary (section 9.3).
The cuda-xorg package is optional, and contains the driver and libraries for an X server
Example
For example, on a cluster where (some of) the nodes access GPUs, but the head node does not access a GPU, the following commands can be issued on the head node to install the CUDA 12.2 packages using YUM:
The --installroot command installs to the image used by the nodes. Here the image used by the nodes is assumed to be default-image. To ensure the software is installed from the image to the nodes, the imageupdate command can be run from within cmsh for the appropriate nodes.
9.1.2.1 Compiling And Loading CUDA Drivers On The Fly
The cuda-driver package provides a systemd script that is executed at boot-time to load the CUDA driver. Because the CUDA driver depends on the running kernel, the script compiles the CUDA driver on the fly, and subsequently loads the module into the running kernel, and creates the nvidia* devices (/dev/nvidia0, /dev/nvidia1…).
The actions of compiling the cuda-driver, loading the module, and creating the nvidia* devices, can also be carried out during normal running by manually running the script:
Example
The status of the driver and some event messages can be seen with:
Example
If there is a failure in compiling the CUDA module, it is usually indicated by a message saying “Could not make module”, “NVRM: API mismatch:”, or “Cannot determine kernel version”. Such a failure typically occurs because compilation is not possible due to missing the correct kernel development package from the distribution. Section 9.2 explains how to check for, and install, the appropriate missing package.
9.2 Installing Kernel Development Packages
This section can be skipped if there is no CUDA compilation problem.
Typically, a CUDA compilation problem (section 9.1) is due to a missing or mismatched kernel package and kernel-devel package.
To check the head node and software images for the installation status of the kernel-devel package, the BCM utility kernel-devel-check is used (section 11.3.5.1 of the Administrator Manual).
Alternatively, if a standard kernel is in use by the image, then simply upgrading CUDA, the standard kernel, and kernel-devel, to their latest versions may be a good tactic to fix a CUDA compilation problem, because the kernel and kernel-devel package versions become synchronized during such an upgrade.
9.3 Verifying CUDA
An extensive method to verify that CUDA is working is to run the verify_cuda <version>.sh script, located in the CUDA SDK directory. The value of <version> is 12.2, for example.
This script first copies the CUDA SDK source to a local directory under /tmp or /local. It then builds CUDA test binaries and runs them. It is possible to select which of the CUDA test binaries are run. These binaries clutter up the disk and are not intended for use as regular tools, so the administrator is urged to remove them after they are built and run.
A help text showing available script options is displayed when “verify_cudaX.sh -h” is run.
The script can be run as follows on the head or regular node (some output elided):
Example
Another method to verify that CUDA is working, is to build and use the deviceQuery command on a node accessing one or more GPUs. The deviceQuery command lists all CUDA-capable GPUs that a device can access, along with several of their properties (some output elided):
Example
The CUDA user manual has further information on how to run compute jobs using CUDA.
9.3.0.1 Further Information On CUDA Verification
More on verification can be found in the NVIDIA CUDA INSTALLATION GUIDE FOR LINUX at https://docs.nvidia.com/cuda/pdf/CUDA_Installation_Guide_Linux.pdf.
9.4 Verifying OpenCL
CUDA also contains an OpenCL compatible interface. To verify that OpenCL is working, or failing, the verify_opencl.sh script can be run on the node with the GPU (some output elided):
Example
…many more tests, all of which should end with PASSED…
9.5 Configuring The X Server For SLES15
To support the X server, X.org, in SLES15, the cuda-driver, and cuda-xorg packages need to be installed.
The default configuration file for X.org is /etc/X11/xorg.conf. If there is no xorg.conf file, then a template can be generated with the help of Xorg -configure.
The following file pathname lines may need to be added to the Files section of the X configuration file:
The following dynamic module loading line may need to be added to the Module section of the X configuration:
The following graphics device description lines need to be replaced in the Device section of the X configuration:
The BusID line may need to be replaced with the ID shown for the GPU by the lspci command.
Example
Using GPUs for an X server as well as for general computing with CUDA can have some issues. These are considered in https://nvidia.custhelp.com/app/answers/detail/a_id/3029/~/using-cuda-and-x.
9.6 NVIDIA Validation Suite (Package: cuda-dcgm-nvvs)
The NVIDIA Validation Suite (NVVS) runs diagnostics to validate the NVIDIA software components. Running the nvvs binary directly is now deprecated. The diagnostics are now run instead as part of the dcgmi diag command.
The package for NVVS is not installed by default.
If the package is not installed, then an attempt to run the dcgmi utility fails:
Example
The package can be installed with:
Example
After it is installed, the node on which the installation is done must be rebooted.
Running the diagnostic after the reboot should display output similar to:
Example
9.7 Further NVIDIA Configuration Via The Cluster Manager
After the installation and verification has been carried out for CUDA drivers, further configuration as part of CMDaemon management can be carried out, as explained in section 3.16.2 of the Administrator Manual.