算力测试Linux,附录:计算力的标准Linpack测试详细指南(1)

附录:计算力的标准Linpack测试详细指南

云计算系统的一个重要作用是向用户提供计算力,评价一个系统的总体计算力的方法就是采用一个统一的测试标准作为评判,现在评判一个系统计算力的方法中最为知名的就是Linpack测试,世界最快500台巨型机系统的排名采用的就是这一标准。掌握Linpack测试技术对于在云计算时代评判一个云系统的计算力也有着重要意义。本附录将对Linpack测试技术作详细的介绍。

1.Linpack安装

在安装之前,我们需要做一些软件准备,相关的软件及下载地址如下。

(1)Linux平台,***稳定内核的Linux发行版***,可以选择Red hat, Centos等。

(2)MPICH2,这是个并行计算的软件,可以到http://www.mcs.anl.gov/research/projects/mp ich2/downloads/index.php?s=downloads下载***的源码包。

(3)Gotoblas,BLAS库(Basic Linear Algebra Subprograms)是执行向量和矩阵运算的子程序集合,这里我们选择公认性能***的Gotoblas,***版可到http://www.tacc.utexas.edu/tacc- projects/下载,需要注册。

安装方法和步骤如下。

(1)安装MPICH2,并配置好环境变量,本书前面已作介绍。

(2)进入Linux系统,建议使用root用户,在/root下建立linpack文件夹,解压下载的Gotoblas和HPL文件到linpack文件夹下,改名为Gotoblas和hpl。#tar xvf GotoBLAS-*.tar.gz

#mv GotoBLAS-*  ~/linpack/Gotoblas

#tar xvf  hpl-*.tar.gz

#mv hpl-*  ~/linpack/hpl

(3)安装Gotoblas。

进入Gotoblas文件夹,在终端下执行./ quickbuild.64bit(如果你是32位系统,则执行./ quickbuild.31bit)进行快速安装,当然,你也可以依据README里的介绍自定义安装。如果安装正常,在本目录下就会生成libgoto2.a和libgoto2.so两个文件。

(4)安装HPL。

进入hpl文件夹从setup文件夹下提取与自己平台相近的Make.文件,复制到hpl文件夹内,比如我们的平台为Intel xeon,所以就选择了Make.Linux_PII_FBLAS,它代表Linux操作系统、PII平台、采用FBLAS库。

编辑刚刚复制的文件,根据说明修改各个选项,使之符合自己的系统,比如我们系统的详细情况为,Intel xeon平台,mpich2安装目录为/usr/local/mipch2,hpl和gotoblas安装目录为/root/linpack,下面是我们的配置文件Make.Linux_xeon,对需要修改的部分我们做了注解,大家可以参考修改:# - shell --------------------------------------------------------------

# ----------------------------------------------------------------------

#

SHELL        = /bin/sh

#

CD           = cd

CP           = cp

LN_S        = ln -s

MKDIR       = mkdir

RM          = /bin/rm -f

TOUCH       = touch

#

# ----------------------------------------------------------------------

# - Platform identifier ------------------------------------------------

# ----------------------------------------------------------------------

#

ARCH         = Linux_xeon//设置平台类型

#

# ----------------------------------------------------------------------

# - HPL Directory Structure / HPL library ------------------------------

# ----------------------------------------------------------------------

#

TOPdir       = $(HOME)/linpack/hpl//设置测试软件的根目录

INCdir       = $(TOPdir)/include

BINdir       = $(TOPdir)/bin/$(ARCH)

LIBdir       = $(TOPdir)/lib/$(ARCH)

#

HPLlib       = $(LIBdir)/libhpl.a

#

# ----------------------------------------------------------------------

# - Message Passing library (MPI) --------------------------------------

# ----------------------------------------------------------------------

# MPinc tells the  C  compiler where to find the Message Passing library

# header files,  MPlib  is defined  to be the name of  the library to be

# used. The variable MPdir is only used for defining MPinc and MPlib.

#

MPdir        = /usr/local/mpich2//设置mpich的安装目录

MPinc        = -I$(MPdir)/include

MPlib        = $(MPdir)/lib/libmpich.a

#

# ----------------------------------------------------------------------

# - Linear Algebra library (BLAS or VSIPL) -----------------------------

# ----------------------------------------------------------------------

# LAinc tells the  C  compiler where to find the Linear Algebra  library

# header files,  LAlib  is defined  to be the name of  the library to be

# used. The variable LAdir is only used for defining LAinc and LAlib.

#

LAdir        = $(HOME)/linpack/GotoBLAS2//设置gotoblas的目录

LAinc        =

LAlib        = $(LAdir)/libgoto2.a $(LAdir)/libgoto2.so//加入库支持

#

# ----------------------------------------------------------------------

# - F77 / C interface --------------------------------------------------

# ----------------------------------------------------------------------

# You can skip this section  if and only if  you are not planning to use

# a  BLAS  library featuring a Fortran 77 interface.  Otherwise,  it  is

# necessary  to  fill out the  F2CDEFS  variable  with  the  appropriate

# options.  **One and only one**  option should be chosen in **each** of

# the 3 following categories:

#

# 1) name space (How C calls a Fortran 77 routine)

#

# -DAdd_              : all lower case and a suffixed underscore  (Suns,

#                       Intel, ...),                           [default]

# -DNoChange          : all lower case (IBM RS6000),

# -DUpCase            : all upper case (Cray),

# -DAdd__             : the FORTRAN compiler in use is f2c.

#

# 2) C and Fortran 77 integer mapping

#

# -DF77_INTEGER=int   : Fortran 77 INTEGER is a C int,         [default]

# -DF77_INTEGER=long  : Fortran 77 INTEGER is a C long,

# -DF77_INTEGER=short : Fortran 77 INTEGER is a C short.

#

# 3) Fortran 77 string handling

#

# -DStringSunStyle    : The string address is passed at the string loca-

#                           tion on the stack, and the string length is then

#                           passed as  an  F77_INTEGER  after  all  explicit

#                           stack arguments,                       [default]

# -DStringStructPtr   : The address  of  a  structure  is  passed  by  a

#                           Fortran 77  string,  and the structure is of the

#                           form: struct {char *cp; F77_INTEGER len;},

# -DStringStructVal   : A structure is passed by value for each  Fortran

#                           77 string,  and  the  structure is  of the form:

#                           struct {char *cp; F77_INTEGER len;},

# -DStringCrayStyle   : Special option for  Cray  machines,  which  uses

#                           Cray  fcd  (fortran  character  descriptor)  for

#                           interoperation.

#

F2CDEFS      = -DAdd__ -DF77_INTEGER=int-DStringSunStyle

#

# ----------------------------------------------------------------------

# - HPL includes / libraries / specifics -------------------------------

# ----------------------------------------------------------------------

#

HPL_INCLUDES = -I$(INCdir) -I$(INCdir)/$(ARCH) $(LAinc) $(MPinc)

HPL_LIBS     = $(HPLlib) $(LAlib) $(MPlib)

#

# - Compile time options -----------------------------------------------

#

# -DHPL_COPY_L           force the copy of the panel L before bcast;

# -DHPL_CALL_CBLAS       call the cblas interface;

# -DHPL_CALL_VSIPL       call the vsip  library;

# -DHPL_DETAILED_TIMING  enable detailed timers;

#

# By default HPL will:

#    *) not copy L before broadcast,

#    *) call the BLAS Fortran 77 interface,

#    *) not display detailed timing information.

#

HPL_OPTS     =

#

# ----------------------------------------------------------------------

#

HPL_DEFS     = $(F2CDEFS) $(HPL_OPTS) $(HPL_INCLUDES)

#

# ----------------------------------------------------------------------

# - Compilers / linkers - Optimization flags ---------------------------

# ----------------------------------------------------------------------

#

CC           = /usr/local/mpich2/bin/mpicc//设置gcc编译器为mpicc

CCNOOPT      = $(HPL_DEFS)

CCFLAGS      = $(HPL_DEFS) -fomit-frame-pointer -O3 -funroll-loops -W -Wall

#

# On some platforms,  it is necessary  to use the Fortran linker to find

# the Fortran internals used in the BLAS library.

#

LINKER       = /usr/local/mpich2/bin/mpif77//设置fortran编译器为mpif77

LINKFLAGS    = $(CCFLAGS)

#

ARCHIVER     = ar

ARFLAGS      = r

RANLIB       = echo

#

# -----------------------------/usr/local/mpich2/bin/mpicc---------------------

点赞 0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值