What we are here for Beyond MPI 1 X All the stuff extra stuff in the MPI 2 Spec and a few things in the MPI 1 Spec you have not thought about yet Dr Graham E Fagg CS 594 Spring 2003 G E Fagg UTK CS594 Spring2003 And why Language issues Process Management Establishing Communication G E Fagg UTK CS594 Spring2003 How profiling works G E Fagg UTK CS594 Spring2003 Using profiling libraries such as JUMPSHOT Building a library yourself How do collectives work Using communicators for distributed computing A lot of things that were hard to agree on for a standard Anything that might not run well on a early 90s late 80s MPP Remember who made the standard G E Fagg UTK CS594 Spring2003 4 What MPI 1 Missed out MPI 1 the other things Single sided Communication Intercommunicator Collective Operations I O including Parallel IO PIO 3 Overview 2 MPI 2 what it included MPI 2 what it included G E Fagg UTK CS594 Spring2003 Overview MPI 1 what it missed out Some of this is a warm up for the MetaComputing GRID classes coming up later 1 Overview MPI 2 is it really out there Do you trust your implementation 5 NEC IBM SGI Intel HP G E Fagg UTK CS594 Spring2003 6 1 MPI 1 internals Communicators Basics of MPI 1 All characteristics of message passing are contained within communicators Communicators contain Process lists or groups Connection communication structures topologies System derived message tags envelopes to separate messages from each other All processes in an MPI 1 application belong to a global communicator called MPI COMM WORLD All other communicators are derived from this global communicator Communication can only occur within a communicator G E Fagg UTK CS594 Spring2003 7 MPI 1 Internals Processes Derived Communicator G E Fagg UTK CS594 Spring2003 If a process fails all communicators it belongs to become invalid I e No fault tolerance Dynamic resources either cause applications to fail due to loss of nodes or make applications inefficient as they cannot take advantage of new nodes by starting spawning additional processes When using a dedicated MPP MPI implementation you cannot usually use off machine or even offpartion nodes 10 Multi language operation is not supported MPI specifies both ANSI C and F77 binding No agreed standard for data type conversions between languages even upon the same architecture Communicators cannot be passed between different language modules due to their representation G E Fagg UTK CS594 Spring2003 8 Disadvantages of MPI 1 Static process model MPI COMM WORLD 9 Disadvantages of MPI 1 G E Fagg UTK CS594 Spring2003 MPI 1 Application All process groups are derived from the membership of the MPI COMM WORLD communicator i e no external processes MPI 1 process membership is static not dynamic like PVM or LAM 6 X simplified consistency reasoning fast communication fixed addressing even across complex topologies interfaces well to simple run time systems as found on many MPPs G E Fagg UTK CS594 Spring2003 Safe communication 11 In F77 a communicator is an INTEGER In C it is usually a pointer to a structure non standard methods exist in different implementations G E Fagg UTK CS594 Spring2003 12 2 MPI 2 MPI 2 Language Issues Problem areas and needed additional features identified in MPI 1 are being addressed by the MPI 2 forum These include inter language operation dynamic process control management parallel IO extended collective operations Support for inter implementation communication control is not being considered See the MetaComputing lectures for more G E Fagg UTK CS594 Spring2003 Fortran to C C C C to Fortran What is a communicator in C What is a communicator in Fortran Does it depend on the implementation How could I write a program in both C and Fortran and have them pass communicators G E Fagg UTK CS594 Spring2003 14 All wrappers of the form MPI C CLASS MPI CLASS f2c MPI Fint handle All handles in fortran are integers INT 4 Why do you think not C to C C to C Not supported C Wrappers convert Fortran handles MPI 2 Language Issues MPI 2 Handle conversion Think back to MPI 1 13 MPI 2 Language Issues Overloading C operators called on the C side Not supported Want to write a new C compiler G E Fagg UTK CS594 Spring2003 15 MPI 2 Language Issues 16 MPI 2 Language Issues FORTRAN PROCEDURE SUBROUTINE MPI SEND ONEINT COMM I IERR INTEGER COMM I IERR CALL C ROUTINE COMM I IERR RETURN END G E Fagg UTK CS594 Spring2003 G E Fagg UTK CS594 Spring2003 void c routine MPI Fint fh MPI Fint i MPI Fint ierr MPI Comm fcom mycom MPI Comm f2c fh MPI Send i 1 MPI INT 1 1 mycom 17 G E Fagg UTK CS594 Spring2003 18 3 MPI 2 Language Issues MPI 2 Language Issues Added a C binding Constants and names the same as C except when they have been made into an object or special class C binding C has types C does not such as Uses a namespace called MPI that contains all object types such as G E Fagg UTK CS594 Spring2003 19 MPI 2 Process Management Class comm class Cartcomm class Datatype G E Fagg UTK CS594 Spring2003 20 MPI 2 Process Management In MPI 1 You get a set of process after you call MPI Init You keep them until you call MPI Finalize Or you halt G E Fagg UTK CS594 Spring2003 21 MPI 2 Process Management MPI COMPLEX MPI BOOL etc G E Fagg UTK CS594 Spring2003 22 MPI 2 Process Management How would we handle a node failure G E Fagg UTK CS594 Spring2003 How do you add more nodes to an already running MPI 1 application 23 How could we couple two or more applications G E Fagg UTK CS594 Spring2003 24 4 MPI 2 Process Management MPI 2 Process Management How could we couple two or more applications MPI 2 provides both a Spawn or remote start call Running using two or more different MPI implementations such as one on an IBM SP and the other on a SGI Cray G E Fagg UTK CS594 Spring2003 25 MPI 2 Process Management Depending on the implementation you have LAM 6 X does MPICH 1 3 1 does not Different vendor versions do Such as NEC SUN G E Fagg UTK CS594 Spring2003 26 MPI 2 Process Management Two flavors MPI Comm spawn Starts new processes from a single binary and returns an intercommunicator to them MPI Comm spawn multiple Starts new processes from more than one binary G E Fagg UTK CS594 Spring2003 27 MPI 2 Process Management G E Fagg UTK CS594 Spring2003 28 MPI 2 Process Management MPI Comm spawn other G E Fagg UTK CS594 Spring2003 29 G E Fagg UTK CS594 Spring2003 30 5 MPI 2 Process Management MPI 2 Process Management MPI Init Intercommunicator G E Fagg UTK CS594 Spring2003 31 MPI 2 Process Management G E Fagg UTK
View Full Document
Unlocking...