SlideShare a Scribd company logo
1 of 101
Open MPI KYOSS presentation 12 Jan, 2011 Jeff Squyres
What is the Message Passing Interface (MPI)? The Book of MPI A standards document www.mpi-forum.org
Using MPI Hardware and software implement the interface in the MPI standard (book)
MPI implementations There are many implementations of the MPI standard Some are closed source Others are open source
Open MPI Open MPI is a free, open source implementation of the MPI standard www.open-mpi.org
So what is MPI for? Let’s break it down… Message Passing Interface
1. Message passing Process A Process B Message
1. Message passing Process A Process B Pass it
1. Message passing Process A Process B Message has been passed
1. Message passing Process Thread A Thread B …as opposed to data that is shared
2. Interface Fortran too! C programming function calls MPI_Wait(req, status) MPI_Init(argv, argc) MPI_Recv(buf, count, type, src, tag, comm, status) MPI_Send(buf, count, type, dest, tag, comm) MPI_Comm_dup(in, out) MPI_Test(req, flag, status) MPI_Finalize(void) MPI_Type_size(dtype, size)
Fortran?  Really? What most modern developers associate with “Fortran”
Yes, really Some of today’s most advanced simulation codes are written in Fortran
Yes, really Yes, that Intel Optimized for Nehalem, Westmere, and beyond!
Fortran is great for what it is A simple language for mathematical expressions and computations Targeted at scientists and engineers …not computer scientists or web developers or database developers or …
Back to defining “MPI”…
Putting it back together Message Passing Interface “An interface for passing messages” “C functions for passing messages” Fortran too!
C/Fortran functions for message passing Process A Process B MPI_Send(…)
C/Fortran functions for message passing Process A Process B MPI_Recv(…)
Really?  Is that all MPI is? “Can’t I just do that with sockets?” Yes! (…and no)
Comparison (TCP) Sockets Connections based on IP addresses and ports Point-to-point communication Stream-oriented Raw data (bytes / octets) Network-independent “Slow” MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast
Comparison MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast Whoa! What are these?
Peer integer “rank” MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
Peer integer “rank” MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: broadcast MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: broadcast MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: scatter MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: scatter MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: gather MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: gather MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: reduce MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 4 6 5 3 4 5 5 6 3 6 7 8 3 2 4 9 10 11 2 4 4
“Collective”: reduce MPI 42 Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
“Collective”: …and others MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
Messages, not bytes MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast Entire message is sent and received Not a stream of individual bytes
Messages, not bytes MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast Contents: 17 integers 23 doubles 98 structs …or whatever Not a bunch of bytes!
Network independent MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast MPI_Send(…) MPI_Recv(…) Underlying network Ethernet Myrinet InfiniBand Shared memory TCP iWARP RoCE
Network independent MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast MPI_Send(…) MPI_Recv(…) Underlying network Ethernet Myrinet Regardless of underlying network or transport protocol, the application code stays the same InfiniBand Shared memory TCP iWARP RoCE
Blazing fast MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast One microsecond (!) …more on performance later
What is MPI? MPI is probably somewhere around here
What is MPI? MPI is hides all the layers underneath
What is MPI? A high-level network  programming abstraction IP addresses byte streams raw bytes
What is MPI? A high-level network  programming abstraction Nothing to see here Please move along IP addresses byte streams raw bytes
So what? What’s all this message passing stuff got to do with supercomputers?
So what? Let’s define “supercomputers”
Supercomputers
Supercomputers “Nebulae” National Supercomputing Centre, Shenzen, China
Supercomputers “Mare Nostrum” (Our Sea) Barcelona Supercomputer Center, Spain Used to be a church
Supercomputers Notice anything?
Supercomputers They’re just racks of servers!
Generally speaking… Supercomputer = Lots of processors Lots of RAM Lots of disk + +
Generally speaking… Supercomputer = (Many) Racks of (commodity) high-end servers (this is one definition; there are others)
So if that’s a supercomputer… Rack of 36 1U servers
How is it different from my web farm? Rack of 36 1U servers
Just a bunch of servers? The difference between supercomputers and web farms and database farms (and …) All the servers act together to solve a single computational problem
Acting together Take your computational problem… Input Output Computational problem
Acting together …and split it up! Input Output Computational problem
Acting together Distribute the input data across a bunch of servers Input Output Computational problem
Acting together Use the network between servers to communicate / coordinate Input Output
Acting together Use the network between servers to communicate / coordinate Input Output
Acting together MPI is used for this communication Input Output
Why go to so much trouble? One processor hour Computational problem 1 processor = …a long time…
Why go to so much trouble? One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour Computational problem One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour 21 processors = ~1 hour (!) Disclaimer: scaling is rarely perfect
High Performance Computing HPC = Using supercomputers to solve real world problems that are  TOO BIG for laptops, desktops,  or individuals servers
Why does HPC      MPI?  Network abstraction Are these cores?
Why does HPC      MPI?  Network abstraction …or servers?
Why does HPC      MPI?  Message semantics Array of 10,000 integers
Why does HPC      MPI?  Message semantics Array of 10,000 integers
Why does HPC      MPI?  Ultra-low network latency (depending on your network type!) 1 micro second
1 microsecond = 0.000001 second From here To here
1 microsecond = 0.000001 second From here To here
Holy smokes! That’s fast
Let’s get into some details…
MPI Basics “6 function MPI” MPI_Init(): startup MPI_Comm_size(): how many peers? MPI_Comm_rank(): my unique (ordered) ID MPI_Send(): send a message MPI_Recv(): receive a message MPI_Finalize(): shutdown Can implement a huge number of parallel applications with just these 6 functions
Let’s see “Hello, World” in MPI
MPI Hello, World #include <stdio.h> #include <mpi.h> intmain(intargc, char **argv) { int rank, size; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); printf("Hello, world!  I am %d of %d", rank, size); MPI_Finalize();     return 0; } Initialize MPI Who am I? Num. peers? Shut down MPI
Compile it with Open MPI shell$ mpicchello.c -o hello shell$ Open MPI comes standard in many Linux and BSD distributions (and OS X) Hey – what’s that?  Where’s gcc?
“Wrapper” compiler mpicc simply fills in a bunch of  compiler command line options for you shell$ mpicchello.c -o hello –showme gcchello.c -o hello -I/opt/openmpi/include -pthread -L/open/openmpi/lib -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl shell$
Now let’s run it shell$ mpirun –np 4 hello Hey – what’s that?  Why don’t I just run “./hello”?
mpirun launcher mpirun launches N copies of your program and “wires them up” shell$ mpirun –np 4 hello “-np” = “number of processes” This command launches  a 4 process parallel job
mpirun launcher shell$ mpirun –np 4 hello hello hello Four copies of “hello” are launched Then they are “wired up” on the network hello hello
Now let’s run it shell$ mpirun –np 4 hello Hello, world!  I am 0 of 4 Hello, world!  I am 1 of 4 Hello, world!  I am 2 of 4 Hello, world!  I am 3 of 4 shell$  By default, all copies run on the local host
Run on multiple servers! shell$ cat my_hostfile host1.example.com host2.example.com host3.example.com host4.example.com shell$
Run on multiple servers! shell$ cat my_hostfile host1.example.com host2.example.com host3.example.com host4.example.com shell$ mpirun–hostfilemy_hostfile–np 4 hello Hello, world!  I am 0 of 4 Hello, world!  I am 1 of 4 Hello, world!  I am 2 of 4 Hello, world!  I am 3 of 4 shell$   Ran on host1  Ran on host2  Ran on host3  Ran on host4
Run it again shell$ mpirun –hostfilemy_hostfile –np 4 hello Hello, world!  I am 2 of 4 Hello, world!  I am 3 of 4 Hello, world!  I am 0 of 4 Hello, world!  I am 1 of 4 shell$  2 3 0 1 Hey – why are the numbers out of order?
Standard output re-routing shell$ mpirun–hostfilemy_hostfile –np 4 hello Hello, world! I am 0 of 4 Hello, world! I am 1 of 4 hello 0 hello 1 mpirun Each “hello” program’s standard output is intercepted and sent across the network to mpirun hello 3 hello 2 Hello, world! I am 2 of 4 Hello, world! I am 3 of 4
Standard output re-routing shell$ mpirun–hostfilemy_hostfile –np 4 hello hello 0 hello 1 mpirun But the exact ordering of received printf’s is non-deterministic hello 3 hello 2 Hello, world! I am 2 of 4 Hello, world! I am 3 of 4 Hello, world! I am 0 of 4 Hello, world! I am 1 of 4
Printf debugging = Bad If you can’t rely on output ordering, printf debugging is pretty lousy (!)
Parallel debuggers Fortunately, there are parallel debuggers and other tools Parallel debugger Attaches to all processes in the MPI job hello 0 hello 1 mpirun hello 3 hello 2
Now let’s send a simple MPI message
Send a simple message int rank; double buffer[SIZE]; MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (0 == rank) {     /* …initialize buffer[]… */ MPI_Send(buffer, SIZE, MPI_DOUBLE, 1, 123,                  MPI_COMM_WORLD); } else if (1 == rank) { MPI_Recv(buffer, SIZE, MPI_DOUBLE, 0, 123,                  MPI_COMM_WORLD, MPI_STATUS_IGNORE); } If I’m number 0, send the  buffer[] array to number 1 If I’m number 1, receive the buffer[] array from number 0
That’s enough MPI for now…
Open MPI PACX-MPI LAM/MPI Project founded in 2003 after intense discussions between multiple  open source MPI implementations  LA-MPI FT-MPI Sun CT 6
Open_MPI_Init() shell$ svn log –r 1 https://svn.open-mpi.org/svn/ompi ------------------------------------------------------------------------ r1 | jsquyres | 2003-11-22 11:36:58 -0500 (Sat, 22 Nov 2003) | 2 lines Firstcommit ------------------------------------------------------------------------ shell$
Open_MPI_Current_status() shell$ svn log –r HEAD https://svn.open-mpi.org/svn/ompi ------------------------------------------------------------------------ r24226 | rhc | 2011-01-11 20:57:47 -0500 (Tue, 11 Jan 2011) | 25 lines Fixes #2683: Move ORTE DPM compiler warning squash to v1.4 ------------------------------------------------------------------------ shell$
Open MPI 2011 Membership 15 members, 11 contributors, 2 partners
Fun stats ohloh.net says: 517,400 lines of code 30 developers (over time) “Well-commented source code” I rank in top-25 ohloh stats for: C Automake Shell script Fortran (ouch!)
Open MPI has grown It’s amazing (to me) that the Open MPI project works so well New features, new releases,  new members Long live Open MPI!
Recap Defined Message Passing Interface (MPI) Defined “supercomputers” Defined High Performance Computing (HPC) Showed what MPI is Showed some trivial MPI codes Discussed Open MPI
Additional Resources MPI Forum web site The only site for the official MPI standards http://www.mpi-forum.org/ NCSA MPI basic and intermediate tutorials Requires a free account http://ci-tutor.ncsa.uiuc.edu/login.php “MPI Mechanic” magazine columns http://cw.squyres.com/
Additional Resources Research, Computing, and Engineering (RCE) podcast http://www.rce-cast.com/ My blog: MPI_BCAST http://blogs.cisco.com/category/performance/
Questions?

More Related Content

What's hot

VTU 6th Sem Elective CSE - Module 3 cloud computing
VTU 6th Sem Elective CSE - Module 3 cloud computingVTU 6th Sem Elective CSE - Module 3 cloud computing
VTU 6th Sem Elective CSE - Module 3 cloud computingSachin Gowda
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersDhanashree Prasad
 
Process management os concept
Process management os conceptProcess management os concept
Process management os conceptpriyadeosarkar91
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)Prakhar Maurya
 
Introduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingIntroduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingSayed Chhattan Shah
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented CommunicationDilum Bandara
 
program flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architectureprogram flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architecturePankaj Kumar Jain
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platformsSyed Zaid Irshad
 
IPC (Inter-Process Communication) with Shared Memory
IPC (Inter-Process Communication) with Shared MemoryIPC (Inter-Process Communication) with Shared Memory
IPC (Inter-Process Communication) with Shared MemoryHEM DUTT
 
Heterogeneous computing
Heterogeneous computingHeterogeneous computing
Heterogeneous computingRashid Ansari
 
Inter process communication
Inter process communicationInter process communication
Inter process communicationRJ Mehul Gadhiya
 
Parallel Processors (SIMD)
Parallel Processors (SIMD) Parallel Processors (SIMD)
Parallel Processors (SIMD) Ali Raza
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionSHIKHA GAUTAM
 

What's hot (20)

VTU 6th Sem Elective CSE - Module 3 cloud computing
VTU 6th Sem Elective CSE - Module 3 cloud computingVTU 6th Sem Elective CSE - Module 3 cloud computing
VTU 6th Sem Elective CSE - Module 3 cloud computing
 
Aca2 01 new
Aca2 01 newAca2 01 new
Aca2 01 new
 
Introduction to OpenMP
Introduction to OpenMPIntroduction to OpenMP
Introduction to OpenMP
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for Beginners
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Introduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed ComputingIntroduction to Parallel and Distributed Computing
Introduction to Parallel and Distributed Computing
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
program flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architectureprogram flow mechanisms, advanced computer architecture
program flow mechanisms, advanced computer architecture
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platformsDichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
 
Segmentation in operating systems
Segmentation in operating systemsSegmentation in operating systems
Segmentation in operating systems
 
MPI Tutorial
MPI TutorialMPI Tutorial
MPI Tutorial
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
IPC (Inter-Process Communication) with Shared Memory
IPC (Inter-Process Communication) with Shared MemoryIPC (Inter-Process Communication) with Shared Memory
IPC (Inter-Process Communication) with Shared Memory
 
Heterogeneous computing
Heterogeneous computingHeterogeneous computing
Heterogeneous computing
 
Inter process communication
Inter process communicationInter process communication
Inter process communication
 
11. dfs
11. dfs11. dfs
11. dfs
 
Parallel Processors (SIMD)
Parallel Processors (SIMD) Parallel Processors (SIMD)
Parallel Processors (SIMD)
 
Distributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock DetectionDistributed Mutual Exclusion and Distributed Deadlock Detection
Distributed Mutual Exclusion and Distributed Deadlock Detection
 

Viewers also liked (20)

Introduction to MPI
Introduction to MPI Introduction to MPI
Introduction to MPI
 
Message passing interface
Message passing interfaceMessage passing interface
Message passing interface
 
MPI Introduction
MPI IntroductionMPI Introduction
MPI Introduction
 
MPI Presentation
MPI PresentationMPI Presentation
MPI Presentation
 
Server Side Technologies in Mobile Development
Server Side Technologies in Mobile DevelopmentServer Side Technologies in Mobile Development
Server Side Technologies in Mobile Development
 
message passing interface
message passing interfacemessage passing interface
message passing interface
 
Mpi
Mpi Mpi
Mpi
 
What is [Open] MPI?
What is [Open] MPI?What is [Open] MPI?
What is [Open] MPI?
 
Intro to MPI
Intro to MPIIntro to MPI
Intro to MPI
 
MPI History
MPI HistoryMPI History
MPI History
 
It 4-yr-1-sem-digital image processing
It 4-yr-1-sem-digital image processingIt 4-yr-1-sem-digital image processing
It 4-yr-1-sem-digital image processing
 
Digital image processing unit 1
Digital image processing unit 1Digital image processing unit 1
Digital image processing unit 1
 
Dip Unit Test-I
Dip Unit Test-IDip Unit Test-I
Dip Unit Test-I
 
Mpi.net tutorial
Mpi.net tutorialMpi.net tutorial
Mpi.net tutorial
 
OGSA
OGSAOGSA
OGSA
 
Globus ppt
Globus pptGlobus ppt
Globus ppt
 
MPI
MPIMPI
MPI
 
Beowulf cluster
Beowulf clusterBeowulf cluster
Beowulf cluster
 
Tutorial on Parallel Computing and Message Passing Model - C3
Tutorial on Parallel Computing and Message Passing Model - C3Tutorial on Parallel Computing and Message Passing Model - C3
Tutorial on Parallel Computing and Message Passing Model - C3
 
Using MPI
Using MPIUsing MPI
Using MPI
 

Similar to The Message Passing Interface (MPI) in Layman's Terms

High Performance Computing using MPI
High Performance Computing using MPIHigh Performance Computing using MPI
High Performance Computing using MPIAnkit Mahato
 
Funambol C++ API
Funambol C++ APIFunambol C++ API
Funambol C++ APIFunambol
 
Pulsar summit asia 2021 apache pulsar with mqtt for edge computing
Pulsar summit asia 2021   apache pulsar with mqtt for edge computingPulsar summit asia 2021   apache pulsar with mqtt for edge computing
Pulsar summit asia 2021 apache pulsar with mqtt for edge computingTimothy Spann
 
Parallel programming using MPI
Parallel programming using MPIParallel programming using MPI
Parallel programming using MPIAjit Nayak
 
Big mountain data and dev conference apache pulsar with mqtt for edge compu...
Big mountain data and dev conference   apache pulsar with mqtt for edge compu...Big mountain data and dev conference   apache pulsar with mqtt for edge compu...
Big mountain data and dev conference apache pulsar with mqtt for edge compu...Timothy Spann
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsTim Burks
 
UCX-Python - A Flexible Communication Library for Python Applications
UCX-Python - A Flexible Communication Library for Python ApplicationsUCX-Python - A Flexible Communication Library for Python Applications
UCX-Python - A Flexible Communication Library for Python ApplicationsMatthew Rocklin
 
cs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdfcs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdfssuserada6a9
 
Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?Davide Carboni
 
Network Flow Analysis
Network Flow AnalysisNetwork Flow Analysis
Network Flow Analysisguest23ccda3
 
Network Flow Analysis
Network Flow AnalysisNetwork Flow Analysis
Network Flow Analysisguest23ccda3
 
Networking
NetworkingNetworking
NetworkingSNancy
 
Codeless pipelines with pulsar and flink
Codeless pipelines with pulsar and flinkCodeless pipelines with pulsar and flink
Codeless pipelines with pulsar and flinkTimothy Spann
 
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022Timothy Spann
 
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021StreamNative
 

Similar to The Message Passing Interface (MPI) in Layman's Terms (20)

High Performance Computing using MPI
High Performance Computing using MPIHigh Performance Computing using MPI
High Performance Computing using MPI
 
More mpi4py
More mpi4pyMore mpi4py
More mpi4py
 
25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx
 
Funambol C++ API
Funambol C++ APIFunambol C++ API
Funambol C++ API
 
Pulsar summit asia 2021 apache pulsar with mqtt for edge computing
Pulsar summit asia 2021   apache pulsar with mqtt for edge computingPulsar summit asia 2021   apache pulsar with mqtt for edge computing
Pulsar summit asia 2021 apache pulsar with mqtt for edge computing
 
Parallel programming using MPI
Parallel programming using MPIParallel programming using MPI
Parallel programming using MPI
 
Big mountain data and dev conference apache pulsar with mqtt for edge compu...
Big mountain data and dev conference   apache pulsar with mqtt for edge compu...Big mountain data and dev conference   apache pulsar with mqtt for edge compu...
Big mountain data and dev conference apache pulsar with mqtt for edge compu...
 
CocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIsCocoaConf: The Language of Mobile Software is APIs
CocoaConf: The Language of Mobile Software is APIs
 
UCX-Python - A Flexible Communication Library for Python Applications
UCX-Python - A Flexible Communication Library for Python ApplicationsUCX-Python - A Flexible Communication Library for Python Applications
UCX-Python - A Flexible Communication Library for Python Applications
 
cs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdfcs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdf
 
Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?Pysense: wireless sensor computing in Python?
Pysense: wireless sensor computing in Python?
 
mpi4py.pdf
mpi4py.pdfmpi4py.pdf
mpi4py.pdf
 
Multicore
MulticoreMulticore
Multicore
 
Network Flow Analysis
Network Flow AnalysisNetwork Flow Analysis
Network Flow Analysis
 
Network Flow Analysis
Network Flow AnalysisNetwork Flow Analysis
Network Flow Analysis
 
Networking
NetworkingNetworking
Networking
 
MPI - 1
MPI - 1MPI - 1
MPI - 1
 
Codeless pipelines with pulsar and flink
Codeless pipelines with pulsar and flinkCodeless pipelines with pulsar and flink
Codeless pipelines with pulsar and flink
 
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022Data minutes #2   Apache Pulsar with MQTT for Edge Computing Lightning - 2022
Data minutes #2 Apache Pulsar with MQTT for Edge Computing Lightning - 2022
 
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
 

More from Jeff Squyres

Open MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOFOpen MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOFJeff Squyres
 
MPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI ForumMPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI ForumJeff Squyres
 
MPI Fourm SC'15 BOF
MPI Fourm SC'15 BOFMPI Fourm SC'15 BOF
MPI Fourm SC'15 BOFJeff Squyres
 
Open MPI SC'15 State of the Union BOF
Open MPI SC'15 State of the Union BOFOpen MPI SC'15 State of the Union BOF
Open MPI SC'15 State of the Union BOFJeff Squyres
 
Cisco's journey from Verbs to Libfabric
Cisco's journey from Verbs to LibfabricCisco's journey from Verbs to Libfabric
Cisco's journey from Verbs to LibfabricJeff Squyres
 
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZEJeff Squyres
 
Fun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-byFun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-byJeff Squyres
 
Open MPI new version number scheme and roadmap
Open MPI new version number scheme and roadmapOpen MPI new version number scheme and roadmap
Open MPI new version number scheme and roadmapJeff Squyres
 
The State of libfabric in Open MPI
The State of libfabric in Open MPIThe State of libfabric in Open MPI
The State of libfabric in Open MPIJeff Squyres
 
Cisco usNIC libfabric provider
Cisco usNIC libfabric providerCisco usNIC libfabric provider
Cisco usNIC libfabric providerJeff Squyres
 
2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedback2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedbackJeff Squyres
 
(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and Everything(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and EverythingJeff Squyres
 
Cisco usNIC: how it works, how it is used in Open MPI
Cisco usNIC: how it works, how it is used in Open MPICisco usNIC: how it works, how it is used in Open MPI
Cisco usNIC: how it works, how it is used in Open MPIJeff Squyres
 
Cisco EuroMPI'13 vendor session presentation
Cisco EuroMPI'13 vendor session presentationCisco EuroMPI'13 vendor session presentation
Cisco EuroMPI'13 vendor session presentationJeff Squyres
 
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)Jeff Squyres
 
MOSSCon 2013, Cisco Open Source talk
MOSSCon 2013, Cisco Open Source talkMOSSCon 2013, Cisco Open Source talk
MOSSCon 2013, Cisco Open Source talkJeff Squyres
 
Ethernet and TCP optimizations
Ethernet and TCP optimizationsEthernet and TCP optimizations
Ethernet and TCP optimizationsJeff Squyres
 
Friends don't let friends leak MPI_Requests
Friends don't let friends leak MPI_RequestsFriends don't let friends leak MPI_Requests
Friends don't let friends leak MPI_RequestsJeff Squyres
 
MPI-3 Timer requests proposal
MPI-3 Timer requests proposalMPI-3 Timer requests proposal
MPI-3 Timer requests proposalJeff Squyres
 
MPI_Mprobe is good for you
MPI_Mprobe is good for youMPI_Mprobe is good for you
MPI_Mprobe is good for youJeff Squyres
 

More from Jeff Squyres (20)

Open MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOFOpen MPI State of the Union X SC'16 BOF
Open MPI State of the Union X SC'16 BOF
 
MPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI ForumMPI Sessions: a proposal to the MPI Forum
MPI Sessions: a proposal to the MPI Forum
 
MPI Fourm SC'15 BOF
MPI Fourm SC'15 BOFMPI Fourm SC'15 BOF
MPI Fourm SC'15 BOF
 
Open MPI SC'15 State of the Union BOF
Open MPI SC'15 State of the Union BOFOpen MPI SC'15 State of the Union BOF
Open MPI SC'15 State of the Union BOF
 
Cisco's journey from Verbs to Libfabric
Cisco's journey from Verbs to LibfabricCisco's journey from Verbs to Libfabric
Cisco's journey from Verbs to Libfabric
 
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
(Very) Loose proposal to revamp MPI_INIT and MPI_FINALIZE
 
Fun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-byFun with Github webhooks: verifying Signed-off-by
Fun with Github webhooks: verifying Signed-off-by
 
Open MPI new version number scheme and roadmap
Open MPI new version number scheme and roadmapOpen MPI new version number scheme and roadmap
Open MPI new version number scheme and roadmap
 
The State of libfabric in Open MPI
The State of libfabric in Open MPIThe State of libfabric in Open MPI
The State of libfabric in Open MPI
 
Cisco usNIC libfabric provider
Cisco usNIC libfabric providerCisco usNIC libfabric provider
Cisco usNIC libfabric provider
 
2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedback2014 01-21-mpi-community-feedback
2014 01-21-mpi-community-feedback
 
(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and Everything(Open) MPI, Parallel Computing, Life, the Universe, and Everything
(Open) MPI, Parallel Computing, Life, the Universe, and Everything
 
Cisco usNIC: how it works, how it is used in Open MPI
Cisco usNIC: how it works, how it is used in Open MPICisco usNIC: how it works, how it is used in Open MPI
Cisco usNIC: how it works, how it is used in Open MPI
 
Cisco EuroMPI'13 vendor session presentation
Cisco EuroMPI'13 vendor session presentationCisco EuroMPI'13 vendor session presentation
Cisco EuroMPI'13 vendor session presentation
 
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)
Open MPI Explorations in Process Affinity (EuroMPI'13 presentation)
 
MOSSCon 2013, Cisco Open Source talk
MOSSCon 2013, Cisco Open Source talkMOSSCon 2013, Cisco Open Source talk
MOSSCon 2013, Cisco Open Source talk
 
Ethernet and TCP optimizations
Ethernet and TCP optimizationsEthernet and TCP optimizations
Ethernet and TCP optimizations
 
Friends don't let friends leak MPI_Requests
Friends don't let friends leak MPI_RequestsFriends don't let friends leak MPI_Requests
Friends don't let friends leak MPI_Requests
 
MPI-3 Timer requests proposal
MPI-3 Timer requests proposalMPI-3 Timer requests proposal
MPI-3 Timer requests proposal
 
MPI_Mprobe is good for you
MPI_Mprobe is good for youMPI_Mprobe is good for you
MPI_Mprobe is good for you
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

The Message Passing Interface (MPI) in Layman's Terms

  • 1. Open MPI KYOSS presentation 12 Jan, 2011 Jeff Squyres
  • 2. What is the Message Passing Interface (MPI)? The Book of MPI A standards document www.mpi-forum.org
  • 3. Using MPI Hardware and software implement the interface in the MPI standard (book)
  • 4. MPI implementations There are many implementations of the MPI standard Some are closed source Others are open source
  • 5. Open MPI Open MPI is a free, open source implementation of the MPI standard www.open-mpi.org
  • 6. So what is MPI for? Let’s break it down… Message Passing Interface
  • 7. 1. Message passing Process A Process B Message
  • 8. 1. Message passing Process A Process B Pass it
  • 9. 1. Message passing Process A Process B Message has been passed
  • 10. 1. Message passing Process Thread A Thread B …as opposed to data that is shared
  • 11. 2. Interface Fortran too! C programming function calls MPI_Wait(req, status) MPI_Init(argv, argc) MPI_Recv(buf, count, type, src, tag, comm, status) MPI_Send(buf, count, type, dest, tag, comm) MPI_Comm_dup(in, out) MPI_Test(req, flag, status) MPI_Finalize(void) MPI_Type_size(dtype, size)
  • 12. Fortran? Really? What most modern developers associate with “Fortran”
  • 13. Yes, really Some of today’s most advanced simulation codes are written in Fortran
  • 14. Yes, really Yes, that Intel Optimized for Nehalem, Westmere, and beyond!
  • 15. Fortran is great for what it is A simple language for mathematical expressions and computations Targeted at scientists and engineers …not computer scientists or web developers or database developers or …
  • 16. Back to defining “MPI”…
  • 17. Putting it back together Message Passing Interface “An interface for passing messages” “C functions for passing messages” Fortran too!
  • 18. C/Fortran functions for message passing Process A Process B MPI_Send(…)
  • 19. C/Fortran functions for message passing Process A Process B MPI_Recv(…)
  • 20. Really? Is that all MPI is? “Can’t I just do that with sockets?” Yes! (…and no)
  • 21. Comparison (TCP) Sockets Connections based on IP addresses and ports Point-to-point communication Stream-oriented Raw data (bytes / octets) Network-independent “Slow” MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast
  • 22. Comparison MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast Whoa! What are these?
  • 23. Peer integer “rank” MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 24. Peer integer “rank” MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 25. “Collective”: broadcast MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 26. “Collective”: broadcast MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 27. “Collective”: scatter MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 28. “Collective”: scatter MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 29. “Collective”: gather MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 30. “Collective”: gather MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 31. “Collective”: reduce MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 4 6 5 3 4 5 5 6 3 6 7 8 3 2 4 9 10 11 2 4 4
  • 32. “Collective”: reduce MPI 42 Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 33. “Collective”: …and others MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast 0 1 2 3 4 5 6 7 8 9 10 11
  • 34. Messages, not bytes MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast Entire message is sent and received Not a stream of individual bytes
  • 35. Messages, not bytes MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast Contents: 17 integers 23 doubles 98 structs …or whatever Not a bunch of bytes!
  • 36. Network independent MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast MPI_Send(…) MPI_Recv(…) Underlying network Ethernet Myrinet InfiniBand Shared memory TCP iWARP RoCE
  • 37. Network independent MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast MPI_Send(…) MPI_Recv(…) Underlying network Ethernet Myrinet Regardless of underlying network or transport protocol, the application code stays the same InfiniBand Shared memory TCP iWARP RoCE
  • 38. Blazing fast MPI Based on peer integer “rank” (e.g., 8) Point-to-point and collective and one-sided and … Message oriented Typed messages Network independent Blazing fast One microsecond (!) …more on performance later
  • 39. What is MPI? MPI is probably somewhere around here
  • 40. What is MPI? MPI is hides all the layers underneath
  • 41. What is MPI? A high-level network programming abstraction IP addresses byte streams raw bytes
  • 42. What is MPI? A high-level network programming abstraction Nothing to see here Please move along IP addresses byte streams raw bytes
  • 43. So what? What’s all this message passing stuff got to do with supercomputers?
  • 44. So what? Let’s define “supercomputers”
  • 46. Supercomputers “Nebulae” National Supercomputing Centre, Shenzen, China
  • 47. Supercomputers “Mare Nostrum” (Our Sea) Barcelona Supercomputer Center, Spain Used to be a church
  • 49. Supercomputers They’re just racks of servers!
  • 50. Generally speaking… Supercomputer = Lots of processors Lots of RAM Lots of disk + +
  • 51. Generally speaking… Supercomputer = (Many) Racks of (commodity) high-end servers (this is one definition; there are others)
  • 52. So if that’s a supercomputer… Rack of 36 1U servers
  • 53. How is it different from my web farm? Rack of 36 1U servers
  • 54. Just a bunch of servers? The difference between supercomputers and web farms and database farms (and …) All the servers act together to solve a single computational problem
  • 55. Acting together Take your computational problem… Input Output Computational problem
  • 56. Acting together …and split it up! Input Output Computational problem
  • 57. Acting together Distribute the input data across a bunch of servers Input Output Computational problem
  • 58. Acting together Use the network between servers to communicate / coordinate Input Output
  • 59. Acting together Use the network between servers to communicate / coordinate Input Output
  • 60. Acting together MPI is used for this communication Input Output
  • 61. Why go to so much trouble? One processor hour Computational problem 1 processor = …a long time…
  • 62. Why go to so much trouble? One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour Computational problem One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour One processor hour 21 processors = ~1 hour (!) Disclaimer: scaling is rarely perfect
  • 63. High Performance Computing HPC = Using supercomputers to solve real world problems that are TOO BIG for laptops, desktops, or individuals servers
  • 64. Why does HPC MPI? Network abstraction Are these cores?
  • 65. Why does HPC MPI? Network abstraction …or servers?
  • 66. Why does HPC MPI? Message semantics Array of 10,000 integers
  • 67. Why does HPC MPI? Message semantics Array of 10,000 integers
  • 68. Why does HPC MPI? Ultra-low network latency (depending on your network type!) 1 micro second
  • 69. 1 microsecond = 0.000001 second From here To here
  • 70. 1 microsecond = 0.000001 second From here To here
  • 72. Let’s get into some details…
  • 73. MPI Basics “6 function MPI” MPI_Init(): startup MPI_Comm_size(): how many peers? MPI_Comm_rank(): my unique (ordered) ID MPI_Send(): send a message MPI_Recv(): receive a message MPI_Finalize(): shutdown Can implement a huge number of parallel applications with just these 6 functions
  • 74. Let’s see “Hello, World” in MPI
  • 75. MPI Hello, World #include <stdio.h> #include <mpi.h> intmain(intargc, char **argv) { int rank, size; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); printf("Hello, world! I am %d of %d", rank, size); MPI_Finalize(); return 0; } Initialize MPI Who am I? Num. peers? Shut down MPI
  • 76. Compile it with Open MPI shell$ mpicchello.c -o hello shell$ Open MPI comes standard in many Linux and BSD distributions (and OS X) Hey – what’s that? Where’s gcc?
  • 77. “Wrapper” compiler mpicc simply fills in a bunch of compiler command line options for you shell$ mpicchello.c -o hello –showme gcchello.c -o hello -I/opt/openmpi/include -pthread -L/open/openmpi/lib -lmpi -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl shell$
  • 78. Now let’s run it shell$ mpirun –np 4 hello Hey – what’s that? Why don’t I just run “./hello”?
  • 79. mpirun launcher mpirun launches N copies of your program and “wires them up” shell$ mpirun –np 4 hello “-np” = “number of processes” This command launches a 4 process parallel job
  • 80. mpirun launcher shell$ mpirun –np 4 hello hello hello Four copies of “hello” are launched Then they are “wired up” on the network hello hello
  • 81. Now let’s run it shell$ mpirun –np 4 hello Hello, world! I am 0 of 4 Hello, world! I am 1 of 4 Hello, world! I am 2 of 4 Hello, world! I am 3 of 4 shell$ By default, all copies run on the local host
  • 82. Run on multiple servers! shell$ cat my_hostfile host1.example.com host2.example.com host3.example.com host4.example.com shell$
  • 83. Run on multiple servers! shell$ cat my_hostfile host1.example.com host2.example.com host3.example.com host4.example.com shell$ mpirun–hostfilemy_hostfile–np 4 hello Hello, world! I am 0 of 4 Hello, world! I am 1 of 4 Hello, world! I am 2 of 4 Hello, world! I am 3 of 4 shell$  Ran on host1  Ran on host2  Ran on host3  Ran on host4
  • 84. Run it again shell$ mpirun –hostfilemy_hostfile –np 4 hello Hello, world! I am 2 of 4 Hello, world! I am 3 of 4 Hello, world! I am 0 of 4 Hello, world! I am 1 of 4 shell$ 2 3 0 1 Hey – why are the numbers out of order?
  • 85. Standard output re-routing shell$ mpirun–hostfilemy_hostfile –np 4 hello Hello, world! I am 0 of 4 Hello, world! I am 1 of 4 hello 0 hello 1 mpirun Each “hello” program’s standard output is intercepted and sent across the network to mpirun hello 3 hello 2 Hello, world! I am 2 of 4 Hello, world! I am 3 of 4
  • 86. Standard output re-routing shell$ mpirun–hostfilemy_hostfile –np 4 hello hello 0 hello 1 mpirun But the exact ordering of received printf’s is non-deterministic hello 3 hello 2 Hello, world! I am 2 of 4 Hello, world! I am 3 of 4 Hello, world! I am 0 of 4 Hello, world! I am 1 of 4
  • 87. Printf debugging = Bad If you can’t rely on output ordering, printf debugging is pretty lousy (!)
  • 88. Parallel debuggers Fortunately, there are parallel debuggers and other tools Parallel debugger Attaches to all processes in the MPI job hello 0 hello 1 mpirun hello 3 hello 2
  • 89. Now let’s send a simple MPI message
  • 90. Send a simple message int rank; double buffer[SIZE]; MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (0 == rank) { /* …initialize buffer[]… */ MPI_Send(buffer, SIZE, MPI_DOUBLE, 1, 123, MPI_COMM_WORLD); } else if (1 == rank) { MPI_Recv(buffer, SIZE, MPI_DOUBLE, 0, 123, MPI_COMM_WORLD, MPI_STATUS_IGNORE); } If I’m number 0, send the buffer[] array to number 1 If I’m number 1, receive the buffer[] array from number 0
  • 91. That’s enough MPI for now…
  • 92. Open MPI PACX-MPI LAM/MPI Project founded in 2003 after intense discussions between multiple open source MPI implementations LA-MPI FT-MPI Sun CT 6
  • 93. Open_MPI_Init() shell$ svn log –r 1 https://svn.open-mpi.org/svn/ompi ------------------------------------------------------------------------ r1 | jsquyres | 2003-11-22 11:36:58 -0500 (Sat, 22 Nov 2003) | 2 lines Firstcommit ------------------------------------------------------------------------ shell$
  • 94. Open_MPI_Current_status() shell$ svn log –r HEAD https://svn.open-mpi.org/svn/ompi ------------------------------------------------------------------------ r24226 | rhc | 2011-01-11 20:57:47 -0500 (Tue, 11 Jan 2011) | 25 lines Fixes #2683: Move ORTE DPM compiler warning squash to v1.4 ------------------------------------------------------------------------ shell$
  • 95. Open MPI 2011 Membership 15 members, 11 contributors, 2 partners
  • 96. Fun stats ohloh.net says: 517,400 lines of code 30 developers (over time) “Well-commented source code” I rank in top-25 ohloh stats for: C Automake Shell script Fortran (ouch!)
  • 97. Open MPI has grown It’s amazing (to me) that the Open MPI project works so well New features, new releases, new members Long live Open MPI!
  • 98. Recap Defined Message Passing Interface (MPI) Defined “supercomputers” Defined High Performance Computing (HPC) Showed what MPI is Showed some trivial MPI codes Discussed Open MPI
  • 99. Additional Resources MPI Forum web site The only site for the official MPI standards http://www.mpi-forum.org/ NCSA MPI basic and intermediate tutorials Requires a free account http://ci-tutor.ncsa.uiuc.edu/login.php “MPI Mechanic” magazine columns http://cw.squyres.com/
  • 100. Additional Resources Research, Computing, and Engineering (RCE) podcast http://www.rce-cast.com/ My blog: MPI_BCAST http://blogs.cisco.com/category/performance/