本文记录MPI/CUDA开发环境搭建过程。
一、Linux
2.1 环境
操作系统 | Ubuntu 22.04.4 LTS |
VS Code | 1.92.1 |
Git | 2.34.1 |
GCC | 11.4.0 |
CMake | 3.22.1 |
2.2 VS Code
下载VS Code,然后安装以下插件,
Task Explorer Output Colorizer Git Extension Pack Git Graph Remote Developement Remote X11 | |
C/C++ Extension Pack C++ TestMate | |
Modern Fortran FORTRAN InstelliSense Fortran Breakpoint Support | |
Python Extension Pack | |
C# Dev Kit | |
Extension Pack for Intel Software Developer Tools | |
Nsight Visual Studio Code Edition |
2.3 oneAPI
# download the key to system keyring
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/nullecho "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.listsudo apt updatesudo apt install intel-oneapi-base-toolkit
sudo apt install intel-oneapi-hpc-toolkit
2.4 CUDA
lspci | grep -i nvidia
uname -m && cat /etc/*release
gcc --versionwget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install cuda-toolkit
sudo reboot
2.5 环境变量配置
二、Windows
2.1 环境
操作系统 | Windows 11 |
VS Code | 1.92.1 |
Git | 2.34.1 |
Visual Studio | Visual Studio Community 2022 |
CMake | 3.22.1 |
2.2 oneAPI
从Intel官网下载并安装oneAPI Base Toolkit 与oneAPI HPC Toolkit
2.3 CUDA Toolkit
从NVIDIA官网下载并安装CUDA Toolki。
网络资料
oneAPIhttps://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html
CUDA Zonehttps://developer.nvidia.com/cuda-zone/
NVIDIA CUDA Installation Guide for Linuxhttps://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html