ebook img

ZPL - Computer Science - University of Massachusetts Amherst PDF

28 Pages·2006·1.08 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview ZPL - Computer Science - University of Massachusetts Amherst

Parallel & Concurrent Programming: ZPL Emery Berger CMPSCI 691W Spring 2006 UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee Outline Previously: (cid:132) MPI – point-to-point & collective (cid:132) Complicated, far from problem abstraction (cid:132) OpenMP - parallel directives (cid:132) Language extensions to Fortran/C/C++ (cid:132) Questionable semantics, error-prone (cid:132) Today: (cid:132) Something way better: ZPL (cid:132) lecture material from ZPL project, UW UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 2 ZPL Parallel array language (cid:132) Implicitly parallel (cid:132) No parallel constructs per se (cid:132) Very high level (cid:132) Assignments work at array level, as in (cid:132) A := B + C Machine independent (cid:132) Compiles to ANSI C + (cid:132) communication library calls (e.g., MPI) Efficient (cid:132) UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 3 Comparison Matrix-multiplication: (cid:132) C (cid:132) triply-nested loop (cid:132) ZPL (cid:132) dot-product of rows & columns (cid:132) efficiently implemented on parallel (cid:132) machines UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 4 ZPL Outline Language overview (cid:132) Regions (cid:132) Directions (cid:132) Parallel array operations (cid:132) Handling boundary conditions (cid:132) ZPL programs & performance (cid:132) UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 5 Regions Key abstraction in ZPL: regions (cid:132) Index sets (rows,cols) partition matrices (cid:132) Operate on regions, not indexed items! (cid:132) rows columns UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 6 Region Examples Interior of matrix (cid:132) Left-most column (cid:132) UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 7 Directions Directions: (cid:132) Offset vectors used to manipulate (cid:132) regions & array data UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 8 Creating New Regions Prepositions create new regions: (cid:132) in (cid:132) Applies direction to select part of region (cid:132) of (cid:132) Creates new region outside existing region (cid:132) at (cid:132) Shifts a region by a direction (cid:132) by (cid:132) Creates new region strided by direction (cid:132) UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 9 Applying Directions Use “in” to apply direction to region (cid:132) + = UUNNIIVVEERRSSIITTYY OOFF MMAASSSSAACCHHUUSSEETTTTSSAAMMHHEERRSSTT •• DDeeppaarrttmmeenntt ooff CCoommppuutteerr SScciieennccee 10

Description:
UNIVERSITY OF MASSACHUSETTS AMHERST • Department of Computer Science. Parallel & Concurrent. Programming: ZPL. Emery Berger. CMPSCI 691W.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.