0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

NVIDIA HPC SDK のインストールとパスの設定

Last updated at Posted at 2024-07-03

NVIDIA HPC SDK のインストールとパスの設定

NVIDIA HPC コンパイラは並列プログラミングモデルに対応し,NVIDIA GPU用の最適化・並列化コードを生成できるマルチプラットフォーム対応のプログラム開発ができるコンパイラ.

NVIDIA HPC コンパイラとは

NVIDIA HPC SDK のインストールおよび PATH通し

1. The NVIDIA HPC SDKよりインストール

以下は一例(公式サイト参照)

$ curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
$ echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
$ sudo apt-get update -y
$ sudo apt-get install -y nvhpc-24-5-cuda-multi

既に以前一度インストールがある場合以下で削除してから上記を実行

$ sudo apt-get remove nvhpc-24-5-cuda-multi

.bashrc や .bash_profile などにパスの追記 , HPC SDK DOCUMENTATIONを参照する.

# NVIDIA HPC SDK
export NVARCH=`uname -s`_`uname -m`
export NVCOMPILERS=/opt/nvidia/hpc_sdk
export MANPATH=$MANPATH:$NVCOMPILERS/$NVARCH/24.5/compilers/man
export PATH=$NVCOMPILERS/$NVARCH/24.5/compilers/bin:$PATH
export PATH=$NVCOMPILERS/$NVARCH/24.5/comm_libs/mpi/bin:$PATH
export MANPATH=$MANPATH:$NVCOMPILERS/$NVARCH/24.5/comm_libs/mpi/man

確認

$ nvfortran --version
nvfortran 24.5-1 64-bit target on x86-64 Linux -tp cascadelake 
NVIDIA Compilers and Tools
Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?