linux部署开发者工具包NVIDIA HPC SDK

NVIDIA HPC SDK是一套综合的编译器、库和工具,用于GPU加速HPC建模和仿真应用。随着对运行Linux的NVIDIA gpu和x86-64、OpenPOWER或Arm cpu的支持,NVIDIA HPC SDK为构建跨平台、性能可移植和可扩展的HPC应用程序提供了经过验证的工具和技术。

下面我们就来看看HPC SDK的部署

首先我们去下载部署包,注意这个包也是跟cuda有版本对应,我们HPC SDK选择的24.5,支持cuda12.4,下载地址:https://developer.nvidia.com/hpc-sdk-releases

下面是安装和配置过程

wget https://developer.download.nvidia.com/hpc-sdk/24.5/nvhpc_2024_245_Linux_x86_64_cuda_12.4.tar.gz
mkdir -p /opt/compiler
mv nvhpc_2024_245_Linux_x86_64_cuda_12.4.tar.gz /opt/compiler
cd /opt/compiler
tar -zxvf nvhpc_2024_245_Linux_x86_64_cuda_12.4.tar.gz
cd nvhpc_2024_245_Linux_x86_64_cuda_12.4
./install

然后会有如下打印

Welcome to the NVIDIA HPC SDK Linux installer!

You are installing NVIDIA HPC SDK 2024 version 24.5 for Linux_x86_64.
Please note that all Trademarks and Marks are the properties
of their respective owners.

Press enter to continue...


A single system installation is appropriate for a single system or a
homogeneous cluster.  A network installation should be selected for a
heterogeneous cluster.  For either a single system or network installation,
the HPC SDK configuration (localrc) is created at install time and saved
in the installation directory.

An auto installation is appropriate for any scenario.  The HPC SDK
configuration (localrc) is created at first use and stored in each user's
home directory.

1  Single system install
2  Network install
3  Auto install

Please choose install option:
3

Please specify the directory path under which the software will be installed.
The default directory is /opt/nvidia/hpc_sdk, but you may install anywhere
you wish, assuming you have permission to do so.

Installation directory? [/opt/nvidia/hpc_sdk]


Note: directory /opt/nvidia/hpc_sdk was created.

Installing NVIDIA HPC SDK version 24.5 into /opt/nvidia/hpc_sdk

Making symbolic link in /opt/nvidia/hpc_sdk/Linux_x86_64

generating environment modules for NV HPC SDK 24.5 ... done.
Installation complete.
HPC SDK successfully installed into /opt/nvidia/hpc_sdk

If you use the Environment Modules package, that is, the module load
command, the NVIDIA HPC SDK includes a script to set up the
appropriate module files.

% module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/24.5
% module load nvhpc/24.5

Alternatively, the shell environment may be initialized to use the HPC SDK.

In csh, use these commands:

% set path = (/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/bin $path)
% setenv MANPATH /opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/man:"$MANPATH"

To use MPI, also set:

% set path = (/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/comm_libs/mpi/bin $path)

In bash, sh, or ksh, use these commands:

$ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/bin:$PATH
$ export MANPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/man:$MANPATH

To use MPI, also set:

$ export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/comm_libs/mpi/bin:$PATH

Please check https://developer.nvidia.com for documentation,
use of NVIDIA HPC SDK software, and other questions.

按回车确认根据提示进行安装,默认安装位置为/opt/nvidia/hpc_sdk。

最后我们配置下环境变量,我们配置在/etc/profile中

vim /etc/profile
#最下面添加如下配置
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/bin:$PATH
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/comm_libs/mpi/bin:$PATH
export MANPATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/compilers/man:$MANPATH
export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/24.5
export PGI=/opt/nvidia/hpc_sdk

上述配置好以后我们使用source命令使其生效

source /etc/profile

最后使用以下命令进行验证即可。

pgcc -V

202507211144527993528649.png

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://sulao.cn/post/1096

评论列表

0%