CentOS Stream 10

NVIDIA : Install HPC SDK2025/08/07

 

Install NVIDIA HPC SDK.

[1]

Install NVIDIA driver first, refer to here.

[2] Install NVIDIA HPC SDK.
[root@dlp ~]#
dnf group -y install "Development tools"
[root@dlp ~]#
dnf config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo
[root@dlp ~]#
dnf -y install nvhpc-25-7 environment-modules
[root@dlp ~]#
vi /etc/environment-modules/modulespath
# add PATH like follows

# This file defines the initial setup for the modulefiles search path
# Each line containing one or multiple paths delimited by ':' will be
# added to the MODULEPATH environment variable.
/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles:/opt/nvidia/hpc_sdk/modulefiles

[root@dlp ~]#
source /etc/profile.d/modules.sh

[root@dlp ~]#
module avail

------------------------------------------------ /usr/share/Modules/modulefiles ------------------------------------------------
dot  module-git  module-info  modules  null  use.own

----------------------------------------------- /opt/nvidia/hpc_sdk/modulefiles ------------------------------------------------
nvhpc-byo-compiler/25.7  nvhpc-hpcx-2.20-cuda12/25.7  nvhpc-hpcx-cuda12/25.7  nvhpc-hpcx/25.7  nvhpc-nompi/25.7  nvhpc/25.7

Key:

[root@dlp ~]#
module load nvhpc/25.7
[root@dlp ~]#
nvc --version


nvc 25.7-0 64-bit target on x86-64 Linux -tp haswell
NVIDIA Compilers and Tools
Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

[root@dlp ~]#
nvaccelinfo


CUDA Driver Version:           13000
NVRM version:                  NVIDIA UNIX Open Kernel Module for x86_64  580.65.06  Release Build  (root@dlp.srv.world)  Thu Aug  7 11:
30:17 AM JST 2025

Device Number:                 0
Device Name:                   NVIDIA GeForce RTX 3060
Device Revision Number:        8.6
Global Memory Size:            12488343552
Number of Multiprocessors:     28
Concurrent Copy and Execution: Yes
Total Constant Memory:         65536
Total Shared Memory per Block: 49152
Registers per Block:           65536
Warp Size:                     32
Maximum Threads per Block:     1024
Maximum Block Dimensions:      1024, 1024, 64
Maximum Grid Dimensions:       2147483647 x 65535 x 65535
Maximum Memory Pitch:          2147483647B
Texture Alignment:             512B
Clock Rate:                    1777 MHz
Execution Timeout:             No
Integrated Device:             No
Can Map Host Memory:           Yes
Compute Mode:                  default
Concurrent Kernels:            Yes
ECC Enabled:                   No
Memory Clock Rate:             7501 MHz
Memory Bus Width:              192 bits
L2 Cache Size:                 2359296 bytes
Max Threads Per SMP:           1536
Async Engines:                 2
Unified Addressing:            Yes
Managed Memory:                Yes
Concurrent Managed Memory:     Yes
Preemption Supported:          Yes
Cooperative Launch:            Yes
Unified Memory:                HMM
Memory Models Flags:           -gpu=mem:separate, -gpu=mem:managed, -gpu=mem:unified
Default Target:                cc86
[3] Verify installation with a common user to run a test program.
[cent@dlp ~]$
module load nvhpc/25.7
### C program

[cent@dlp ~]$
vi helloworld.c
# create new

#include <stdio.h>
int main() {
  printf("Hello World\n");
}

# compile

[cent@dlp ~]$
nvc -o helloworld helloworld.c
# run

[cent@dlp ~]$
./helloworld

Hello World
### C++ program

[cent@dlp ~]$
vi helloworld.cpp
# create new

#include <iostream>
int main() {
  std::cout << "Hello World!\n";
}

# compile

[cent@dlp ~]$
nvc++ -o helloworld2 helloworld.cpp
# run

[cent@dlp ~]$
./helloworld2

Hello World!
### Fortran program

[cent@dlp ~]$
vi helloworld.f90
# create new

program helloworld
  print *, 'Hello World!'
end program helloworld

# compile

[cent@dlp ~]$
nvfortran -o helloworld3 helloworld.f90
# run

[cent@dlp ~]$
./helloworld3

Hello World!
Matched Content