算力测试Linux,附录:计算力的标准Linpack测试详细指南(1)
附錄:計(jì)算力的標(biāo)準(zhǔn)Linpack測(cè)試詳細(xì)指南
云計(jì)算系統(tǒng)的一個(gè)重要作用是向用戶提供計(jì)算力,評(píng)價(jià)一個(gè)系統(tǒng)的總體計(jì)算力的方法就是采用一個(gè)統(tǒng)一的測(cè)試標(biāo)準(zhǔn)作為評(píng)判,現(xiàn)在評(píng)判一個(gè)系統(tǒng)計(jì)算力的方法中最為知名的就是Linpack測(cè)試,世界最快500臺(tái)巨型機(jī)系統(tǒng)的排名采用的就是這一標(biāo)準(zhǔn)。掌握Linpack測(cè)試技術(shù)對(duì)于在云計(jì)算時(shí)代評(píng)判一個(gè)云系統(tǒng)的計(jì)算力也有著重要意義。本附錄將對(duì)Linpack測(cè)試技術(shù)作詳細(xì)的介紹。
1.Linpack安裝
在安裝之前,我們需要做一些軟件準(zhǔn)備,相關(guān)的軟件及下載地址如下。
(1)Linux平臺(tái),***穩(wěn)定內(nèi)核的Linux發(fā)行版***,可以選擇Red hat, Centos等。
(2)MPICH2,這是個(gè)并行計(jì)算的軟件,可以到http://www.mcs.anl.gov/research/projects/mp ich2/downloads/index.php?s=downloads下載***的源碼包。
(3)Gotoblas,BLAS庫(kù)(Basic Linear Algebra Subprograms)是執(zhí)行向量和矩陣運(yùn)算的子程序集合,這里我們選擇公認(rèn)性能***的Gotoblas,***版可到http://www.tacc.utexas.edu/tacc- projects/下載,需要注冊(cè)。
安裝方法和步驟如下。
(1)安裝MPICH2,并配置好環(huán)境變量,本書前面已作介紹。
(2)進(jìn)入Linux系統(tǒng),建議使用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。
進(jìn)入Gotoblas文件夾,在終端下執(zhí)行./ quickbuild.64bit(如果你是32位系統(tǒng),則執(zhí)行./ quickbuild.31bit)進(jìn)行快速安裝,當(dāng)然,你也可以依據(jù)README里的介紹自定義安裝。如果安裝正常,在本目錄下就會(huì)生成libgoto2.a和libgoto2.so兩個(gè)文件。
(4)安裝HPL。
進(jìn)入hpl文件夾從setup文件夾下提取與自己平臺(tái)相近的Make.文件,復(fù)制到hpl文件夾內(nèi),比如我們的平臺(tái)為Intel xeon,所以就選擇了Make.Linux_PII_FBLAS,它代表Linux操作系統(tǒng)、PII平臺(tái)、采用FBLAS庫(kù)。
編輯剛剛復(fù)制的文件,根據(jù)說明修改各個(gè)選項(xiàng),使之符合自己的系統(tǒng),比如我們系統(tǒng)的詳細(xì)情況為,Intel xeon平臺(tái),mpich2安裝目錄為/usr/local/mipch2,hpl和gotoblas安裝目錄為/root/linpack,下面是我們的配置文件Make.Linux_xeon,對(duì)需要修改的部分我們做了注解,大家可以參考修改:#?-?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//設(shè)置平臺(tái)類型
#
#?----------------------------------------------------------------------
#?-?HPL?Directory?Structure?/?HPL?library?------------------------------
#?----------------------------------------------------------------------
#
TOPdir???????=?$(HOME)/linpack/hpl//設(shè)置測(cè)試軟件的根目錄
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//設(shè)置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//設(shè)置gotoblas的目錄
LAinc????????=
LAlib????????=?$(LAdir)/libgoto2.a?$(LAdir)/libgoto2.so//加入庫(kù)支持
#
#?----------------------------------------------------------------------
#?-?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//設(shè)置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//設(shè)置fortran編譯器為mpif77
LINKFLAGS????=?$(CCFLAGS)
#
ARCHIVER?????=?ar
ARFLAGS??????=?r
RANLIB???????=?echo
#
#?-----------------------------/usr/local/mpich2/bin/mpicc---------------------
點(diǎn)贊 0
總結(jié)
以上是生活随笔為你收集整理的算力测试Linux,附录:计算力的标准Linpack测试详细指南(1)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NoClassDefFoundError
- 下一篇: 玩转TM4C1294XL(5)——PWM