Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.59 KB

3.3-cuda-nv_hpc.md

File metadata and controls

50 lines (35 loc) · 1.59 KB

CUDA&&NV_HPC

CUDA

  • 基于cuda local deb install 可以避免基于cuda依赖的包版本问题,不需要事先安装cuda驱动

cuda-11.6

wget <https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin>
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget <https://developer.download.nvidia.com/compute/cuda/11.6.0/local_installers/cuda-repo-ubuntu2004-11-6-local_11.6.0-510.39.01-1_amd64.deb>
sudo dpkg -i cuda-repo-ubuntu2004-11-6-local_11.6.0-510.39.01-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-6-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
  • 安装完成后不可禁用安装源

NV_HPC

  • need gcc,g++,gfortran

modulefiles

  • 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/22.5
 module load nvhpc/22.5

bash

  • Alternatively, the shell environment may be initialized to use the HPC SDK.
  • In bash, sh, or ksh, use these commands:
MANPATH=$MANPATH:/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/compilers/man; export MANPATH
PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/compilers/bin:$PATH; export PATH
  • Once the 64-bit compilers are available, you can make the OpenMPI
  • commands and man pages accessible using these commands.
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/mpi/bin:$PATH
export MANPATH=$MANPATH:/opt/nvidia/hpc_sdk/Linux_x86_64/22.5/comm_libs/mpi/man