Lec12-MPI-3 - Summary of previous lectures MPI as a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Parallel Programming and MPI- Lecture 3 Abhik Roychoudhury CS 3211 National University of Singapore CS3211 2009-10 by Abhik Roychoudhury 1 Sample material: Parallel Programming by Lin and Snyder, Chapter 7. Summary of previous lectures ` MPI as a programming interface ` Message passing communication ` Communicating sequential processes ` Entering and Exiting MPI ` MPI_Init, MPI_Finalize ` Point-to-point communication ` ` MPI_Send, MPI_Recv, MPI_Isend, MPI_Irecv ` Wait and test operations to complete communication. ` Collective communication CS3211 2009-10 by Abhik Roychoudhury 2 In today’s discussion ` Managing communicators in MPI ` Defines a communication domain. ` Used implicitly several times in our discussion in defining the communication primitives. CS3211 2009-10 by Abhik Roychoudhury 3 Size and rank ` int MPI_Comm_size(comm, &size); ` # of processes in the communicator ` int MPI_Comm_rank(comm, &rank); ` Rank of the process that calls it ` In the range 0…size-1 ` There is a pre-defined communicator ` MPI_COMM_WORLD CS3211 2009-10 by Abhik Roychoudhury 4 So, what is a communicator? ` A group is an ordered set of processes. ` A communicator is a handle to a group of processes. ` A communicator thus defines a communication domain . ` Even for the same group of processes <p1,…,pN>, it might be convenient to describe disparate communication domains containing the same group of processes. ` Why? ` To separate library code execution from user code execution. ` A send in library may be received by a receive in user code. ` This can be prevented by making the library and user code operate in different communication domains! CS3211 2009-10 by Abhik Roychoudhury 5 Intra- and Inter-communicators Intra-communicator For communication within a group of processes. Inter-communicator For point-to-point communication between disjoint groups of processes. CS3211 2009-10 by Abhik Roychoudhury
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/02/2011 for the course CS 3211 taught by Professor Dunnowho during the Spring '11 term at National University of Singapore.

Page1 / 4

Lec12-MPI-3 - Summary of previous lectures MPI as a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online