liu_shaobo

导航

 

 

基于CPU的基准测试 参考

 

系统: Centos7.6 x86_64 

 

1、配置GCC编译器

# yum install -y gcc gcc-c++ gcc-gfortran glibc glibc-devel make

 

2、安装Intel MKL

# wget http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15816/l_mkl_2019.5.281.tgz
# tar zxvf l_mkl_2019.5.281.tgz
# cd l_mkl_2019.5.281
# sh install.sh

配置MKL环境变量(可以写入/etc/profile)

# source /opt/intel/compilers_and_libraries_2019.5.281/linux/mkl/bin/mklvars.sh intel64

 

3、安装MPICH

# yum install -y mpich-3.2 mpich-3.2-devel

##可以写入/etc/profile # export PATH=/usr/lib64/mpich-3.2/bin:$PATH

 

4、安装CUDA

安装kernel-devel包

# yum install kernel-devel-$(uname -r) kernel-headers-$(uname -r)

 

禁用Nouveau驱动

# lsmod |grep nouveau
# modprobe -r nouveau
# cat > /etc/modprobe.d/blacklist.conf << EOF
blacklist nouveau
options nouveau modeset=0
EOF

 

安装CUDA

# yum install -y cuda-10-2

查看GPU状态

# nvidia-smi

 

5、安装HPL

# wget https://files.cnblogs.com/files/liu-shaobo/hpl-2.0_FERMI_v15.tar.gz
# tar zxvf hpl-2.0_FERMI_v15.tgz 
# mv hpl-2.0_FERMI_v15 hpl_gpu && cd hpl_gpu
# cp Make.CUDA Make.CUDA.bak
# sed -i 's#^TOPdir.*#TOPdir = /root/hpl_gpu#' Make.CUDA
# sed -i 's#^LAdir.*#LAdir = /opt/intel/mkl/lib/intel64#' Make.CUDA
# sed -i 's#^LAMP5dir.*#LAMP5dir = /opt/intel/compilers_and_libraries/linux/lib/intel64#' Make.CUDA
# sed -i 's#^LAinc.*#LAinc = -I/opt/intel/mkl/include#' Make.CUDA

编译HPL

# make arch=CUDA

 

6、测试

# cd bin/CUDA
# sed -i 's#^HPL_DIR.*#HPL_DIR=/root/hpl_gpu' run_linpack
# mpirun -np 1 ./run_linpack > HPL-Benchmark.txt

因为只有单卡GPU,将HPL.dat的PxQ都改成1测试

 

 
posted on 2020-09-12 12:15  liu_shaobo  阅读(1806)  评论(0编辑  收藏  举报