CentOS 8.5环境配置
在CentOS 8.5系统下配置高性能计算环境。主要包含编译器套件、分布式并行套件、各种数值计算库、Python环境、辅助管理工具、GPU开发环境等。利用CentOS自带的RPM仓库,加上OpenHPC和Intel oneAPI仓库,大体上能满足yum和dnf安装需求!
安装配置过程零零散散,特汇集一处,随时增量完善,以备忘!
工具命令
- yum
- dnf
- module
安装源仓库
-
repolist
# dnf repolist 仓库 id 仓库名称 OpenHPC OpenHPC-2 - Base OpenHPC-updates OpenHPC-2 - Updates appstream CentOS Linux 8 - AppStream baseos CentOS Linux 8 - BaseOS cudnn-local-rhel8-8.5.0.96 cudnn-local-rhel8-8.5.0.96 epel Extra Packages for Enterprise Linux 8 - x86_64 extras CentOS Linux 8 - Extras oneAPI Intel(R) oneAPI repository
-
OpenHPC仓库包含很多HPC开发所用的工具和数学库(比如,SuperLU和MUMPS)
-
安装Intel oneAPI 仓库(包含rpm安装包)
yum install intel-oneapi-toolkit-release-ohpc
-
搜索powertools会有很多rpm安装包
dnf --enablerepo=powertools search openblas-devel
-
安装environment-modules可以使用module管理配置开发环境
$ rpm -qa | grep env environment-modules-4.5.2-1.el8.x86_64
-
安装conda-4.10.3, 用conda管理python环境
# rpm -qa | grep conda anaconda-gui-33.16.5.6-1.el8.x86_64 conda-4.10.3-1.el8.noarch libreport-anaconda-2.9.5-15.el8.x86_64 python3-conda-4.10.3-1.el8.noarch anaconda-core-33.16.5.6-1.el8.x86_64 anaconda-widgets-33.16.5.6-1.el8.x86_64 anaconda-tui-33.16.5.6-1.el8.x86_64 anaconda-user-help-8.3.3-1.el8.centos.noarch python3-conda-package-handling-1.7.3-2.el8.x86_64
-
~/.bashrc内容
$ cat .bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific environment PATH="$HOME/.local/bin:$HOME/bin:$PATH" export PATH export PS1='\u@\h \w \n\$ ' # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions #load mpich #module load /usr/share/modulefiles/mpi/mpich-x86_64 #load openmpi env module load /usr/share/modulefiles/mpi/openmpi-x86_64 #load nvhpc env #module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/22.2 #export KOKKOS_PATH=~/local.opt export PATH=$PATH:/usr/local/cuda/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64 # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/usr/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/usr/etc/profile.d/conda.sh" ]; then . "/usr/etc/profile.d/conda.sh" else export PATH="/usr/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<
-
其他版本gcc-toolset
$ yum search gcc-toolset 上次元数据过期检查:1:03:17 前,执行于 2023年03月07日 星期二 13时12分30秒。 ============================================================== 名称 和 概况 匹配:gcc-toolset ============================================================== gcc-toolset-10.x86_64 : Package that installs gcc-toolset-10 gcc-toolset-10-runtime.x86_64 : Package that handles gcc-toolset-10 Software Collection. gcc-toolset-11.x86_64 : Package that installs gcc-toolset-11 gcc-toolset-11-runtime.x86_64 : Package that handles gcc-toolset-11 Software Collection. gcc-toolset-9.x86_64 : Package that installs gcc-toolset-9 gcc-toolset-9-runtime.x86_64 : Package that handles gcc-toolset-9 Software Collection. ================================================================== 名称 匹配:gcc-toolset ================================================================== gcc-toolset-10-annobin.x86_64 : Annotate and examine compiled binary files gcc-toolset-10-binutils.x86_64 : A GNU collection of binary utilities gcc-toolset-10-binutils-devel.i686 : BFD and opcodes static and dynamic libraries and header files gcc-toolset-10-binutils-devel.x86_64 : BFD and opcodes static and dynamic libraries and header files gcc-toolset-10-build.x86_64 : Package shipping basic build configuration gcc-toolset-10-dwz.x86_64 : DWARF optimization and duplicate removal tool gcc-toolset-10-dyninst.x86_64 : An API for Run-time Code Generation gcc-toolset-10-dyninst-devel.x86_64 : Header files for compiling programs with Dyninst gcc-toolset-10-elfutils.x86_64 : A collection of utilities and DSOs to handle ELF files and DWARF data gcc-toolset-10-elfutils-debuginfod-client.i686 : Library and command line client for build-id HTTP ELF/DWARF server gcc-toolset-10-elfutils-debuginfod-client.x86_64 : Library and command line client for build-id HTTP ELF/DWARF server gcc-toolset-10-elfutils-debuginfod-client-devel.i686 : Libraries and headers to build debuginfod client applications gcc-toolset-10-elfutils-debuginfod-client-devel.x86_64 : Libraries and headers to build debuginfod client applications gcc-toolset-10-elfutils-devel.i686 : Development libraries to handle compiled objects ...
-
NVHPC和CUDA开发安装包需要去NVIDIA官网下载安装,用module配置加载