HPL & HPCG benchmark test

本文章将记录多机和单机运行HPL和HPCG时碰到的问题,以及关于Linux使用的一些命令。
首先我想看一下这个文件是什么时候更新的,可以使用stat命令:
stat:文件/文件系统的详细信息显示;
使用格式:stat 文件名
stat命令主要用于显示文件或文件系统的详细信息,该命令的语法格式如下:
-f  不显示文件本身的信息,显示文件所在文件系统的信息
-L  显示符号链接
-t  简洁模式,只显示摘要信息
touch命令可以手动更新stat命令展示的Access和Modify。
touch -d 2000-01-01 file: 将file的Access和Modify时间改为2000-01-01
touch -a file:将file的Access时间改为当前系统时间
touch -m file:将filet的Modify时间改为当前系统时间

先关注HPL,阅读README_HPL_PASCAL_VOLTA_cuda10_v2.txt了解HPL怎么才能跑起来。
README中有一些我不理解的地方,google之后在下面列举并解释:
DGX-2
NVIDIA DGX-2 是 NVIDIA 首款 2-petaFLOPS 系统,它整合了 16 个完全互联的 GPU,使深度学习性能提升 10 倍,突破了人工智能速度和规模的障碍。它采用 NVIDIA® DGX™ 软件和基于 NVIDIA NVSwitch 技术构建的可扩展架构,可以帮您应对众多复杂的人工智能挑战.

根据README中说的步骤一步步走:

  1. Set up the running environment with openmpi 3.1.x and cuda 10 installed. numactl is also required to be installed to run the example scripts.
mpirun --verison #check mpi version
nvcc --version #check cuda version
numactl --hardware #check numa configuration

这里解释一下NUMA是什么。
服务器CPU有三种常见的架构SMP, NUMA, MPP.
SMP(Symmetric Multiprocessing)
对称多处理器。在SMP中所有的处理器都是对等的, 它们通过总线连接共享同一块物理内存,这也就导致了系统中所有资源(CPU、内存、I/O等)都是共享的。当我们打开服务器的背板盖,如果发现有多个cpu的槽位,但是却连接到同一个内存插槽的位置,那一般就是smp架构的服务器。

ls /sys/device/system/node/ #If only node0 can be seen, that means SMP design.

NUMA(Non-Uniform Memory Access)
NUMA 将cpu的资源分开,以node 为单位进行切割,每个node 里有着独有的core ,memory 等资源,这也就带来了cpu在性能使用上的提升,但同样存在问题是2个node 之间的资源交互非常慢。

MPP(Massive Parallel Processing)
这个可以理解为刀片服务器,每个刀扇里的都是一台独立的SMP架构服务器,且每个刀扇之间均有高性能的网络设备进行交互,保证了SMP服务器之间的数据传输性能。

  1. Modify the main run script (run_x_node_xxxxx)

Set the PATH and LD_LIBRARY_PATH or load modules as needed for your specific system so that the openmpi and cuda version you want to run is in the running environment.
Set the number of MPI process equal to the total number of GPUs in the run.

这里只要把对应的PATH和LD_LIBRARY_PATH设置好就可以了,并且选择一个GPU数量正确的脚本。

  1. Modify the input script (run_linpack_xxxxxx)

Set CPU_CORES_PER_RANK.
Check CPU:GPU affinity. The case statement uses numactl and CUDA_VISIBLE_DEVICES to bind GPUs to the CPU socket they are attached to whenever practical.
Make sure that APP variable is pointing to the HPL binary that matches your running env
这里需要设置的是每个rank分配几个CPU核,可以使用命令nvidia-smi topo -m看一下CPU/GPU affinity

  1. Modify the HPL.dat

The examples include several reference HPL.dat_xxxxxxx files used by the example run scripts. You may want to modify one of them to match your system configuration and for tuning performance.
PxQ must equal the number of GPUs.
N and NB will be key variables to adjust for perf tuning.
这里要调的是N, NB, P, Q. 注意P*Q要等于GPU数量。

碰到了一些小问题,如何取消vim的搜索高亮:
在命令行状态下,输入:noh即可。

Linux tee命令用于读取标准输入的数据,并将其内容输出成文件。
tee指令会从标准输入设备读取数据,将其内容输出到标准输出设备,同时保存成文件。

然后就可以运行

  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值