ImageVerifierCode 换一换
格式:PPT , 页数:54 ,大小:863KB ,
资源ID:389477      下载积分:2000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-389477.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Supercomputing in Plain EnglishPart IX-Grab Bag.ppt)为本站会员(bowdiet140)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

Supercomputing in Plain EnglishPart IX-Grab Bag.ppt

1、Supercomputing in Plain English Part IX: Grab Bag,Henry Neeman, Director OU Supercomputing Center for Education & Research University of Oklahoma Wednesday November 7 2007,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,2,This is an experiment!,Its the nature of these kinds of v

2、ideoconferences that failures are guaranteed to happen! NO PROMISES! So, please bear with us. Hopefully everything will work out well enough.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,3,Access Grid/VRVS,If youre connecting via the Access Grid or VRVS, the venue is: NCSA Ven

3、ue Mosaic Its available Wed Oct 17 2007 1:00-4:30pm Central Time, but the workshop starts at 3:00pm Central Time. Many thanks to John Chapman of U Arkansas for setting this up for us.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,4,iLinc,We only have about 40-45 simultaneous iL

4、inc connections available. Therefore, each institution has at most one iLinc person designated. If youre the iLinc person for your institution, youve already gotten e-mail about it, so please follow the instructions. If you arent your institutions iLinc person, then you cant become it, because were

5、completely out of iLinc connections. Many thanks to Katherine Kantardjieff of California State U Fullerton for setting this up for us.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,5,QuickTime Broadcast,If you dont have iLinc, you can connect via QuickTime: rtsp:/129.15.254.141

6、/neeman_02.sdp We strongly recommend using QuickTime player, since weve seen it work. When you run it, traverse the menus File - Open URL Then paste in the rstp URL the Movie URL space, and click OK. Many thanks to Kevin Blake of OU for setting this up.,Supercomputing in Plain English: Grab Bag Wedn

7、esday November 7 2007,6,Phone Bridge,If all else fails, you can call into our phone bridge: 1-866-285-7778, access code 6483137# Please mute yourself and use the phone to listen. Dont worry, Ill call out slide numbers as we go. To ask questions, please use Google Talk or Gmail. Many thanks to Amy Ap

8、on of U Arkansas for setting this up for us, and to U Arkansas for absorbing the costs.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,7,Google Talk,To ask questions, please use our Google Talk group chat session (text only). You need to have (or create) a account to use Google

9、 Talk. Once youve logged in to your account, go to: http:/ and then contact the user named: oscer.sipe Alternatively, you can send your questions by e-mail to .,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,8,This is an experiment!,REMINDER: Its the nature of these kinds of vi

10、deoconferences that failures are guaranteed to happen! NO PROMISES! So, please bear with us. Hopefully everything will work out well enough.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,9,Outline,Scientific Computing Pipeline Scientific Libraries I/O Libraries Scientific Visua

11、lization,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,10,Scientific Computing Pipeline,Real World,Physics,Mathematical Representation (continuous),Numerical Representation (discrete),Algorithm,Implementation (program),Port (to a specific platform),Result (run),Thanks to Julia

12、Mullen of MIT Lincoln Lab for this concept.,Analysis,Verification,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,11,Five Rules of Scientific Computing,Know the physics. Control the software. Understand the numerics. Achieve expected behavior. Question unexpected behavior. Thanks

13、 to Robert E. Peterkin for these.,Scientific Libraries,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,13,Preinvented Wheels,Many simulations perform fairly common tasks; for example, solving systems of equations:Ax = b where A is the matrix of coefficients, x is the vector of un

14、knowns and b is the vector of knowns.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,14,Scientific Libraries,Because some tasks are quite common across many science and engineering applications, groups of researchers have put a lot of effort into writing scientific libraries: co

15、llections of routines for performing these commonly-used tasks (e.g., linear algebra solvers). The people who write these libraries know a lot more about these things than we do. So, a good strategy is to use their libraries, rather than trying to write our own.,Supercomputing in Plain English: Grab

16、 Bag Wednesday November 7 2007,15,Solver Libraries,Probably the most common scientific computing task is solving a system of equationsAx = b where A is a matrix of coefficients, x is a vector of unknowns, and b is a vector of knowns. The goal is to solve for x.,Supercomputing in Plain English: Grab

17、Bag Wednesday November 7 2007,16,Solving Systems of Equations,Donts: Dont invert the matrix (x = A-1b). Thats much more costly than solving directly, and much more prone to numerical error. Dont write your own solver code. There are people who devote their whole careers to writing solvers. They know

18、 a lot more about writing solvers than we do.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,17,Solving Dos,Dos: Do use standard, portable solver libraries. Do use a version thats tuned for the platform youre running on, if available. Do use the information that you have about y

19、our system to pick the most efficient solver.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,18,All About Your Matrix,If you know things about your matrix, you maybe can use a more efficient solver. Symmetric: ai,j = aj,i Positive definite: xTAx 0 for all x 0 (e.g., if all eigen

20、values are positive) Banded:0 excepton thebands,Tridiagonal:,and ,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,19,Sparse Matrices,A sparse matrix is a matrix that has mostly zeros in it. “Mostly” is vaguely defined, but a good rule of thumb is that a matrix is sparse if more t

21、han, say, 90-95% of its entries are zero. (A non-sparse matrix is dense.),Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,20,Linear Algebra Libraries,BLAS 1,2 ATLAS3 LAPACK4 ScaLAPACK5 PETSc6,7,8,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,21,BLAS,The Basi

22、c Linear Algebra Subprograms (BLAS) are a set of low level linear algebra routines: Level 1: Vector-vector (e.g., dot product) Level 2: Matrix-vector (e.g., matrix-vector multiply) Level 3: Matrix-matrix (e.g., matrix-matrix multiply) Many linear algebra packages, including LAPACK, ScaLAPACK and PET

23、Sc, are built on top of BLAS. Most supercomputer vendors have versions of BLAS that are highly tuned for their platforms.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,22,ATLAS,The Automatically Tuned Linear Algebra Software package (ATLAS) is a self-tuned version of BLAS (it a

24、lso includes a few LAPACK routines). When its installed, it tests and times a variety of approaches to each routine, and selects the version that runs the fastest. ATLAS is substantially faster than the generic version of BLAS. And, its free!,Supercomputing in Plain English: Grab Bag Wednesday Novem

25、ber 7 2007,23,Goto BLAS,In the past few years, a new version of BLAS has been released, developed by Kazushige Goto (currently at UT Austin). This version is unusual, because instead of optimizing for cache, it optimizes for the Translation Lookaside Buffer (TLB), which is a special little cache tha

26、t often is ignored by software developers. Goto realized that optimizing for the TLB would be more efficient than optimizing for cache.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,24,ATLAS vs. BLAS Performance,ATLAS DGEMM: 2.76 GFLOP/s = 69% of peak,Generic DGEMM: 0.91 GFLOP/

27、s = 23% of peak,DGEMM: Double precision GEneral Matrix-Matrix multiply DGEMV: Double precision GEneral Matrix-Vector multiply,BETTER,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,25,LAPACK,LAPACK (Linear Algebra PACKage) solves dense or special-case sparse systems of equations

28、depending on matrix properties such as: Precision: single, double Data type: real, complex Shape: diagonal, bidiagonal, tridiagonal, banded, triangular, trapezoidal, Hesenberg, general dense Properties: orthogonal, positive definite, Hermetian (complex), symmetric, general LAPACK is built on top of

29、BLAS, which means it can benefit from ATLAS.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,26,LAPACK Example,REAL,DIMENSION(numrows,numcols) : A REAL,DIMENSION(numrows) : B REAL,DIMENSION(numcols) : X INTEGER,DIMENSION(numrows) : pivot INTEGER : row, col, info, numrhs = 1DO row

30、 = 1, numrowsB(row) = END DO DO col = 1, numcolsDO row = 1, numrowsA(row,col) = END DO END DO CALL sgesv(numrows, numrhs, A, numrows, pivot, & & B, numrows, info) DO col = 1, numcolsX(col) = B(col) END DO,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,27,LAPACK: A Library and an

31、 API,LAPACK is a library that you can download for free from the Web: lib.org But, its also an Application Programming Interface (API): a definition of a set of routines, their arguments, and their behaviors. So, anyone can write an implementation of LAPACK.,Supercomputing in Plain English: Grab Bag

32、 Wednesday November 7 2007,28,Its Good to Be Popular,LAPACK is a good choice for non-parallelized solving, because its popularity has convinced many supercomputer vendors to write their own, highly tuned versions. The API for the LAPACK routines is the same as the portable version from NetLib, but t

33、he performance can be much better, via either ATLAS or proprietary vendor-tuned versions. Also, some vendors have shared memory parallel versions of LAPACK.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,29,LAPACK Performance,Because LAPACK uses BLAS, its about as fast as BLAS.

34、For example, DGESV (Double precision General SolVer) on a 2 GHz Pentium4 using ATLAS gets 65% of peak, compared to 69% of peak for Matrix-Matrix multiply. In fact, an older version of LAPACK, called LINPACK, is used to determine the top 500 supercomputers in the world.,Supercomputing in Plain Englis

35、h: Grab Bag Wednesday November 7 2007,30,ScaLAPACK,ScaLAPACK is the distributed parallel (MPI) version of LAPACK. It actually contains only a subset of the LAPACK routines, and has a somewhat awkward Application Programming Interface (API). Like LAPACK, ScaLAPACK is also available from lib.org.,Supe

36、rcomputing in Plain English: Grab Bag Wednesday November 7 2007,31,PETSc,PETSc (Portable, Extensible Toolkit for Scientific Computation) is a solver library for sparse matrices that uses distributed parallelism (MPI). PETSc is designed for general sparse matrices with no special properties, but it a

37、lso works well for sparse matrices with simple properties like banding and symmetry. It has a simpler, more intuitive Application Programming Interface than ScaLAPACK.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,32,Pick Your Solver Package,Dense Matrix Serial: LAPACK Shared M

38、emory Parallel: threaded LAPACK Distributed Parallel: ScaLAPACK Sparse Matrix: PETSc,I/O Libraries,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,34,I/O Challenges,I/O presents two important challenges to scientific computing: Performance Portability The performance issue arises

39、 because I/O is much more time-consuming than computation, as we saw in the “Storage Hierarchy” session. The portability issue arises because different kinds of computers can have different ways of representing real (“floating point” numbers).,Supercomputing in Plain English: Grab Bag Wednesday Nove

40、mber 7 2007,35,Storage Formats,When you use a PRINT statement in Fortran or a printf in C or output to cout in C+, you are asking the program to output data in human-readable form:x = 5PRINT *, x But what if the value that you want to output is a real number with lots of significant digits?1.3456789

41、E+23,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,36,Data Output as Text,1.3456789E+23 When you output data as text, each character takes 1 byte. So if you output a number with lots of digits, then youre outputting lots of bytes. For example, the above number takes 13 bytes to

42、 output as text. Jargon: Text is sometimes called ASCII (American Standard Code for Information Interchange).,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,37,Output Data in Binary,Inside the computer, a single precision real number (Fortran REAL, C/C+ float) typically requires

43、 4 bytes, and a double precision number (DOUBLE PRECISION or double) typically requires 8. Thats less than 13. Since I/O is very expensive, its better to output 4 or 8 bytes than 13 or more. Happily, Fortran, C and C+ allow you to output data as binary (internal representation) rather than as text.,

44、Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,38,Binary Output Problems,When you output data as binary rather than as text, you output substantially fewer bytes, so you save time (since I/O is very expensive) and you save disk space. But, you pay two prices: Readability: Humans

45、 cant read binary. Portability: Different kinds of computers have different ways of internally representing numbers.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,39,Binary Readability: No Problem,Readability of binary data isnt a problem in scientific computing, because: You c

46、an always write a little program to read in the binary data and display its text equivalent. If you have lots and lots of data (i.e., MBs or GBs), you wouldnt want to look at all of it anyway.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,40,Binary Portability: Big Problem,Bina

47、ry data portability is a very big problem in scientific computing, because data thats output on one kind of computer may not be readable on another, and so: You cant output the data on one kind of computer and then use them (e.g., visualize, analyze) on another kind. Some day the kind of computer th

48、at output the data will be obsolete, so there may be no computer in the world that can input it, and thus the data are lost.,Supercomputing in Plain English: Grab Bag Wednesday November 7 2007,41,Portable Binary Data,The HPC community noticed this problem some years ago, and so a number of portable

49、binary data formats were developed. The two most popular are: HDF (Hierarchical Data Format) from the National Center for Supercomputing Applications: http:/hdf.ncsa.uiuc.edu NetCDF (Network Common Data Form) from Unidata: http:/www.unidata.ucar.edu/packages/netcdf,Supercomputing in Plain English: G

50、rab Bag Wednesday November 7 2007,42,Advantages of Portable I/O,Portable binary I/O packages: give you portable binary I/O; have simple, clear APIs; are available for free; run on most platforms; allow you to annotate your data (e.g., put into the file the variable names, units, experiment name, grid description, etc). Also, HDF allows distributed parallel I/O.,

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1