NVIDIA : HPC SDK インストール2024/06/21 |
NVIDIA HPC SDK をインストールします。 |
|
[1] | |
[2] | 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:~#
vi /etc/environment-modules/modulespath # 最終行に追記
/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/24.5 nvhpc-hpcx/24.5 nvhpc-openmpi3/24.5 nvhpc-hpcx-cuda12/24.5 nvhpc-nompi/24.5 nvhpc/24.5 Key: modulepath
root@dlp:~#
root@dlp:~# module load nvhpc/24.5 nvc --version nvc 24.5-1 64-bit target on x86-64 Linux -tp haswell NVIDIA Compilers and Tools Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.root@dlp:~# nvaccelinfo CUDA Driver Version: 12040 NVRM version: NVIDIA UNIX x86_64 Kernel Module 550.90.07 Fri May 31 09:35:42 UTC 2024 Device Number: 0 Device Name: NVIDIA GeForce RTX 3060 Device Revision Number: 8.6 Global Memory Size: 12622168064 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 Default Target: cc86 |
[3] | 任意の一般ユーザーでテストプログラムを作成して動作確認します。 |
ubuntu@dlp:~$
module load nvhpc/23.5
# 新規作成 #include <stdio.h> int main() { printf("Hello World\n"); } # コンパイル ubuntu@dlp:~$ nvc -o helloworld helloworld.c
# 実行 ubuntu@dlp:~$ ./helloworld Hello World # 新規作成 #include <iostream> int main() { std::cout << "Hello World!\n"; } # コンパイル ubuntu@dlp:~$ nvc++ -o helloworld2 helloworld.cpp
# 実行 ubuntu@dlp:~$ ./helloworld2 Hello World! ### Fortran プログラム
ubuntu@dlp:~$
vi helloworld.f90 # 新規作成 program helloworld print *, 'Hello World!' end program helloworld # コンパイル ubuntu@dlp:~$ nvfortran -o helloworld3 helloworld.f90
# 実行 ubuntu@dlp:~$ ./helloworld3 Hello World! |
Sponsored Link |
|