- 浏览: 650194 次
- 性别:
- 来自: 成都
-
文章分类
最新评论
-
hsluoyz:
现在新推出了一个权限框架,叫jCasbin(https://g ...
Shiro 权限框架使用总结 -
飕飕飞:
比如说 我用私匙加密一段数据,并加密成功。那签名时用什么生成的 ...
Java使用RSA加密解密签名及校验 -
文艺吧网:
楼主讲的好详细,这里有整套 Shiro demo http:/ ...
Shiro 权限框架使用总结 -
nanshanmu:
333引用[url][*]||||[/flash][/flas ...
SpringMVC中返回值处理 -
变脸小伙:
) 业务类在Spring配置 ...
整合Struts2与Spring以及spring的自动装配
搭建好SSH无密码访问,NFS和NIS后可以搭建Linpack性能测试环境
云计算系统的一个重要作用是向用户提供计算力,评价一个系统的总体计算力的方 法就是采用一个统一的测试标准作为评判,现在评判一个系统计算力的方法中最为知名的就是Linpack测试,世界最快500台巨型机系统的排名采用的就是 这一标准。掌握Linpack测试技术对于在云计算时代评判一个云系统的计算力也有着重要意义。本附录将对Linpack测试技术作详细的介绍。(mpi,GotoBlas,Linpack都要安装在nfs共享目录下,或者所有节点都统一目录安装)
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/下载,需要注册。
(4)HPL,linpack测试的软件,可在http://www.netlib.org/benchmark/hpl/ 下载最新版本。
安装方法和步骤如下。
(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.<arch>文件,复制到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---------------------
修改好文件以后,对其进行编译:
- #make arch=Linux_xeon
如果编译正常,在hpl/bin/Linux_xeon目录下就会生成两个文件HPL.dat和xhpl。 HPL.dat文件是Linpack测试的优化配置文件,这个对测试的结果十分重要,xhpl为可执行程序。
如果是集群测试,就将linpack目录复制到机群中其余节点相同的目录下。
至此,安装就算完成了。现在可以进行简单的测试.
进入hpl/bin/Linux_xeon目录,先启动mpd服务,在终端运行以下命令启动测试:
- #mpiexec -np 4 ./xhpl
当多台机器时,还可以加入节点配置文件,如machinefile,格式如下:
host1 :1 #Run 1 process on host1,host可以是域名或者是ip地址
host2:2 #Run 2 process on host2
............
需要注意的是:因为通信是双向的,所以需要在所有host上的/etc/hosts上都配置上
可运行命令如下:
#mpiexec -n 4 -f machinefile ./xhpl
运行结果如图
在最后一列中看到Gflops:4.937e-03
实际应该是cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU E5649 @ 2.53GHz
stepping : 2
cpu MHz : 2533.424
cache size : 12288 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm arat
bogomips : 5066.84
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU E5649 @ 2.53GHz
stepping : 2
cpu MHz : 2533.424
cache size : 12288 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes hypervisor lahf_lm arat
bogomips : 5066.40
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
双核,每核每个circle内可跑2个process(硬件决定),所以CPU完全利用时应该是2.53GHz*4=10.12
所以跑出的cpu只利用了不到50%
格式编排不好,原文可参看:
http://www.orientsky.com.cn/_new/Read.asp?ID=1495
http://www.orientsky.com.cn/_new/Read.asp?ID=1496
发表评论
-
SaaS平台让软件企业专注于软件开发
2013-01-23 11:11 1612本文摘要 SaaS领域的 ... -
SaaS理论及应用研究综述
2013-01-23 11:10 12201 SaaS SaaS是Software ... -
NFS+NIS+无密码访问
2012-08-01 13:23 4485第一步:.修改主机名 因此执行脚本如下: exp ... -
云时代的企业应用数据挖掘
2012-06-20 11:53 1235随着云时代的到来和SaaS概念的引入,越来越多的企业开 ... -
数据挖掘:用户推荐系统技术深度揭秘
2012-06-20 11:43 1464数据科学家需要具备专业 领域知识并研究相应的算法以分析对应的 ... -
HBase查询一条数据的过程.
2012-06-12 16:20 11562HBase中的Client如何路由到正确的Reg ... -
什么是列存储?
2012-06-12 16:18 1726什么是列存储?列存储不同于传统的关系型数据库,其数据在表中 ...
相关推荐
总结,搭建LINPACK测试环境需要综合理解计算性能测试的基本原理,掌握相关工具的安装和使用,以及优化策略。通过这个过程,不仅可以评估计算机的计算性能,还可以深入了解并行计算和数学库的运用,这对于任何涉及高...
1. **环境搭建**: 在Linux环境下,你需要确保系统已安装CUDA(Compute Unified Device Architecture)驱动和开发工具包,这是GPU计算的基础。安装后,需要设置正确的环境变量,例如`PATH`、`LD_LIBRARY_PATH`等,...
**环境搭建步骤** 在进行HPL测试前,需要建立一个适合并行计算的环境: 1. 在所有计算节点上安装Linux操作系统,确保操作系统稳定且支持并行计算。 2. 设置网络架构,保证节点间有高效率的通信速度,这对于并行...
整体来说,该文档为集群管理员提供了一套详尽的集群搭建与维护指南,涵盖了从集群操作系统安装、集群监控与管理到性能测试与优化的整个生命周期。集群管理员可以按照文档指导,快速搭建一个高性能的计算环境,不仅...
3. **性能测试**:在并行环境搭建完成后,通常会使用Linpack测试来评估系统的浮点运算能力。Linpack是一组用于测量计算机性能的基准测试,尤其适合于并行计算环境。 4. **并行排序算法**:`rank_sort.c`和`Pipeline...
最后,我们安装HPL,这是Linpack基准测试程序的高性能版本,用于评估计算机的浮点运算性能。HPL依赖于MPI环境和线性代数库,如GotoBLAS2。下载hpl-2.2.tar.gz,解压后,将Makefile配置文件复制并修改,以适应当前的...
本实验主要涉及的是在Linux环境下构建简单集群并进行性能测试。实验的关键技术点包括OpenMPI的安装与配置、高性能计算库HPL的使用以及SSH集群免密登录的配置。 1. **OpenMPI的安装**: - **前置环境**:在开始安装...
此外,集群的构建还可以通过虚拟化技术,比如VMware,来实现,尽管在虚拟化环境下集群的性能会有所下降,但这种方式方便了用户在非物理硬件上进行集群系统的搭建与测试。 总之,构建一个工作集群是一个涉及多个技术...
性能测试是Linux集群管理中不可或缺的一环。在第四章,学生将学习如何检查集群的网络连接和功能,如何使用各种性能评估工具如lamboot、一维数值积分并行程序、lamtests和linpack等进行测试。通过这些工具,学生能够...