Debian 12 bookworm
Sponsored Link

NVIDIA : Install HPC SDK2023/07/14

 
Install NVIDIA HPC SDK.
[1]
[2] Install NVIDIA HPC SDK.
root@dlp:~#
curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg

root@dlp:~#
echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | tee /etc/apt/sources.list.d/nvhpc.list

root@dlp:~#
apt update

root@dlp:~#
apt install -y nvhpc-23-5 environment-modules
root@dlp:~#
vi /etc/environment-modules/modulespath
# add to the end

/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/23.5  nvhpc-hpcx-cuda12/23.5  nvhpc-nompi/23.5
nvhpc-hpcx-cuda11/23.5   nvhpc-hpcx/23.5         nvhpc/23.5

Key:
modulepath

root@dlp:~#
module load nvhpc/23.5
root@dlp:~#
nvc --version


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

root@dlp:~#
nvaccelinfo


CUDA Driver Version:           12000
NVRM version:                  NVIDIA UNIX x86_64 Kernel Module  525.105.17  Tue Mar 28 18:02:59 UTC 2023

Device Number:                 0
Device Name:                   NVIDIA GeForce GTX 1060 6GB
Device Revision Number:        6.1
Global Memory Size:            6367543296
Number of Multiprocessors:     10
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:                    1847 MHz
Execution Timeout:             No
Integrated Device:             No
Can Map Host Memory:           Yes
Compute Mode:                  default
Concurrent Kernels:            Yes
ECC Enabled:                   No
Memory Clock Rate:             4004 MHz
Memory Bus Width:              192 bits
L2 Cache Size:                 1572864 bytes
Max Threads Per SMP:           2048
Async Engines:                 2
Unified Addressing:            Yes
Managed Memory:                Yes
Concurrent Managed Memory:     Yes
Preemption Supported:          Yes
Cooperative Launch:            Yes
Default Target:                cc61
[3] Verify installation with a common user to run a test program.
debian@dlp:~$
module load nvhpc/23.5
### C program

debian@dlp:~$
vi helloworld.c
# create new

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

# compile

debian@dlp:~$
nvc -o helloworld helloworld.c
# run

debian@dlp:~$
./helloworld

Hello World
### C++ program

debian@dlp:~$
vi helloworld.cpp
# create new

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

# compile

debian@dlp:~$
nvc++ -o helloworld2 helloworld.cpp
# run

debian@dlp:~$
./helloworld2

Hello World!
### Fortran program

debian@dlp:~$
vi helloworld.f90
# create new

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

# compile

debian@dlp:~$
nvfortran -o helloworld3 helloworld.f90
# run

debian@dlp:~$
./helloworld3

Hello World!
Matched Content