- Linpack 测试 GOTOBLAS+MPICH+HPL -

# 环境搭建

# 安装 GOTO 库

  1. 官方下载网站下载:GotoBLAS2-1.13.tar.gz
  2. 在 Linux 中解压,执行 make CC=gcc BINARY=64 TARGET=NEHALEM 失败
../libgoto2_nehalem-r1.13.a(ssymv_U.o): error adding symbols: 错误的值
collect2: error: ld returned 1 exit status

继续执行

gedit  f_check
# 298 行改为如下:
# print MAKEFILE "FEXTRALIB=$linker_L -lgfortran -lm -lquadmath -lm $linker_a\n";
make clean
make CC=gcc BINARY=64 TARGET=NEHALEM USE_OPENMP=1 INTERFACE64=1

成功!

  GotoBLAS build complete.

    OS               ... Linux             
    Architecture     ... x86_64               
    BINARY           ... 64bit                 
    C compiler       ... GCC  (command line : gcc)
    Fortran compiler ... G77  (command line : g77)
    Library Name     ... libgoto2_nehalem-r1.13.a (Single threaded)  

# 安装 MPICH

  1. 官方下载网站下载:mpich-3.3.2.tar.gz
  2. 解压,新建文件夹 mpich 作为安装文件夹
cd mpich-3.3.2/
./configure --prefix=/home/riolu/HPL/mpich

提示无 Fortran 77 compiler,切换至管理员安装

sudo apt-get install gfortran

提示无 C++ compiler,再切换至管理员安装……

sudo apt-get install g++
  1. 好了,接下来
make
make install
gedit ~/.bashrc

在后面加上

export PATH=/home/riolu/HPL/mpich/bin:$PATH
export MANPATH=/home/riolu/HPL/mpich/man:$MANPATH
export LD_LIBRARY_PATH=/home/riolu/HPL/mpich/lib:$LD_LIBRARY_PATH //不知要不要

保存后

source ~/.bashrc

看下 $PATH

$ echo $PATH
/home/riolu/HPL/mpich/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
  1. 测试
riolu@sinki-virtual-machine:~/HPL/mpich-3.3.2$ mpirun -np 10 ./examples/cpi
Process 4 of 10 is on sinki-virtual-machine
Process 1 of 10 is on sinki-virtual-machine
Process 8 of 10 is on sinki-virtual-machine
Process 2 of 10 is on sinki-virtual-machine
Process 3 of 10 is on sinki-virtual-machine
Process 0 of 10 is on sinki-virtual-machine
Process 5 of 10 is on sinki-virtual-machine
Process 7 of 10 is on sinki-virtual-machine
Process 6 of 10 is on sinki-virtual-machine
Process 9 of 10 is on sinki-virtual-machine
pi is approximately 3.1415926544231256, Error is 0.0000000008333325
wall clock time = 0.134519

成功!

# HPL 安装与编译

  1. 官方下载网站下载:hpl.tar.gz
  2. 进入安装文件夹下的 setup,在 setup 中中找到 Make.Linux_PII_FBLAS将其放置到上层目录并且命名为 Make.my
  3. 修改 Make.my
        ARCH         = my
        TOPdir       = $(HOME)/HPL/hpl-2.3 /*改为hpl解压后产生文件夹*/
        MPdir        = $(HOME)/HPL/mpich /*改为mpich安装文件夹*/
        MPlib        = $(MPdir)/lib
        LAdir        = $(HOME)/HPL/GotoBLAS2 /*GotoBLAS2解压文件夹*/
        LAinc        =
        LAlib        = $(LAdir)/libgoto2_nehalemp-r1.13.a
        HPL_OPTS     = -DHPL_CALL_CBLAS
        CC           = $(HOME)/HPL/mpich/bin/mpicc
        CCFLAGS      = $(HPL_DEFS) -fomit-frame-pointer -fopenmp -O3 -funroll-loops
        LINKER       = $(HOME)/HPL/mpich/bin/mpif77
        LINKFLAGS = $(CCFLAGS)

执行

make arch=my
  1. 此时查看安装文件夹下 bin,会看到有 my 文件夹,里面有 HPL.datxhpl ,安装完成。

结果运行 mpirun -np 2 ./xhpl 得到报错信息??

    ** On entry to DTRSM  parameter number  9 had an illegal value

死了。失败,重新编译前加入 make arch=my clean_arch_all

# 集群同步设置

# psftp 传文件

psftp> open sinki@10.201.0.6
Using username "sinki".
sinki@10.201.0.6's password:
Remote working directory is /home/sinki
psftp>put F:\Share\GotoBLAS2-1.13.tar.gz

其他用法参考:PSFTP 用法

# Xming 图形界面和 jupyter 挂起

nautilus
nohup jupyter notebook --allow-root > jupyter.log 2>&1 &

修改日期:2020 年 12 月 4 日

更新于 阅读次数