Parallel Computing. MPI Collective communication

Size: px
Start display at page:

Download "Parallel Computing. MPI Collective communication"

Transcription

1 Parallel Computing MPI Collective communication Thorsten Grahs, 18. May 2015

2 Table of contents Collective Communication Communicator Intercommunicator 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 2

3 Collective Communication Communication involving a group of processes Selection of the collective group by a suitable communicator All communication members get an identical call. No tags Collective communication...does not necessarily mean all processes (i.e. global communication) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 3

4 Collective Communication Amount of data sent must exactly match the amount of data received Collective routines are collective across an entire communicator and must be called in the same order from all processors within the communicator Collective routines are all blocking Buffer can be reused upon return Collective routines may return as soon as the calling process participation is complete No mixing of collective and point-to-point communication 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 4

5 Collective Communication functions Barrier operation MPI_Barrier() All tasks waiting for each other Broadcast operation MPI_Bcast() One task sends to all Accumulation operation MPI_Reduce() One task associated / acts on distributed data Gather operation MPI_Gather() One task collects/gather data Scatter operation MPI_Scatter() One task scatter data (e.g. a vector) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 5

6 Multi-Task functions Multi-Broadcast operation MPI_Allgather() All participating tasks make the data available to other participating tasks Multi-Accumulation operation MPI_Allreduce() All participating tasks get result of the operation Total exchange MPI_Alltoall() Each involved task sends and receives to/from all 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 6

7 Synchronisation Barrier operation MPI_Barrier(comm) All tasks in comm wait on each other to achieve a barrier. Only collective routine which provides explicit synchronization Returns at any processor only after all processes have entered the call Barrier can be used to ensure all processes have reached a certain point in the computation Mostly used for synchronization sequence of tasks (e.g. debugging) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 7

8 Example: MPI_Barrier Tasks are waiting on each other MPI_Isend is not completed Data can not be accessed. 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 8

9 Broadcast operation MPI_Bcast(buffer,count,datatype,root,communicator) All processes in the communicator use same function call. Data from rank root process are distributed to all process in the communicator The call is blocking, but not connected to synchronization 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 9

10 Accumulation operation MPI_Reduce(sendbf,recvbf,count,type,op,master,comm) Calling process is master Join operation op (e.g. summation) Processes involved put their local data into sendbf master collects results into recvbf 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 10

11 Reduce operation Pre-defined operations MPI_MAX MPI_MAXLOC MPI_MIN MPI_SUM MPI_PROD MPI_LXOR MPI_BXOR... maximum maximum and index of maximum minimum summation product logical exclusive OR bitwise exclusive OR 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 11

12 Example: Reduce Summation MPI_Reduce(teil,s,1,MPI_DOUBLE,MPI_SUM,0,comm) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 12

13 Gather operation MPI_Gather(sbf,scount,stype,rbf,rcount,rtype,ma,comm) sbuf local send-buffer rbuf receive-buffer from master ma Each processor sends rcount elements of data type rtype to master ma Order of data in the rbuf corresponds to numerical order in communicator comm 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 13

14 Scatter operation MPI_Scatter(sbf,scount,stype,rbf,rcount,rtype,ma,comm) Master ma distributes/scatters data from sbf Each process receives sub-buffers from sbf in local receive buffer rbf Master ma sends to itself Order of data in the rbuf corresponds to numerical order in communicator comm 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 14

15 Example: Scatter Three processes involved in comm Send-buffer: int sbuf[6]={3,14,15,92,65,35}; Recieve-buffer: int rbuf[2]; Function call MPI_Scatter(sbuf,2,MPI_INT,rbuf,2,MPI_INT,0,comm); leads to the following distribution: Process rbuf 0 { 3, 14} 1 {15, 92} 2 {65, 35} 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 15

16 Example Scatter-Gather: Averaging 1 if (world_rank == 0) 2 rand_nums = create_rand_nums(elements_per_proc * world_size); 3 4 // Create a buffer that will hold a subset of the random numbers 5 float *sub_rand_nums = malloc(sizeof(float) * elements_per_proc); 6 7 // Scatter the random numbers to all processes 8 MPI_Scatter(rand_nums, elements_per_proc, MPI_FLOAT, sub_rand_nums, 9 elements_per_proc, MPI_FLOAT, 0, MPI_COMM_WORLD); 10 // Compute the average of your subset 11 float sub_avg = compute_avg(sub_rand_nums, elements_per_proc); 12 // Gather all partial averages down to the root process 13 float *sub_avgs = NULL; 14 if (world_rank == 0) 15 sub_avgs = malloc(sizeof(float) * world_size); 16 MPI_Gather(&sub_avg,1, MPI_FLOAT, sub_avgs, 1, MPI_FLOAT, 0,MPI_COMM_WORLD); // Compute the total average of all numbers. 19 if (world_rank == 0) 20 float avg = compute_avg(sub_avgs, world_size); 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 16

17 Multi-broadcast operation MPI_Allgather(sbuf,scount,stype,rbuf,rcount,rtype,comm) Data from local sbuf are sent to all in rbuf Indication of master redundant since all processes receive the same data MPI_Allgather corresponds to MPI_Gather followed by a MPI_Bcast 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 17

18 Example Allgather: Averaging 1 // Gather all partial averages down to all the processes 2 float *sub_avgs = (float *)malloc(sizeof(float) * world_size); 3 MPI_Allgather(&sub_avg, 1, MPI_FLOAT, sub_avgs, 1, MPI_FLOAT, 4 MPI_COMM_WORLD); 5 6 // Compute the total average of all numbers. 7 float avg = compute_avg(sub_avgs, world_size); Output /home/th/: mpirun -n 4./average 100 Avg of all elements from proc 1 is Avg of all elements from proc 3 is Avg of all elements from proc 0 is Avg of all elements from proc 2 is May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 18

19 Total exchange MPI_Alltoall(sbuf,scount,stype,rbuf,rcount,rtype,comm) Matrix view Before MPI_Alltoall process k has row k of the matrix After MPI_Alltoall process k has column k of the matrix MPI_Alltoall corresponds to MPI_Gather followed by a MPI_Scatter 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 19

20 Variable exchange operations Variable scatter & Gather variants MPI_Scatterv & MPI_Gatherv Variable are: Number of data elements that will be distributed to individual processes Their position in the send-buffer sbuf 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 20

21 Variable Scatter & Gather Variable scatter MPI_Scatterv(sbf,scount,displs,styp, rbf,rcount,rtyp,ma,comm) scount[i] contains the number of data elements which has to be send to process i. displs[i] defines the start of the data block for process i relative to sbuf. Variable gather MPI_Gatherv(sbuf,scount,styp, rbuf,rcount,displs,rtyp,ma,comm) Also variable function for Allgather, Allscatter & Alltoall 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 21

22 Example MPI_Scatterv 1 /*Initialising */ 2 if(myrank==root) init(sbuf,n); 3 /* Splitting work and data */ 4 MPI_Comm_size(comm,&size); 5 Nopt=N/size; 6 Rest=N-Nopt*size; 7 displs[0]=0; 8 for(i=0;i<n;i++) { 9 scount[i]=nopt; 10 if(i>0) displs[i]=displs[i-1]+scount[i-1]*sizeof(double); 11 if(rest>0) { scount[i]++; Rest--;} 12 } 13 /* Distributing data */ 14 MPI_Scatterv(sbuf,scount,displs,MPI_DOUBLE,rbuf, 15 scount[myrank],mpi_double,root,comm); 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 22

23 Comparison between BLAS & Reduce Multiplication Matrix with Vector 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 23

24 Example comparison Compare different approaches A R N M, N rows, M columns Row-wise distribution y=ax BLAS-Routine Column-wise distribution Reduction operation 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 24

25 Example row-wise Row-wise distribution Result vector y distributed 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 25

26 Example row-wise BLAS Building block Multiplikation Matrix*Vektor BLAS (Basic Linear Algorithm subroutines) algorithm dgemv 1 void local_mv(n,m,y,a,lda,x) 2 { 3 double x[n],a[n*m],y[m],s; 4 /*partial sum-local op.*/ 5 for(i=0;i<m;i++) { 6 s=0; 7 for(j=0;j<n;j++) 8 s+=a[i*lda+j]*x[j]; 9 y[i]=s; 10 } 11 } Timing arith. 2 N M T a mem.access - x M T m (N, 1) - y T m (M, 1) - A M T m (N, 1) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 26

27 Example row-wise vector Task Initial distribution: All data at process 0 Result vector y expected at process May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 27

28 Example row-wise matrix Operations Distribute x to all processes: MPI_Bcast (p-1)*tk(n) Distribute rows of A: MPI_Scatter (p-1)*tk(m*n) Vector x Matrix A 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 28

29 Example row-wise results Operations Arithmetic Communication Memory access 2 N M T a (p 1) [T k (N) + T k (M N) + T k (M)] 2 M T m (N, 1) + T m (M, 1) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 29

30 Example column-wise Task Distribution column-wise Solution vector assembled by reduction operation 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 30

31 Example column-wise vector Distributing vector x Vector x MPI_Scatter (p-1)*tk(m) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 31

32 Example column-wise matrix Distributing matrix A Matrix A pack blocks in buffer memory: N*Tm(M,1)+M*Tm(N,1) Sending: (p-1)tk(m*n) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 32

33 Example column-wise result Assemble vector y MPI_Reduce Cost for reduction of y: log 2 (p)(t k (N) + NT a + 2T m (N, 1)) Arithmetic 2 N M T a Communication (p 1)[T k (M) + T K (M N)] + log 2 (p)t k (N) Memory access N T m (M, 1) + M T M (N, 1) + 2 log 2 (p)t m (N, 1) Algorithm is slightly faster Parallelization is only useful if the corresponding data distribution is already available before the algorithm starts 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 33

34 Communicator 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 34

35 Communicators Motivation Communicator: Distinguish different contexts Conflict-free organization of groups Integration of third party software Example: Distinction between library functions application Predefined communicators MPI_COMM_WORLD MPI_COMM_SELF MPI_COMM_NULL 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 35

36 Duplicate communicators MPI_Comm_dup(MPI_COMM comm, MPI_COMM &newcomm); Creates a copy newcomm of comm Identical process group Allows clear delineation characterisation of process groups example MPI_COMM myworld;... MPI_Comm_dup(MPI_COMM_WORLD, &myworld) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 36

37 Splitting communicators MPI_Comm_split(MPI_COMM comm, int color, int key, MPI_COMM &newcomm); Divides communicator comm into multiple communicators with disjoint processor groups MPI_Comm_split has to be called by all processes in comm Processes with the same value of color forms a new communicator group 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 37

38 Example Splitting communicator 1 MPI_COMM comm1, comm2; 2 MPI_Comm_size(comm,&size); 3 MPI_Comm_rank(comm,&rank); 4 i=rank%3; 5 j=size-rank; 6 if(i==0) 7 MPI_Comm_split(comm,MPI_UNDEFINED,0,&newcomm); 8 else if(i==1) 9 MPI_Comm_split(comm,i,j,&comm1); 10 else 11 MPI_Comm_split(comm,i,j,&comm2) MPI_UNDEFINED returns null-handle MPI_COMM_NULL. 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 38

39 Example Splitting communicator MPI_COMM_WORLD Rang P0 P1 P2 P3 P4 P5 P6 P7 P8 color key MPI_COMM_WORLD comm1 P1 P4 P comm2 P2 P5 P P0 P3 P May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 39

40 Free communicator group Clean up MPI_COMM_free(MPI_COMM *comm); Deletes the communicator comm Resources occupied by comm are released by MPI. After the function call, the communicator has the value of the null-handle MPI_COMM_NULL MPI_COMM_free has to be called by all process, which belongs to comm 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 40

41 Grouping communicators MPI_COMM_group(MPI_COMM comm, MPI_Group grp) Creates a process group from a communicator More group constructors MPI_COMM_create Generating a communicator from the group MPI_Group_incl Include processes into a group MPI_Group_excl Exclude processes from a group MPI_Group_range_incl Forms a group from a simple pattern MPI_Group_range_excl Excludes processes from a group by simple pattern 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 41

42 Example: create a group Group grp=(a,b,c,d,e,f,g), n=3, rank=[5,0,2] MPI_Group_incl(grp, n, &rank, &newgrp) Include in new group newgrp n=3 processes defined by pattern rank=[5,0,2] newgrp=(f,a,c) MPI_Group_excl(grp, n, &rank, &newgrp) Exclude from new group newgrp n=3 processes defined by pattern rank=[5,0,2] newgrp=(b,d,e,g) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 42

43 Example: create a group II Group grp=(a,b,c,d,e,f,g,h,i,j),, n=3, ranges=[[6,7,1],[1,6,2],[0,9,4]] Ranges forms a triple [start, end, spacing] MPI_Group_range_incl(grp, 3, ranges, &newgrp) Include in new group newgrp n=3 range triples defined by [[6,7,1],[1,6,2],[0,9,4]] newgrp=(g,h,b,d,f,a,e,i) MPI_Group_range_excl(grp, 3, ranges, &newgrp) Exclude from new group newgrp n=3 range triples defined by [[6,7,1],[1,6,2],[0,9,4]] newgrp=(c,j) 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 43

44 Operations on communicator groups More grouping functions Merging groups Intersection of groups Difference of groups Comparing groups Delete/Free groups Size of a group Rank of a group... MPI_Group_union MPI_Group_intersection MPI_Group_difference MPI_Group_compare MPI_Group_free MPI_Group_size MPI_Group_rank 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 44

45 Intercommunicator 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 45

46 Intercommunicator Intracommunicator Up til now, we had only handled communication inside a contiguous group. This communication was inside (intra/internal) a communicator. Intercommunicator A communicator who establishes a context between groups Intercommunicators are associated with 2 groups of disjoint processes Intercommunicators are associated with a remote group and a local group The target process (destination for send, source for receive) is its rank in the remote group. A communicator is either intra or inter, never both 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 46

47 Create intercommunicator MPI_Intercomm_create(local_comm, local_bridge, bridge_comm, remote_bridge, tag, &newcomm ) local_comm local Intracommunicator (handle) local_bridge Rank of a distinguished process in local_comm (integer) bridge_comm Remote intracommunication, which should be connected to local_comm by the newly build intercommunicator newcomm remote_bridge Rank of a certain process in remote communicator 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 47

48 Communication between groups Function uses point-to-point communication with specified tag between the two processes defined as bridge heads. 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 48

49 Example 1 int main(int argc, char **argv) 2 { 3 MPI_Comm mycomm; /* intra-communicator local sub-group */ 4 MPI_Comm myfirstcomm; /* inter-communicator */ 5 MPI_Comm mysecondcomm; /* second inter-communicator (group 1 only) */ 6 int memberkey, rank; 7 8 MPI_Init(&argc, &argv); 9 MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* User code must generate memberkey in the range [0, 1, 2] */ 12 memberkey = rank % 3; /* Build intra-communicator for local sub-group */ 15 MPI_Comm_split(MPI_COMM_WORLD,memberKey,rank,&myComm); 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 49

50 Example 1 /* Build inter-communicators. Tags are hard-coded. */ 2 if (memberkey == 0) 3 { /*Group 0 communicates with group 1. */ 4 MPI_Intercomm_create( mycomm, 0, MPI_COMM_WORLD, 1, 5 01, &myfirstcomm); } 6 else if (memberkey == 1) 7 { /* Group 1 communicates with groups 0 and 2. */ 8 MPI_Intercomm_create( mycomm, 0, MPI_COMM_WORLD, 0, 9 01, &myfirstcomm); 10 MPI_Intercomm_create( mycomm, 0, MPI_COMM_WORLD, 2, 11 12, &mysecondcomm); 12 } 13 else if (memberkey == 2) 14 { /* Group 2 communicates with group 1. */ 15 MPI_Intercomm_create( mycomm, 0, MPI_COMM_WORLD, 1, 16 12, &mysecondcomm); 17 } 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 50

51 Example 1 /* Do work... */ 2 3 switch(memberkey) /* free communicators appropriately */ 4 { 5 case 1: 6 MPI_Comm_free(&myFirstComm); 7 MPI_Comm_free(&mySecondComm); 8 case 0: 9 MPI_Comm_free(&myFirstComm); 10 case 2: 11 MPI_Comm_free(&mySecondComm); 12 break; 13 } MPI_Finalize(); 16 } 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 51

52 Motivation Intercommunicator Used for Meta-Computing Cloud-Computing Low bandwidth between components e.g. cluster < > pc bridge head controls communication with remote-computer 18. May 2015 Thorsten Grahs Parallel Computing I SS 2015 Seite 52

Intra and Inter Communicators

Intra and Inter Communicators Intra and Inter Communicators Groups A group is a set of processes The group have a size And each process have a rank Creating a group is a local operation Why we need groups To make a clear distinction

More information

Cornell Theory Center. Discussion: MPI Collective Communication I. Table of Contents. 1. Introduction

Cornell Theory Center. Discussion: MPI Collective Communication I. Table of Contents. 1. Introduction 1 of 18 11/1/2006 3:59 PM Cornell Theory Center Discussion: MPI Collective Communication I This is the in-depth discussion layer of a two-part module. For an explanation of the layers and how to navigate

More information

Introduction to MPI Part II Collective Communications and communicators

Introduction to MPI Part II Collective Communications and communicators Introduction to MPI Part II Collective Communications and communicators Andrew Emerson, Fabio Affinito {a.emerson,f.affinito}@cineca.it SuperComputing Applications and Innovation Department Collective

More information

MPI Collective communication

MPI Collective communication MPI Collective communication CPS343 Parallel and High Performance Computing Spring 2018 CPS343 (Parallel and HPC) MPI Collective communication Spring 2018 1 / 43 Outline 1 MPI Collective communication

More information

Distributed Memory Parallel Programming

Distributed Memory Parallel Programming COSC Big Data Analytics Parallel Programming using MPI Edgar Gabriel Spring 201 Distributed Memory Parallel Programming Vast majority of clusters are homogeneous Necessitated by the complexity of maintaining

More information

Standard MPI - Message Passing Interface

Standard MPI - Message Passing Interface c Ewa Szynkiewicz, 2007 1 Standard MPI - Message Passing Interface The message-passing paradigm is one of the oldest and most widely used approaches for programming parallel machines, especially those

More information

Outline. Communication modes MPI Message Passing Interface Standard

Outline. Communication modes MPI Message Passing Interface Standard MPI THOAI NAM Outline Communication modes MPI Message Passing Interface Standard TERMs (1) Blocking If return from the procedure indicates the user is allowed to reuse resources specified in the call Non-blocking

More information

Introduction to MPI part II. Fabio AFFINITO

Introduction to MPI part II. Fabio AFFINITO Introduction to MPI part II Fabio AFFINITO (f.affinito@cineca.it) Collective communications Communications involving a group of processes. They are called by all the ranks involved in a communicator (or

More information

COSC 4397 Parallel Computation. Introduction to MPI (III) Process Grouping. Terminology (I)

COSC 4397 Parallel Computation. Introduction to MPI (III) Process Grouping. Terminology (I) COSC 4397 Introduction to MPI (III) Process Grouping Spring 2010 Terminology (I) an MPI_Group is the object describing the list of processes forming a logical entity a group has a size MPI_Group_size every

More information

Programming with MPI Collectives

Programming with MPI Collectives Programming with MPI Collectives Jan Thorbecke Type to enter text Delft University of Technology Challenge the future Collectives Classes Communication types exercise: BroadcastBarrier Gather Scatter exercise:

More information

Practical Scientific Computing: Performanceoptimized

Practical Scientific Computing: Performanceoptimized Practical Scientific Computing: Performanceoptimized Programming Programming with MPI November 29, 2006 Dr. Ralf-Peter Mundani Department of Computer Science Chair V Technische Universität München, Germany

More information

Review of MPI Part 2

Review of MPI Part 2 Review of MPI Part Russian-German School on High Performance Computer Systems, June, 7 th until July, 6 th 005, Novosibirsk 3. Day, 9 th of June, 005 HLRS, University of Stuttgart Slide Chap. 5 Virtual

More information

MA471. Lecture 5. Collective MPI Communication

MA471. Lecture 5. Collective MPI Communication MA471 Lecture 5 Collective MPI Communication Today: When all the processes want to send, receive or both Excellent website for MPI command syntax available at: http://www-unix.mcs.anl.gov/mpi/www/ 9/10/2003

More information

CDP. MPI Derived Data Types and Collective Communication

CDP. MPI Derived Data Types and Collective Communication CDP MPI Derived Data Types and Collective Communication Why Derived Data Types? Elements in an MPI message are of the same type. Complex data, requires two separate messages. Bad example: typedef struct

More information

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

CS 6230: High-Performance Computing and Parallelization Introduction to MPI CS 6230: High-Performance Computing and Parallelization Introduction to MPI Dr. Mike Kirby School of Computing and Scientific Computing and Imaging Institute University of Utah Salt Lake City, UT, USA

More information

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI CS 470 Spring 2017 Mike Lam, Professor Distributed Programming & MPI MPI paradigm Single program, multiple data (SPMD) One program, multiple processes (ranks) Processes communicate via messages An MPI

More information

Parallel Programming with MPI MARCH 14, 2018

Parallel Programming with MPI MARCH 14, 2018 Parallel Programming with MPI SARDAR USMAN & EMAD ALAMOUDI SUPERVISOR: PROF. RASHID MEHMOOD RMEHMOOD@KAU.EDU.SA MARCH 14, 2018 Sources The presentation is compiled using following sources. http://mpi-forum.org/docs/

More information

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

Introduction to MPI. May 20, Daniel J. Bodony Department of Aerospace Engineering University of Illinois at Urbana-Champaign Introduction to MPI May 20, 2013 Daniel J. Bodony Department of Aerospace Engineering University of Illinois at Urbana-Champaign Top500.org PERFORMANCE DEVELOPMENT 1 Eflop/s 162 Pflop/s PROJECTED 100 Pflop/s

More information

Outline. Communication modes MPI Message Passing Interface Standard. Khoa Coâng Ngheä Thoâng Tin Ñaïi Hoïc Baùch Khoa Tp.HCM

Outline. Communication modes MPI Message Passing Interface Standard. Khoa Coâng Ngheä Thoâng Tin Ñaïi Hoïc Baùch Khoa Tp.HCM THOAI NAM Outline Communication modes MPI Message Passing Interface Standard TERMs (1) Blocking If return from the procedure indicates the user is allowed to reuse resources specified in the call Non-blocking

More information

Collective Communications

Collective Communications Collective Communications Reusing this material This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International License. http://creativecommons.org/licenses/by-nc-sa/4.0/deed.en_us

More information

Parallel Programming. Using MPI (Message Passing Interface)

Parallel Programming. Using MPI (Message Passing Interface) Parallel Programming Using MPI (Message Passing Interface) Message Passing Model Simple implementation of the task/channel model Task Process Channel Message Suitable for a multicomputer Number of processes

More information

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI

CS 470 Spring Mike Lam, Professor. Distributed Programming & MPI CS 470 Spring 2018 Mike Lam, Professor Distributed Programming & MPI MPI paradigm Single program, multiple data (SPMD) One program, multiple processes (ranks) Processes communicate via messages An MPI

More information

Recap of Parallelism & MPI

Recap of Parallelism & MPI Recap of Parallelism & MPI Chris Brady Heather Ratcliffe The Angry Penguin, used under creative commons licence from Swantje Hess and Jannis Pohlmann. Warwick RSE 13/12/2017 Parallel programming Break

More information

MPI. (message passing, MIMD)

MPI. (message passing, MIMD) MPI (message passing, MIMD) What is MPI? a message-passing library specification extension of C/C++ (and Fortran) message passing for distributed memory parallel programming Features of MPI Point-to-point

More information

Distributed Memory Programming with MPI

Distributed Memory Programming with MPI Distributed Memory Programming with MPI Moreno Marzolla Dip. di Informatica Scienza e Ingegneria (DISI) Università di Bologna moreno.marzolla@unibo.it Algoritmi Avanzati--modulo 2 2 Credits Peter Pacheco,

More information

Experiencing Cluster Computing Message Passing Interface

Experiencing Cluster Computing Message Passing Interface Experiencing Cluster Computing Message Passing Interface Class 6 Message Passing Paradigm The Underlying Principle A parallel program consists of p processes with different address spaces. Communication

More information

Basic MPI Communications. Basic MPI Communications (cont d)

Basic MPI Communications. Basic MPI Communications (cont d) Basic MPI Communications MPI provides two non-blocking routines: MPI_Isend(buf,cnt,type,dst,tag,comm,reqHandle) buf: source of data to be sent cnt: number of data elements to be sent type: type of each

More information

The Message Passing Interface (MPI) TMA4280 Introduction to Supercomputing

The Message Passing Interface (MPI) TMA4280 Introduction to Supercomputing The Message Passing Interface (MPI) TMA4280 Introduction to Supercomputing NTNU, IMF January 16. 2017 1 Parallelism Decompose the execution into several tasks according to the work to be done: Function/Task

More information

Message Passing with MPI

Message Passing with MPI Message Passing with MPI PPCES 2016 Hristo Iliev IT Center / JARA-HPC IT Center der RWTH Aachen University Agenda Motivation Part 1 Concepts Point-to-point communication Non-blocking operations Part 2

More information

Topics. Lecture 7. Review. Other MPI collective functions. Collective Communication (cont d) MPI Programming (III)

Topics. Lecture 7. Review. Other MPI collective functions. Collective Communication (cont d) MPI Programming (III) Topics Lecture 7 MPI Programming (III) Collective communication (cont d) Point-to-point communication Basic point-to-point communication Non-blocking point-to-point communication Four modes of blocking

More information

High-Performance Computing: MPI (ctd)

High-Performance Computing: MPI (ctd) High-Performance Computing: MPI (ctd) Adrian F. Clark: alien@essex.ac.uk 2015 16 Adrian F. Clark: alien@essex.ac.uk High-Performance Computing: MPI (ctd) 2015 16 1 / 22 A reminder Last time, we started

More information

Cluster Computing MPI. Industrial Standard Message Passing

Cluster Computing MPI. Industrial Standard Message Passing MPI Industrial Standard Message Passing MPI Features Industrial Standard Highly portable Widely available SPMD programming model Synchronous execution MPI Outer scope int MPI_Init( int *argc, char ** argv)

More information

Intermediate MPI features

Intermediate MPI features Intermediate MPI features Advanced message passing Collective communication Topologies Group communication Forms of message passing (1) Communication modes: Standard: system decides whether message is

More information

Scientific Computing

Scientific Computing Lecture on Scientific Computing Dr. Kersten Schmidt Lecture 21 Technische Universität Berlin Institut für Mathematik Wintersemester 2014/2015 Syllabus Linear Regression, Fast Fourier transform Modelling

More information

Message-Passing and MPI Programming

Message-Passing and MPI Programming Message-Passing and MPI Programming 2.1 Transfer Procedures Datatypes and Collectives N.M. Maclaren Computing Service nmm1@cam.ac.uk ext. 34761 July 2010 These are the procedures that actually transfer

More information

Message Passing Interface

Message Passing Interface Message Passing Interface DPHPC15 TA: Salvatore Di Girolamo DSM (Distributed Shared Memory) Message Passing MPI (Message Passing Interface) A message passing specification implemented

More information

The MPI Message-passing Standard Practical use and implementation (IV) SPD Course 09/03/2016 Massimo Coppola

The MPI Message-passing Standard Practical use and implementation (IV) SPD Course 09/03/2016 Massimo Coppola The MPI Message-passing Standard Practical use and implementation (IV) SPD Course 09/03/206 Massimo Coppola COMMUNICATORS AND GROUPS SPD - MPI Standard Use and Implementation (3) 2 Comm.s & Groups motivation

More information

HPC Parallel Programing Multi-node Computation with MPI - I

HPC Parallel Programing Multi-node Computation with MPI - I HPC Parallel Programing Multi-node Computation with MPI - I Parallelization and Optimization Group TATA Consultancy Services, Sahyadri Park Pune, India TCS all rights reserved April 29, 2013 Copyright

More information

CPS 303 High Performance Computing

CPS 303 High Performance Computing CPS 303 High Performance Computing Wensheng Shen Department of Computational Science SUNY Brockport Chapter 5: Collective communication The numerical integration problem in Chapter 4 is not very efficient.

More information

Distributed Systems + Middleware Advanced Message Passing with MPI

Distributed Systems + Middleware Advanced Message Passing with MPI Distributed Systems + Middleware Advanced Message Passing with MPI Gianpaolo Cugola Dipartimento di Elettronica e Informazione Politecnico, Italy cugola@elet.polimi.it http://home.dei.polimi.it/cugola

More information

Collective Communication in MPI and Advanced Features

Collective Communication in MPI and Advanced Features Collective Communication in MPI and Advanced Features Pacheco s book. Chapter 3 T. Yang, CS240A. Part of slides from the text book, CS267 K. Yelick from UC Berkeley and B. Gropp, ANL Outline Collective

More information

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

MPI and OpenMP (Lecture 25, cs262a) Ion Stoica, UC Berkeley November 19, 2016 MPI and OpenMP (Lecture 25, cs262a) Ion Stoica, UC Berkeley November 19, 2016 Message passing vs. Shared memory Client Client Client Client send(msg) recv(msg) send(msg) recv(msg) MSG MSG MSG IPC Shared

More information

Message Passing Interface. most of the slides taken from Hanjun Kim

Message Passing Interface. most of the slides taken from Hanjun Kim Message Passing Interface most of the slides taken from Hanjun Kim Message Passing Pros Scalable, Flexible Cons Someone says it s more difficult than DSM MPI (Message Passing Interface) A standard message

More information

Message Passing Interface

Message Passing Interface Message Passing Interface by Kuan Lu 03.07.2012 Scientific researcher at Georg-August-Universität Göttingen and Gesellschaft für wissenschaftliche Datenverarbeitung mbh Göttingen Am Faßberg, 37077 Göttingen,

More information

COMP 322: Fundamentals of Parallel Programming

COMP 322: Fundamentals of Parallel Programming COMP 322: Fundamentals of Parallel Programming https://wiki.rice.edu/confluence/display/parprog/comp322 Lecture 37: Introduction to MPI (contd) Vivek Sarkar Department of Computer Science Rice University

More information

Message-Passing Computing

Message-Passing Computing Chapter 2 Slide 41þþ Message-Passing Computing Slide 42þþ Basics of Message-Passing Programming using userlevel message passing libraries Two primary mechanisms needed: 1. A method of creating separate

More information

Slides prepared by : Farzana Rahman 1

Slides prepared by : Farzana Rahman 1 Introduction to MPI 1 Background on MPI MPI - Message Passing Interface Library standard defined by a committee of vendors, implementers, and parallel programmers Used to create parallel programs based

More information

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

MPI 5. CSCI 4850/5850 High-Performance Computing Spring 2018 MPI 5 CSCI 4850/5850 High-Performance Computing Spring 2018 Tae-Hyuk (Ted) Ahn Department of Computer Science Program of Bioinformatics and Computational Biology Saint Louis University Learning Objectives

More information

High Performance Computing

High Performance Computing High Performance Computing Course Notes 2009-2010 2010 Message Passing Programming II 1 Communications Point-to-point communications: involving exact two processes, one sender and one receiver For example,

More information

Department of Informatics V. HPC-Lab. Session 4: MPI, CG M. Bader, A. Breuer. Alex Breuer

Department of Informatics V. HPC-Lab. Session 4: MPI, CG M. Bader, A. Breuer. Alex Breuer HPC-Lab Session 4: MPI, CG M. Bader, A. Breuer Meetings Date Schedule 10/13/14 Kickoff 10/20/14 Q&A 10/27/14 Presentation 1 11/03/14 H. Bast, Intel 11/10/14 Presentation 2 12/01/14 Presentation 3 12/08/14

More information

Parallel Computing and the MPI environment

Parallel Computing and the MPI environment Parallel Computing and the MPI environment Claudio Chiaruttini Dipartimento di Matematica e Informatica Centro Interdipartimentale per le Scienze Computazionali (CISC) Università di Trieste http://www.dmi.units.it/~chiarutt/didattica/parallela

More information

Collective Communications I

Collective Communications I Collective Communications I Ned Nedialkov McMaster University Canada CS/SE 4F03 January 2016 Outline Introduction Broadcast Reduce c 2013 16 Ned Nedialkov 2/14 Introduction A collective communication involves

More information

Part - II. Message Passing Interface. Dheeraj Bhardwaj

Part - II. Message Passing Interface. Dheeraj Bhardwaj Part - II Dheeraj Bhardwaj Department of Computer Science & Engineering Indian Institute of Technology, Delhi 110016 India http://www.cse.iitd.ac.in/~dheerajb 1 Outlines Basics of MPI How to compile and

More information

Parallel Computing Paradigms

Parallel Computing Paradigms Parallel Computing Paradigms Message Passing João Luís Ferreira Sobral Departamento do Informática Universidade do Minho 31 October 2017 Communication paradigms for distributed memory Message passing is

More information

Paul Burton April 2015 An Introduction to MPI Programming

Paul Burton April 2015 An Introduction to MPI Programming Paul Burton April 2015 Topics Introduction Initialising MPI & basic concepts Compiling and running a parallel program on the Cray Practical : Hello World MPI program Synchronisation Practical Data types

More information

Lecture 6: Message Passing Interface

Lecture 6: Message Passing Interface Lecture 6: Message Passing Interface Introduction The basics of MPI Some simple problems More advanced functions of MPI A few more examples CA463D Lecture Notes (Martin Crane 2013) 50 When is Parallel

More information

The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) CPUs

The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) CPUs 1 The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) CPUs http://mpi-forum.org https://www.open-mpi.org/ Mike Bailey mjb@cs.oregonstate.edu Oregon State University mpi.pptx

More information

In the simplest sense, parallel computing is the simultaneous use of multiple computing resources to solve a problem.

In the simplest sense, parallel computing is the simultaneous use of multiple computing resources to solve a problem. 1. Introduction to Parallel Processing In the simplest sense, parallel computing is the simultaneous use of multiple computing resources to solve a problem. a) Types of machines and computation. A conventional

More information

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

MPI 8. CSCI 4850/5850 High-Performance Computing Spring 2018 MPI 8 CSCI 4850/5850 High-Performance Computing Spring 2018 Tae-Hyuk (Ted) Ahn Department of Computer Science Program of Bioinformatics and Computational Biology Saint Louis University Learning Objectives

More information

CSE 613: Parallel Programming. Lecture 21 ( The Message Passing Interface )

CSE 613: Parallel Programming. Lecture 21 ( The Message Passing Interface ) CSE 613: Parallel Programming Lecture 21 ( The Message Passing Interface ) Jesmin Jahan Tithi Department of Computer Science SUNY Stony Brook Fall 2013 ( Slides from Rezaul A. Chowdhury ) Principles of

More information

Report S1 C. Kengo Nakajima. Programming for Parallel Computing ( ) Seminar on Advanced Computing ( )

Report S1 C. Kengo Nakajima. Programming for Parallel Computing ( ) Seminar on Advanced Computing ( ) Report S1 C Kengo Nakajima Programming for Parallel Computing (616-2057) Seminar on Advanced Computing (616-4009) Problem S1-1 Report S1 (1/2) Read local files /a1.0~a1.3, /a2.0~a2.3. Develop

More information

The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) CPUs

The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) CPUs 1 The Message Passing Interface (MPI): Parallelism on Multiple (Possibly Heterogeneous) s http://mpi-forum.org https://www.open-mpi.org/ Mike Bailey mjb@cs.oregonstate.edu Oregon State University mpi.pptx

More information

CS 179: GPU Programming. Lecture 14: Inter-process Communication

CS 179: GPU Programming. Lecture 14: Inter-process Communication CS 179: GPU Programming Lecture 14: Inter-process Communication The Problem What if we want to use GPUs across a distributed system? GPU cluster, CSIRO Distributed System A collection of computers Each

More information

Parallel programming MPI

Parallel programming MPI Parallel programming MPI Distributed memory Each unit has its own memory space If a unit needs data in some other memory space, explicit communication (often through network) is required Point-to-point

More information

Message Passing Interface

Message Passing Interface MPSoC Architectures MPI Alberto Bosio, Associate Professor UM Microelectronic Departement bosio@lirmm.fr Message Passing Interface API for distributed-memory programming parallel code that runs across

More information

IPM Workshop on High Performance Computing (HPC08) IPM School of Physics Workshop on High Perfomance Computing/HPC08

IPM Workshop on High Performance Computing (HPC08) IPM School of Physics Workshop on High Perfomance Computing/HPC08 IPM School of Physics Workshop on High Perfomance Computing/HPC08 16-21 February 2008 MPI tutorial Luca Heltai Stefano Cozzini Democritos/INFM + SISSA 1 When

More information

CSE. Parallel Algorithms on a cluster of PCs. Ian Bush. Daresbury Laboratory (With thanks to Lorna Smith and Mark Bull at EPCC)

CSE. Parallel Algorithms on a cluster of PCs. Ian Bush. Daresbury Laboratory (With thanks to Lorna Smith and Mark Bull at EPCC) Parallel Algorithms on a cluster of PCs Ian Bush Daresbury Laboratory I.J.Bush@dl.ac.uk (With thanks to Lorna Smith and Mark Bull at EPCC) Overview This lecture will cover General Message passing concepts

More information

MPI - The Message Passing Interface

MPI - The Message Passing Interface MPI - The Message Passing Interface The Message Passing Interface (MPI) was first standardized in 1994. De facto standard for distributed memory machines. All Top500 machines (http://www.top500.org) are

More information

Distributed Memory Systems: Part IV

Distributed Memory Systems: Part IV Chapter 5 Distributed Memory Systems: Part IV Max Planck Institute Magdeburg Jens Saak, Scientific Computing II 293/342 The Message Passing Interface is a standard for creation of parallel programs using

More information

The MPI Message-passing Standard Practical use and implementation (V) SPD Course 6/03/2017 Massimo Coppola

The MPI Message-passing Standard Practical use and implementation (V) SPD Course 6/03/2017 Massimo Coppola The MPI Message-passing Standard Practical use and implementation (V) SPD Course 6/03/2017 Massimo Coppola Intracommunicators COLLECTIVE COMMUNICATIONS SPD - MPI Standard Use and Implementation (5) 2 Collectives

More information

MPI Message Passing Interface

MPI Message Passing Interface MPI Message Passing Interface Portable Parallel Programs Parallel Computing A problem is broken down into tasks, performed by separate workers or processes Processes interact by exchanging information

More information

Chip Multiprocessors COMP Lecture 9 - OpenMP & MPI

Chip Multiprocessors COMP Lecture 9 - OpenMP & MPI Chip Multiprocessors COMP35112 Lecture 9 - OpenMP & MPI Graham Riley 14 February 2018 1 Today s Lecture Dividing work to be done in parallel between threads in Java (as you are doing in the labs) is rather

More information

MPI MESSAGE PASSING INTERFACE

MPI MESSAGE PASSING INTERFACE MPI MESSAGE PASSING INTERFACE David COLIGNON, ULiège CÉCI - Consortium des Équipements de Calcul Intensif http://www.ceci-hpc.be Outline Introduction From serial source code to parallel execution MPI functions

More information

CEE 618 Scientific Parallel Computing (Lecture 5): Message-Passing Interface (MPI) advanced

CEE 618 Scientific Parallel Computing (Lecture 5): Message-Passing Interface (MPI) advanced 1 / 32 CEE 618 Scientific Parallel Computing (Lecture 5): Message-Passing Interface (MPI) advanced Albert S. Kim Department of Civil and Environmental Engineering University of Hawai i at Manoa 2540 Dole

More information

The MPI Message-passing Standard Practical use and implementation (VI) SPD Course 08/03/2017 Massimo Coppola

The MPI Message-passing Standard Practical use and implementation (VI) SPD Course 08/03/2017 Massimo Coppola The MPI Message-passing Standard Practical use and implementation (VI) SPD Course 08/03/2017 Massimo Coppola Datatypes REFINING DERIVED DATATYPES LAYOUT FOR COMPOSITION SPD - MPI Standard Use and Implementation

More information

Chapter 4. Message-passing Model

Chapter 4. Message-passing Model Chapter 4 Message-Passing Programming Message-passing Model 2 1 Characteristics of Processes Number is specified at start-up time Remains constant throughout the execution of program All execute same program

More information

MPI MESSAGE PASSING INTERFACE

MPI MESSAGE PASSING INTERFACE MPI MESSAGE PASSING INTERFACE David COLIGNON CÉCI - Consortium des Équipements de Calcul Intensif http://hpc.montefiore.ulg.ac.be Outline Introduction From serial source code to parallel execution MPI

More information

Parallel Programming in C with MPI and OpenMP

Parallel Programming in C with MPI and OpenMP Parallel Programming in C with MPI and OpenMP Michael J. Quinn Chapter 4 Message-Passing Programming Learning Objectives Understanding how MPI programs execute Familiarity with fundamental MPI functions

More information

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

MPI and comparison of models Lecture 23, cs262a. Ion Stoica & Ali Ghodsi UC Berkeley April 16, 2018 MPI and comparison of models Lecture 23, cs262a Ion Stoica & Ali Ghodsi UC Berkeley April 16, 2018 MPI MPI - Message Passing Interface Library standard defined by a committee of vendors, implementers,

More information

Parallel Programming in C with MPI and OpenMP

Parallel Programming in C with MPI and OpenMP Parallel Programming in C with MPI and OpenMP Michael J. Quinn Chapter 4 Message-Passing Programming Learning Objectives n Understanding how MPI programs execute n Familiarity with fundamental MPI functions

More information

INTRODUCTION TO MPI COMMUNICATORS AND VIRTUAL TOPOLOGIES

INTRODUCTION TO MPI COMMUNICATORS AND VIRTUAL TOPOLOGIES INTRODUCTION TO MPI COMMUNICATORS AND VIRTUAL TOPOLOGIES Introduction to Parallel Computing with MPI and OpenMP 24 november 2017 a.marani@cineca.it WHAT ARE COMMUNICATORS? Many users are familiar with

More information

Agenda. MPI Application Example. Praktikum: Verteiltes Rechnen und Parallelprogrammierung Introduction to MPI. 1) Recap: MPI. 2) 2.

Agenda. MPI Application Example. Praktikum: Verteiltes Rechnen und Parallelprogrammierung Introduction to MPI. 1) Recap: MPI. 2) 2. Praktikum: Verteiltes Rechnen und Parallelprogrammierung Introduction to MPI Agenda 1) Recap: MPI 2) 2. Übungszettel 3) Projektpräferenzen? 4) Nächste Woche: 3. Übungszettel, Projektauswahl, Konzepte 5)

More information

1 Overview. KH Computational Physics QMC. Parallel programming.

1 Overview. KH Computational Physics QMC. Parallel programming. Parallel programming 1 Overview Most widely accepted technique for parallel programming is so called: M P I = Message Passing Interface. This is not a package or program, but rather a standardized collection

More information

Message Passing Programming

Message Passing Programming MPI Message Passing Programming Model Set of processes that each have local data and are able to communicate with each other by sending and receiving messages Advantages Useful and complete model to express

More information

Introduction to the Message Passing Interface (MPI)

Introduction to the Message Passing Interface (MPI) Introduction to the Message Passing Interface (MPI) CPS343 Parallel and High Performance Computing Spring 2018 CPS343 (Parallel and HPC) Introduction to the Message Passing Interface (MPI) Spring 2018

More information

MPI: Parallel Programming for Extreme Machines. Si Hammond, High Performance Systems Group

MPI: Parallel Programming for Extreme Machines. Si Hammond, High Performance Systems Group MPI: Parallel Programming for Extreme Machines Si Hammond, High Performance Systems Group Quick Introduction Si Hammond, (sdh@dcs.warwick.ac.uk) WPRF/PhD Research student, High Performance Systems Group,

More information

Lecture 13. Writing parallel programs with MPI Matrix Multiplication Basic Collectives Managing communicators

Lecture 13. Writing parallel programs with MPI Matrix Multiplication Basic Collectives Managing communicators Lecture 13 Writing parallel programs with MPI Matrix Multiplication Basic Collectives Managing communicators Announcements Extra lecture Friday 4p to 5.20p, room 2154 A4 posted u Cannon s matrix multiplication

More information

Intermediate MPI. M. D. Jones, Ph.D. Center for Computational Research University at Buffalo State University of New York

Intermediate MPI. M. D. Jones, Ph.D. Center for Computational Research University at Buffalo State University of New York Intermediate MPI M. D. Jones, Ph.D. Center for Computational Research University at Buffalo State University of New York High Performance Computing I, 2008 M. D. Jones, Ph.D. (CCR/UB) Intermediate MPI

More information

4. Parallel Programming with MPI

4. Parallel Programming with MPI 4. Parallel Programming with MPI 4. Parallel Programming with MPI... 4.. MPI: Basic Concepts and Definitions...3 4... The Concept of Parallel Program...3 4..2. Data Communication Operations...3 4..3. Communicators...3

More information

Lecture 4 Introduction to MPI

Lecture 4 Introduction to MPI CS075 1896 Lecture 4 Introduction to MPI Jeremy Wei Center for HPC, SJTU Mar 13th, 2017 1920 1987 2006 Recap of the last lecture (OpenMP) OpenMP is a standardized pragma-based intra-node parallel programming

More information

Parallelization. Tianhe-1A, 2.45 Pentaflops/s, 224 Terabytes RAM. Nigel Mitchell

Parallelization. Tianhe-1A, 2.45 Pentaflops/s, 224 Terabytes RAM. Nigel Mitchell Parallelization Tianhe-1A, 2.45 Pentaflops/s, 224 Terabytes RAM Nigel Mitchell Outline Pros and Cons of parallelization Shared memory vs. cluster computing MPI as a tool for sending and receiving messages

More information

CS 426. Building and Running a Parallel Application

CS 426. Building and Running a Parallel Application CS 426 Building and Running a Parallel Application 1 Task/Channel Model Design Efficient Parallel Programs (or Algorithms) Mainly for distributed memory systems (e.g. Clusters) Break Parallel Computations

More information

A Message Passing Standard for MPP and Workstations

A Message Passing Standard for MPP and Workstations A Message Passing Standard for MPP and Workstations Communications of the ACM, July 1996 J.J. Dongarra, S.W. Otto, M. Snir, and D.W. Walker Message Passing Interface (MPI) Message passing library Can be

More information

Scalasca performance properties The metrics tour

Scalasca performance properties The metrics tour Scalasca performance properties The metrics tour Markus Geimer m.geimer@fz-juelich.de Scalasca analysis result Generic metrics Generic metrics Time Total CPU allocation time Execution Overhead Visits Hardware

More information

mpidl The Power of MPI in IDL Version Tech-X Corporation 5621 Arapahoe Avenue, Suite A Boulder, CO

mpidl The Power of MPI in IDL Version Tech-X Corporation 5621 Arapahoe Avenue, Suite A Boulder, CO mpidl The Power of MPI in IDL Version 2.4.0 Tech-X Corporation 5621 Arapahoe Avenue, Suite A Boulder, CO 80303 http://www.txcorp.com info@txcorp.com mpidl User Guide CONTENTS Contents Table of Contents

More information

Parallel Programming Using MPI

Parallel Programming Using MPI Parallel Programming Using MPI Short Course on HPC 15th February 2019 Aditya Krishna Swamy adityaks@iisc.ac.in SERC, Indian Institute of Science When Parallel Computing Helps? Want to speed up your calculation

More information

Topics. Lecture 6. Point-to-point Communication. Point-to-point Communication. Broadcast. Basic Point-to-point communication. MPI Programming (III)

Topics. Lecture 6. Point-to-point Communication. Point-to-point Communication. Broadcast. Basic Point-to-point communication. MPI Programming (III) Topics Lecture 6 MPI Programming (III) Point-to-point communication Basic point-to-point communication Non-blocking point-to-point communication Four modes of blocking communication Manager-Worker Programming

More information

The Message Passing Model

The Message Passing Model Introduction to MPI The Message Passing Model Applications that do not share a global address space need a Message Passing Framework. An application passes messages among processes in order to perform

More information

Holland Computing Center Kickstart MPI Intro

Holland Computing Center Kickstart MPI Intro Holland Computing Center Kickstart 2016 MPI Intro Message Passing Interface (MPI) MPI is a specification for message passing library that is standardized by MPI Forum Multiple vendor-specific implementations:

More information

Part 3: Message Passing Programming. foils by M. Allen, T. Fahringer, M. Gerndt, M. Quinn, B. Wilkinson

Part 3: Message Passing Programming. foils by M. Allen, T. Fahringer, M. Gerndt, M. Quinn, B. Wilkinson 1 Parallel Systems Part 3: Message Passing Programming foils by M. Allen, T. Fahringer, M. Gerndt, M. Quinn, B. Wilkinson Message-Passing Programming using User- level Message Passing Libraries 2 Two primary

More information