Seismic Code. Given echo data, compute under sea map Computation model

Similar documents
CMSC 714 Lecture 3 Message Passing with PVM and MPI

CMSC 714 Lecture 3 Message Passing with PVM and MPI

Parallel Processing using PVM on a Linux Cluster. Thomas K. Gederberg CENG 6532 Fall 2007

Message-Passing Computing

LINUX & Parallel Processing

Lecture 7: Distributed memory

Introduction to parallel computing concepts and technics

MPI Message Passing Interface

Distributed Systems CS /640

MPI (Message Passing Interface)

Parallel Programming

Parallel Computing Paradigms

DISTRIBUTED PROCESSING SOFTWARE ENVIRONMENTS

The Message Passing Interface (MPI) TMA4280 Introduction to Supercomputing

LOAD BALANCING DISTRIBUTED OPERATING SYSTEMS, SCALABILITY, SS Hermann Härtig

The rpvm Package. May 10, 2007

Cluster Computing MPI. Industrial Standard Message Passing

6.189 IAP Lecture 5. Parallel Programming Concepts. Dr. Rodric Rabbah, IBM IAP 2007 MIT

Message-Passing Computing

MPI and OpenMP (Lecture 25, cs262a) Ion Stoica, UC Berkeley November 19, 2016

Advanced MPI. Andrew Emerson

Computer Architecture

Computer Architecture

Slides prepared by : Farzana Rahman 1

CS 6230: High-Performance Computing and Parallelization Introduction to MPI

Exercises: April 11. Hermann Härtig, TU Dresden, Distributed OS, Load Balancing

High Performance Computing Course Notes Message Passing Programming I

ECE 574 Cluster Computing Lecture 13

MIT OpenCourseWare Multicore Programming Primer, January (IAP) Please use the following citation format:

15-440: Recitation 8

Point-to-Point Communication. Reference:

COSC 6385 Computer Architecture - Multi Processor Systems

Masterpraktikum - Scientific Computing, High Performance Computing

Chip Multiprocessors COMP Lecture 9 - OpenMP & MPI

Parallel Programming

Holland Computing Center Kickstart MPI Intro

MPI 2. CSCI 4850/5850 High-Performance Computing Spring 2018

Introduction to MPI, the Message Passing Library

MPI Optimisation. Advanced Parallel Programming. David Henty, Iain Bethune, Dan Holmes EPCC, University of Edinburgh

Lecture 16. Parallel Sorting MPI Datatypes

Advanced MPI. Andrew Emerson

Message Passing Interface. George Bosilca

A few words about MPI (Message Passing Interface) T. Edwald 10 June 2008

Advanced Message-Passing Interface (MPI)

SHARCNET Workshop on Parallel Computing. Hugh Merz Laurentian University May 2008

MIMD Overview. Intel Paragon XP/S Overview. XP/S Usage. XP/S Nodes and Interconnection. ! Distributed-memory MIMD multicomputer

MPI and comparison of models Lecture 23, cs262a. Ion Stoica & Ali Ghodsi UC Berkeley April 16, 2018

Lecture 7: More about MPI programming. Lecture 7: More about MPI programming p. 1

COMP4510 Introduction to Parallel Computation. Shared Memory and OpenMP. Outline (cont d) Shared Memory and OpenMP

4.8 Summary. Practice Exercises

MPI Programming Techniques

Parallel Programming in C with MPI and OpenMP

High performance computing. Message Passing Interface

Masterpraktikum - Scientific Computing, High Performance Computing

Acknowledgments. Programming with MPI Basic send and receive. A Minimal MPI Program (C) Contents. Type to enter text

Message Passing Interface

Programming with MPI Basic send and receive

Linux Operating System

Multithreaded Programming

PARA++ : C++ Bindings for Message Passing Libraries

Programming Scalable Systems with MPI. Clemens Grelck, University of Amsterdam

Programming with MPI. Pedro Velho

Computing architectures Part 2 TMA4280 Introduction to Supercomputing

Under the Hood, Part 1: Implementing Message Passing

More about MPI programming. More about MPI programming p. 1

Programming with MPI on GridRS. Dr. Márcio Castro e Dr. Pedro Velho

Intermediate MPI features

CS307: Operating Systems

MPI: A Message-Passing Interface Standard

Lecture 9: MPI continued

Dimemas internals and details. BSC Performance Tools

Chapter 5: CPU Scheduling

Part One: The Files. C MPI Slurm Tutorial - Hello World. Introduction. Hello World! hello.tar. The files, summary. Output Files, summary

Scheduling FFT Computation on SMP and Multicore Systems Ayaz Ali, Lennart Johnsson & Jaspal Subhlok

MPI. (message passing, MIMD)

Message-Passing Shared Address Space

Chapter 5: CPU Scheduling. Operating System Concepts Essentials 8 th Edition

CS4961 Parallel Programming. Lecture 16: Introduction to Message Passing 11/3/11. Administrative. Mary Hall November 3, 2011.

Introduction to MPI part II. Fabio AFFINITO

Distributed Memory Programming with Message-Passing

Distributed Memory Parallel Programming

Topics. Introduction. Shared Memory Parallelization. Example. Lecture 11. OpenMP Execution Model Fork-Join model 5/15/2012. Introduction OpenMP

UNIVERSITY OF MORATUWA

What is Hadoop? Hadoop is an ecosystem of tools for processing Big Data. Hadoop is an open source project.

Introduction to the Message Passing Interface (MPI)

Message Passing Interface

HPC Parallel Programing Multi-node Computation with MPI - I

HPC Workshop University of Kentucky May 9, 2007 May 10, 2007

Third Midterm Exam April 24, 2017 CS162 Operating Systems

Practical Scientific Computing: Performanceoptimized

Standard MPI - Message Passing Interface

CSE 160 Lecture 15. Message Passing

Anomalies. The following issues might make the performance of a parallel program look different than it its:

Parallel programming MPI

Optimization of MPI Applications Rolf Rabenseifner

Parallel Programming in C with MPI and OpenMP

GPI-2: a PGAS API for asynchronous and scalable parallel applications

UNIT 2 PRAM ALGORITHMS

Introduction to MPI. May 20, Daniel J. Bodony Department of Aerospace Engineering University of Illinois at Urbana-Champaign

Parallel I/O. and split communicators. David Henty, Fiona Ried, Gavin J. Pringle

Transcription:

Seismic Code Given echo data, compute under sea map Computation model designed for a collection of workstations uses variation of RPC model workers are given an independent trace to compute requires little communication supports load balancing (1,000 traces is typical) Performance max mfops = O((F * nz * B * ) 1/2 ) F - single processor MFLOPS nz - linear dimension of input array B * - effective communication bandwidth B * = B/(1 + BL/w) B/7 for Ethernet (10msec lat., w=1400) real limit to performance was latency not bandwidth 1

Database Applications Too much data to fit in memory (or sometimes disk) data mining applications (K-Mart has a 4-5TB database) imaging applications (NASA has a site with 0.25 petabytes) use a fork lift to load tapes by the pallet Sources of parallelism within a large transaction among multiple transactions Join operation form a single table from two tables based on a common field try to split join attribute in disjoint buckets if know data distribution is uniform its easy if not, try hashing 2

Speedup in Join parallelism Books claims a speed up of1/p 2 is possible split each relation into p buckets each bucket is a disjoint subset of the joint attribute each processor only has to consider N/p tuples per relation join is O(n 2 ) so each processor does O((N/p) 2 ) work so spedup is O(N 2 /p 2 )/O(N 2 ) = O(1/p 2 ) this is a lie! could split into 1/p buckets on one processor time would then be O(p * (N/p) 2 ) = O(N 2 /p) so speedup is O(N 2 /p 2 )/O(N 2 /p) = O(1/p) Amdahls law is not violated 3

Parallel Search (TSP) may appear to be faster than 1/n but this is not really the case either Algorithm compute a path on a processor if our path is shorter than the shortest one, send it to the others. stop searching a path when it is longer than the shortest. before computing next path, check for word of a new min path stop when all paths have been explored. Why it appears to be faster than 1/n speedup we found the a path that was shorter sooner however, the reason for this is a different search order! 4

Ensuring a fair speedup T serial = faster of best known serial algorithm simulation of parallel computation use parallel algorithm run all processes on one processor parallel algorithm run on one processor If it appears to be super-linear check for memory hierarchy increased cache or real memory may be reason verify order operations is the same in parallel and serial cases 5

Consider master-worker Quantitative Speedup one master and n worker processes communication time increases as a linear function of n T p =TCOMP p +TCOMM p TCOMP p = T s /P 1/S p =T p /T s = 1/P + TCOMM p /T s TCOMM p is P * TCOMM 1 1/S p =1/p + p * TCOMM 1 /T s = 1/P + P/r 1 where r 1 = T s /TCOMM 1 d(1/s p )/dp = 0 --> P opt = r 1/2 1 and S opt = 0.5 r 1/2 1 For hierarchy of masters TCOMM p = (1+logP)TCOMM 1 P opt = r 1 and S opt = r 1 /(1 + log r 1 ) 6

PVM Provide a simple, free, portable parallel environment Run on everything Parallel Hardware: SMP, MPPs, Vector Machines Network of Workstations: ATM, Ethernet, UNIX machines and PCs running Win* Works on a heterogenous collection of machines handles type conversion as needed Provides two things message passing library point-to-point messages synchronization: barriers, reductions OS support process creation (pvm_spawn) 7

PVM Environment (UNIX) PVMD PVMD Sun SPARC Sun SPARC Application Process Application Process Bus Network PVMD Application Process PVMD Application Process PVMD IBM RS/6000 DECmmp 12000 Cray Y-MP Application Process One PVMD per machine all processes communicate through pvmd (by default) Any number of application processes per node 8

PVM Message Passing All messages have tags an integer to identify the message defined by the user Messages are constructed, then sent pvm_pk{int,char,float}(*var, count, stride) pvm_unpk{int,char,float} to unpack All proccess are named based on task ids (tids) local/remote processes are the same Primary message passing functions pvm_send(tid, tag) pvm_recv(tid, tag) 9

PVM Process Control Creating a process pvm_spawn(task, argv, flag, where, ntask, tids) flag and where provide control of where tasks are started ntask controls how many copies are started program must be installed on target machine Ending a task pvm_exit does not exit the process, just the PVM machine Info functions pvm_mytid() - get the process task id 10

PVM Group Operations Group is the unit of communication a collection of one or more processes processes join group with pvm_joingroup( <group name> ) each process in the group has a unique id pvm_gettid( <group name> ) Barrier can involve a subset of the processes in the group pvm_barrier( <group name>, count) Reduction Operations pvm_reduce( void (*func)(), void *data, int count, int datatype, int msgtag, char *group, int rootinst) result is returned to rootinst node does not block pre-defined funcs: PvmMin, PvmMax,PvmSum,PvmProduct 11

PVM Performance Issues Messages have to go through PVMD can use direct route option to prevent this problem Packing messages semantics imply a copy extra function call to pack messages Heterogenous Support information is sent in machine independent format has a short circuit option for known homogenous comm. passes data in native format then 12

int main(int argc, char **argv) { int mygroupnum; int friendtid; int mytid; int tids[2]; int message[messagesize]; int c,i,okspawn; Sample PVM Program /* Initialize process and spawn if necessary */ mygroupnum=pvm_joingroup("ping-pong"); mytid=pvm_mytid(); if (mygroupnum==0) { /* I am the first process */ pvm_catchout(stdout); okspawn=pvm_spawn(myname,argv,0,"",1,&friendtid); if (okspawn!=1) { printf("can't spawn a copy of myself!\n"); pvm_exit(); exit(1); } tids[0]=mytid; tids[1]=friendtid; } else { /*I am the second process */ friendtid=pvm_parent(); tids[0]=friendtid; tids[1]=mytid; } pvm_barrier("ping-pong",2); } /* Main Loop Body */ if (mygroupnum==0) { /* Initialize the message */ for (i=0 ; i<messagesize ; i++) { message[i]='1'; } /* Now start passing the message back and forth */ for (i=0 ; i<iterations ; i++) { pvm_initsend(pvmdatadefault); pvm_pkint(message,messagesize,1); pvm_send(tid,msgid); } pvm_recv(tid,msgid); pvm_upkint(message,messagesize,1); } else { pvm_recv(tid,msgid); pvm_upkint(message,messagesize,1); pvm_initsend(pvmdatadefault); pvm_pkint(message,messagesize,1); pvm_send(tid,msgid); } pvm_exit(); exit(0); 13

MPI Goals: Standardize previous message passing: PVM, P4, NX Support copy free message passing Portable to many platforms Features: point-to-point messaging group communications profiling interface: every function has a name shifted version Buffering no guarantee that there are buffers possible that send will block until receive is called Delivery Order two sends from same process to same dest. will arrive in order no guarantee of fairness between processes on recv. 14

MPI Communicators Provide a named set of processes for communication All processes within a communicator can be named numbered from 0 n-1 Allows libraries to be constructed application creates communicators library uses it prevents problems with posting wildcard receives adds a communicator scope to each receive All programs start will MPI_COMM_WORLD 15

Non-Blocking Functions Two Parts post the operation wait for results Also includes a poll option checks if the operation has finished Semantics must not alter buffer while operation is pending 16

MPI Misc. MPI Types All messages are typed base types are pre-defined: int, double, real, {,unsigned}{short, char, long} can construct user defined types includes non-contiguous data types Processor Topologies Allows construction of Cartesian & arbitrary graphs May allow some systems to run faster What s not in MPI-1 process creation I/O one sided communication 17