zoukankan      html  css  js  c++  java
  • 最新的Linpack测试指南-基于woodcrest机器

    本次基于一台1个CPU的woodcrest 1.86GHz的机器,2G内存

    1、BLAS用GotoBLAS,目前最新是1.10版,解开,然后编辑Makefile.rule,如下(这里没有列出的部分就是我没有修改的部分):

    #
    # Beginning of user configuration
    #

    # This library's version
    REVISION = -r1.10

    # Which do you prefer to use for C compiler? Default is gcc.
    # I recommend you to use GCC because inline assembler is required.
    C_COMPILER = GNU
    # C_COMPILER = INTEL

    # Which do you prefer to use for Fortran compiler? Default is GNU g77.
    F_COMPILER = G77
    # F_COMPILER = G95
    # F_COMPILER = GFORTRAN
    # F_COMPILER = INTEL
    # F_COMPILER = PGI
    # F_COMPILER = PATHSCALE
    # F_COMPILER = IBM
    # F_COMPILER = COMPAQ
    # F_COMPILER = SUN
    # F_COMPILER = F2C

    # If you need 64bit binary; some architecture can accept both 32bit and
    # 64bit binary(EM64T, Opteron, SPARC and Power/PowerPC).
    BINARY64 = 1

    # If you want to build threaded version.
    # You can specify number of threads by environment value
    # "OMP_NUM_THREADS", otherwise, it's automatically detected.
    SMP = 1

    # You may specify Maximum number of threads. It should be minimum.
    # For OpenMP users; you have to specify MAX_THREADS even if you don't
    # use threaded BLAS(MAX_THREADS >= OMP_NUM_THREADS * GOTO_NUM_THREADS)
    MAX_THREADS = 2

    2、注意,上面编译器部分可以根据自己的需要修改,比如装了Intel的编译器就改成Intel编译器;另外,BINARY64=1这个选项要打 开,如果安装了x86-64的操作系统的话,否则HPL在编译的时候就会报告说libgoto不是一个x86-64的库,虽然最终xhpl能生成,但是运 行的时候会出错

    OK, 输入make就大功告成了

    3、解开HPL的包,然后 cp setup/Make.Linux_PII_FBLAS Make.wc(表示arch是wc),然后编辑Make.wc,修改成这样:

    # ----------------------------------------------------------------------
    # - shell --------------------------------------------------------------
    # ----------------------------------------------------------------------
    #
    SHELL = /bin/sh
    #
    CD = cd
    CP = cp
    LN_S = ln -s
    MKDIR = mkdir
    RM = /bin/rm -f
    TOUCH = touch
    #
    # ----------------------------------------------------------------------
    # - Platform identifier ------------------------------------------------
    # ----------------------------------------------------------------------
    #
    ARCH = wc
    #
    # ----------------------------------------------------------------------
    # - HPL Directory Structure / HPL library ------------------------------
    # ----------------------------------------------------------------------
    #
    TOPdir = $(HOME)/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/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)/GotoBLAS
    LAinc =
    LAlib = $(LAdir)/libgoto.a
    #
    # ----------------------------------------------------------------------
    # - 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/mpich/bin/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/mpich/bin/mpif77
    LINKFLAGS = $(CCFLAGS)
    #
    ARCHIVER = ar
    ARFLAGS = r
    RANLIB = echo
    #
    # ----------------------------------------------------------------------

    4、很简单,基本上就需要指定hpl、libgoto.a和mpich的位置就OK了,最后链接用mpif77,编译用mpicc即可。输入make arch=wc就OK了,编译失败的话,用make arch=wc clean就可以删除make的痕迹

    5、然后就是修改HPL.dat,run xhpl了。 HPL.dat已经说了很多次了,不说了


    本次使用了xxx集群上的HPL.dat设置,跑出来的结果是12.15GFlops,理论峰值是14.88GFlops(1颗CPU),效率是81.65%
     

  • 相关阅读:
    阿里云SLB的http强制转https
    nginx反向代理springboot的jar包
    阿里云Centos7上添加swap分区
    AWS云怎么删除信用卡账户
    Linux记录别人操作
    Jumpserver里常用的sudo权限
    端口一览表
    网络端口及其详解
    阿里云安全防坑指南
    LINUX添加只读用户(查日志专用)
  • 原文地址:https://www.cnblogs.com/super119/p/2017821.html
Copyright © 2011-2022 走看看