【正文】
. Permission required for reproduction or display. Extend Compilers (cont.) ? Advantages ?Can leverage millions of lines of existing serial programs ?Saves time and labor ?Requires no retraining of programmers ?Sequential programming easier than parallel programming Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Current Status ? Lowlevel approach is most popular ? Augment existing language with lowlevel parallel constructs ? MPI and OpenMP are examples ? Advantages of lowlevel approach ? Efficiency ? Portability ? Disadvantage: More difficult to program and debug Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Create a Parallel Language ? Develop a parallel language “from scratch” ?occam is an example ? Add parallel constructs to an existing language ?Fortran 90 ?High Performance Fortran ?C* Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Programming Parallel Computers ? Extend pilers: translate sequential programs into parallel programs ? Extend languages: add parallel operations ? Add parallel language layer on top of sequential language ? Define totally new parallel language and piler system Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Partial Sums Pipeline a [ 0 ]= + + +a [ 1 ] a [ 2 ] a [ 3 ]p [ 0 ] p [ 1 ] p [ 2 ]p [ 0 ] p [ 1 ] p [ 2 ] p [ 3 ]Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Beowulf Concept ? NASA (Sterling and Becker) ? Commodity processors ? Commodity interconnect ? Linux operating system ? Message Passing Interface (MPI) library ? High performance/$ for certain applications Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. CPUs 1 Million Times Faster ? Faster clock speeds ? Greater system concurrency ?Multiple functional units ?Concurrent instruction execution ?Speculative instruction execution Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Why MPI? ? MPI = “Message Passing Interface” ? Standard specification for messagepassing libraries ? Libraries available on virtually all parallel puters ? Free libraries also available for works of workstations or modity clusters Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Parallel Programming in C with MPI and OpenMP Michael J. Quinn Copyright 169。 The McGrawHill Companies, Inc. Permission required for reproduction or display. Modern Scient