这篇记录 Singularity 的源码安装,以及使用 NVIDIA HPC Benchmarks 容器运行 HPL/HPCG 前的准备。
安装 Go#
Singularity 3.x 需要 Go。
wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
tar --directory=/home/apps -xzvf go1.13.linux-amd64.tar.gz
配置环境变量:
export PATH=/home/apps/go/bin:$PATH
可以写入 ~/.bashrc、/etc/profile 或 Modulefile。
Go 不需要 configure、make、make install,解压后配置环境变量即可。
安装 OpenSSL#
wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1o/openssl-1.1.1o.tar.gz
tar -zxvf openssl-1.1.1o.tar.gz
cd openssl-1.1.1o
./config --prefix=/software/lib/openssl
make
make install
安装 Singularity#
wget https://github.com/singularityware/singularity/releases/download/v3.5.3/singularity-3.5.3.tar.gz
tar -xzvf singularity-3.5.3.tar.gz
cd singularity-3.5.3
./mconfig --prefix=/software/singularity
cd builddir
make
make install
配置环境变量:
export PATH=/software/singularity/bin:$PATH
如果遇到依赖库缺失,根据报错安装对应系统包。
拉取 NVIDIA HPL 容器#
NVIDIA NGC 提供 HPC Benchmarks 容器,可以获取不同版本的 HPL/HPCG。
singularity pull --docker-login hpc-benchmarks-21.4.sif docker://nvcr.io/nvidia/hpc-benchmarks:21.4-hpl
拉取后当前目录会生成:
hpc-benchmarks-21.4.sif
进入容器:
singularity shell --nv hpc-benchmarks-21.4.sif
容器内 /workspace 目录通常包含 benchmark 套件。
oneAPI / VTune 安装提示#
安装 Intel 工具链时可能出现 GUI 相关依赖提示,例如:
libgbm1libgtk-3-0xdg-utilslibnotify4libatspi2.0-0
如果只使用命令行编译器或运行库,这些提示有时可以后续再处理;如果需要 VTune GUI,则建议按发行版安装对应依赖。
Ubuntu/Debian 示例:
sudo apt-get install libgbm1 libgtk-3-0 xdg-utils libnotify4 libatspi2.0-0
备注#
Singularity 项目后来演进为 Apptainer。旧集群上继续使用 Singularity 3.x 没问题;新环境可以优先评估 Apptainer。


