View Full Document

Message Passing Basics



View the full content.
View Full Document
View Full Document

5 views

Unformatted text preview:

Message Passing Basics John Urbanic urbanic psc edu April 23 2002 Introduction What is MPI The Message Passing Interface Standard MPI is a library that allows you to do problems in parallel using message passing to communicate between processes Library It is not a language like FORTRAN 90 C or HPF or even an extension to a language Instead it is a library that your native standard serial compiler f77 f90 cc CC uses Message Passing Message passing is sometimes referred to as a paradigm itself But it is really just a method of passing data between processes that is flexible enough to implement most paradigms Data Parallel Work Sharing etc with it Communicate This communication may be via a dedicated MPP torus network or merely an office LAN To the MPI programmer it looks much the same Processes These can be 512 PEs on a T3E or 4 processes on a single workstation April 23 2002 Basic MPI In order to do parallel programming you require some basic functionality namely the ability to Start Processes Send Messages Receive Messages Synchronize With these four capabilities you can construct any program We will look at the basic versions of the MPI routines that implement this Of course MPI offers over 125 functions Many of these are more convenient and efficient for certain tasks However with what we learn here we will be able to implement just about any algorithm Moreover the vast majority of MPI codes are built using primarily these routines April 23 2002 Starting Processes on the T3E or TCS On the T3E or TCS the fundamental control of processes is fairly simple There is always one process for each PE that your code is running on At run time you specify how many PEs you require and then your code is copied to each PE and run simultaneously In other words a 512 PE T3E or TCS code has 512 copies of the same code running on it from start to finish At first the idea that the same code must run on every node seems very limiting We ll see in a bit that this is not at all the case



Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Message Passing Basics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Message Passing Basics and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?