SlideShare a Scribd company logo
MPI - MESSAGE PASSING INTERFACE
An approach for parallel algorithms
COMPUTER SCIENCE DEPARTMENT
PROF. AKHTAR RASOOL
UNDERTHE GUIDANCE OF
TABLE OF CONTENT
Parallel Merge Sort using MPI
Introduction
Background
MPI
Code implementation
Result
About Us
Goal and Vision
Target
Programming language
Cluster
MPI library
Dataset
What is MPI
Data type and syntax
Communication Mode
Features
Merge sort implementation
Flow of code
Process flow
Single processor
Multiprocessor
Summery
About Us
Our Team
Nishaant Sharma
131112226
Kartik
131112265
Mohit Raghuvanshi
131112232
Prabhash Prakash
131112241
“Analysis of RunningTime complexity of Sorting
Algorithm (Merge Sort) on parallel processing
environment (preferably on a cluster with various
processors) and single node Using MPI”
Goal 05
Installation Implementation Result
Install mpich2 on Ubantu Implement merge sort algorithm
parallel
Change in time when we increse
in the number of processor
VISION
Write your relevant text here
06
Background
Programming language
Base of project
 good knowledge of “C” for implementing code
C for implementing the algorithm
 Python for generating the data set
Faker library in python
11
Background
Cluster
Master and Slave Node
 Master Node
 Slave Node
11
Background
MPI
Message passing interface
 MPI is a proposed standard message-passing
interface. It is a library Specification, not a language.
The programs that users can write in Fortran 77 andC
are compiled with Ordinary compilers and linked with
the MPI library.
11
Dataset
Python Script
For generating dataset
We use faker module for generating the dataset of census.
Some basic api of faker
 fake.name() for generating fake name
fake.email() for generating fake email
fake.ean(length=13) for unique id of 13 digit
fake.job() for creating fake job
Many other api
11
Dataset
Python Script
For generating dataset
Dataset attribute
Id
Name
Phone Number
Salary
Email
11
Dataset preview
12
What is MPI
MPI
Message Passing Interface
A message-passing library specifications:
Extended message-passing model
Not a language or compiler specification
Not a specific implementation or product
For parallel computers, clusters, and heterogeneous networks.
Designed to permit the development of parallel software libraries.
Designed to provide access to advanced parallel hardware for
End users
Library writers
Tool developers
13
Communication Modes
Based on the type of send:
Synchronous: Completes once the
acknowledgement is received by the sender.
Buffered send: completes immediately, unless if an
error occurs.
Standard send: completes once the message has
been sent, which may or may not imply that the
message has arrived at its destination.
Ready send: completes immediately, if the receiver
is ready for the message it will get it, otherwise the
message is dropped silently.
DataTypes
The following data types are supported by MPI:
Predefined data types that are corresponding to
data types from the programming language.
Arrays.
Sub blocks of a matrix
User defined data structure.
A set of predefined data types
API of MPI
#include “mpi.h” provides basic MPI definitions and types.
MPI_Init starts MPI
MPI_Finalize exits MPI
Note that all non-MPI routines are local; thus “printf” run on each
process
MPI_INIT
Initializing MPI
The initialization routine MPI_INIT is the first MPI routine
called.
MPI_INIT is called once.
int MPI_INIT( int *argc, char **argv );
MPI_Finalize
After a program has finished using the MPI library, it must call
MPI_Finalize in order to clean up all MPI state. Once this routine
is called, no MPI routine may be called.
MPI_finalize is genrally last command in the program.
MPI_finalize()
MPI_Comm_rank
It updates the rank of processes in the variable
world_rank. Determines the rank of the calling process in the
communicator
int MPI_Comm_rank(MPI_COMM_WORLD,
&wordld_rank);
MPI_Comm_size
Determines the size of the group associated with a
communicator.
int MPI_Comm_size(MPI_COMM comm, int
*size);
MPI_Scatter
Sends data from one process to all other processes in a
communicator.
. int MPI_Scatter(const void *sendbuf, int
sendcount, MPI_Datatype sendtype,void
*recvbuf, int recvcount, MPI_Datatype
recvtype, int root, MPI_Comm comm);
MPI_Scatter
MPI_Gather
MPI_Gather is opposite of MPI_Scatter, it gather all the data from
other processes to single (Master) process.
. int MPI_Gather(const void *sendbuf,
intsendcount, MPI_Datatype sendtype, void
*recvbuf, int recvcount, MPI_Datatype
recvtype, int root, MPI_Comm comm)
MPI_Gather
MPI_Bcast
Broadcasts a message from the process with rank "root" to all
other processes of the communicator.
int MPI_Bcast( void *buffer, int count,
MPI_Datatype datatype, int root, MPI_Comm
comm )
MPI_Bcast
Parallel Merge Sort Algorithm
Result
No. of Process Time elapsed in reading
input file(ms)
Time elapsed to sort
the data(ms)
Time in writing
output file(ms)
1 3982.326 8528.112 5839.587
2 4050.897 6878.000 5401.234
4 8145.740 12073.895 11083.125
5 10178.689 14361.952 13087.155
Conclusion
In this project we focused on using MPI as a
message passing interface implementation on
LINUX platform. The effect of parallel processes
number and also the number of cores on the
performance of parallel merge sort algorithms has
been theoretically and experimentally studied.
ThankYou
Ad

More Related Content

What's hot (20)

Open mp
Open mpOpen mp
Open mp
Gopi Saiteja
 
Message passing interface
Message passing interfaceMessage passing interface
Message passing interface
Md. Mahedi Mahfuj
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
Neel Patel
 
Introduction to OpenMP
Introduction to OpenMPIntroduction to OpenMP
Introduction to OpenMP
Akhila Prabhakaran
 
Interprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.SInterprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.S
Hussain Ala'a Alkabi
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection Network
Heman Pathak
 
Parallel processing
Parallel processingParallel processing
Parallel processing
rajshreemuthiah
 
Multiprocessor Architecture (Advanced computer architecture)
Multiprocessor Architecture  (Advanced computer architecture)Multiprocessor Architecture  (Advanced computer architecture)
Multiprocessor Architecture (Advanced computer architecture)
vani261
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
Ali Ahmad
 
system interconnect architectures in ACA
system interconnect architectures in ACAsystem interconnect architectures in ACA
system interconnect architectures in ACA
Pankaj Kumar Jain
 
MPI
MPIMPI
MPI
Rohit Banga
 
Message Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communicationMessage Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communication
Himanshi Kathuria
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
Alagappa Govt Arts College, Karaikudi
 
Multithreading
MultithreadingMultithreading
Multithreading
Dr. A. B. Shinde
 
IPC
IPCIPC
IPC
Mohit Joshi
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
Kuppusamy P
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
Vajira Thambawita
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
Ritu Ranjan Shrivastwa
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 
High–Performance Computing
High–Performance ComputingHigh–Performance Computing
High–Performance Computing
BRAC University Computer Club
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
Neel Patel
 
Interprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.SInterprocess communication (IPC) IN O.S
Interprocess communication (IPC) IN O.S
Hussain Ala'a Alkabi
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection Network
Heman Pathak
 
Multiprocessor Architecture (Advanced computer architecture)
Multiprocessor Architecture  (Advanced computer architecture)Multiprocessor Architecture  (Advanced computer architecture)
Multiprocessor Architecture (Advanced computer architecture)
vani261
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
Ali Ahmad
 
system interconnect architectures in ACA
system interconnect architectures in ACAsystem interconnect architectures in ACA
system interconnect architectures in ACA
Pankaj Kumar Jain
 
Message Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communicationMessage Passing Interface (MPI)-A means of machine communication
Message Passing Interface (MPI)-A means of machine communication
Himanshi Kathuria
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
Kuppusamy P
 
Lecture 1 introduction to parallel and distributed computing
Lecture 1   introduction to parallel and distributed computingLecture 1   introduction to parallel and distributed computing
Lecture 1 introduction to parallel and distributed computing
Vajira Thambawita
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
Ritu Ranjan Shrivastwa
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 

Similar to MPI message passing interface (20)

High Performance Computing using MPI
High Performance Computing using MPIHigh Performance Computing using MPI
High Performance Computing using MPI
Ankit Mahato
 
My ppt hpc u4
My ppt hpc u4My ppt hpc u4
My ppt hpc u4
Vidyalankar Institute of Technology
 
cs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdfcs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdf
ssuserada6a9
 
Mpi.net running wizard
Mpi.net running wizardMpi.net running wizard
Mpi.net running wizard
Ahmed Imair
 
Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10
AbdullahMunir32
 
Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2
Marcirio Chaves
 
More mpi4py
More mpi4pyMore mpi4py
More mpi4py
A Jorge Garcia
 
25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx
GopalPatidar13
 
Rgk cluster computing project
Rgk cluster computing projectRgk cluster computing project
Rgk cluster computing project
OstopD
 
Intro to MPI
Intro to MPIIntro to MPI
Intro to MPI
jbp4444
 
Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
Akhila Prabhakaran
 
Mpi.net tutorial
Mpi.net tutorialMpi.net tutorial
Mpi.net tutorial
pablodutrarodrigues
 
Parallel programming using MPI
Parallel programming using MPIParallel programming using MPI
Parallel programming using MPI
Ajit Nayak
 
iTop VPN Latest Version 2025 Crack Free Download
iTop VPN Latest Version 2025 Crack Free DownloadiTop VPN Latest Version 2025 Crack Free Download
iTop VPN Latest Version 2025 Crack Free Download
lr74xqnvuf
 
VSO ConvertXto HD Free CRACKS Download .
VSO ConvertXto HD Free CRACKS Download .VSO ConvertXto HD Free CRACKS Download .
VSO ConvertXto HD Free CRACKS Download .
dshut956
 
Download Letasoft Sound Booster Crack Free Full Activated
Download Letasoft Sound Booster Crack Free Full ActivatedDownload Letasoft Sound Booster Crack Free Full Activated
Download Letasoft Sound Booster Crack Free Full Activated
jennieloksh
 
Wondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows FreeWondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows Free
abbaskanju3
 
Wondershare Filmora Crack Free Download
Wondershare Filmora  Crack Free DownloadWondershare Filmora  Crack Free Download
Wondershare Filmora Crack Free Download
zqeevcqb3t
 
Minitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free DownloadMinitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free Download
v3r2eptd2q
 
Nickelodeon All Star Brawl 2 v1.13 Free Download
Nickelodeon All Star Brawl 2 v1.13 Free DownloadNickelodeon All Star Brawl 2 v1.13 Free Download
Nickelodeon All Star Brawl 2 v1.13 Free Download
michaelsatle759
 
High Performance Computing using MPI
High Performance Computing using MPIHigh Performance Computing using MPI
High Performance Computing using MPI
Ankit Mahato
 
cs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdfcs556-2nd-tutorial.pdf
cs556-2nd-tutorial.pdf
ssuserada6a9
 
Mpi.net running wizard
Mpi.net running wizardMpi.net running wizard
Mpi.net running wizard
Ahmed Imair
 
Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10Parallel and Distributed Computing Chapter 10
Parallel and Distributed Computing Chapter 10
AbdullahMunir32
 
Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2Tutorial on Parallel Computing and Message Passing Model - C2
Tutorial on Parallel Computing and Message Passing Model - C2
Marcirio Chaves
 
Rgk cluster computing project
Rgk cluster computing projectRgk cluster computing project
Rgk cluster computing project
OstopD
 
Intro to MPI
Intro to MPIIntro to MPI
Intro to MPI
jbp4444
 
Parallel programming using MPI
Parallel programming using MPIParallel programming using MPI
Parallel programming using MPI
Ajit Nayak
 
iTop VPN Latest Version 2025 Crack Free Download
iTop VPN Latest Version 2025 Crack Free DownloadiTop VPN Latest Version 2025 Crack Free Download
iTop VPN Latest Version 2025 Crack Free Download
lr74xqnvuf
 
VSO ConvertXto HD Free CRACKS Download .
VSO ConvertXto HD Free CRACKS Download .VSO ConvertXto HD Free CRACKS Download .
VSO ConvertXto HD Free CRACKS Download .
dshut956
 
Download Letasoft Sound Booster Crack Free Full Activated
Download Letasoft Sound Booster Crack Free Full ActivatedDownload Letasoft Sound Booster Crack Free Full Activated
Download Letasoft Sound Booster Crack Free Full Activated
jennieloksh
 
Wondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows FreeWondershare Filmora Crack 2025 For Windows Free
Wondershare Filmora Crack 2025 For Windows Free
abbaskanju3
 
Wondershare Filmora Crack Free Download
Wondershare Filmora  Crack Free DownloadWondershare Filmora  Crack Free Download
Wondershare Filmora Crack Free Download
zqeevcqb3t
 
Minitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free DownloadMinitool Partition Wizard Crack Free Download
Minitool Partition Wizard Crack Free Download
v3r2eptd2q
 
Nickelodeon All Star Brawl 2 v1.13 Free Download
Nickelodeon All Star Brawl 2 v1.13 Free DownloadNickelodeon All Star Brawl 2 v1.13 Free Download
Nickelodeon All Star Brawl 2 v1.13 Free Download
michaelsatle759
 
Ad

Recently uploaded (20)

Download MathType Crack Version 2025???
Download MathType Crack  Version 2025???Download MathType Crack  Version 2025???
Download MathType Crack Version 2025???
Google
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
The Elixir Developer - All Things Open
The Elixir Developer - All Things OpenThe Elixir Developer - All Things Open
The Elixir Developer - All Things Open
Carlo Gilmar Padilla Santana
 
Download 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-ActivatedDownload 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-Activated
Web Designer
 
Medical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk ScoringMedical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk Scoring
ICS
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business StageA Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
SynapseIndia
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint PresentationFrom Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
Shay Ginsbourg
 
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdfTop Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
evrigsolution
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by AjathMobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Ajath Infotech Technologies LLC
 
Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.pptPassive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
IES VE
 
Programs as Values - Write code and don't get lost
Programs as Values - Write code and don't get lostPrograms as Values - Write code and don't get lost
Programs as Values - Write code and don't get lost
Pierangelo Cecchetto
 
Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509
Fermin Galan
 
Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025
GrapesTech Solutions
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
Download MathType Crack Version 2025???
Download MathType Crack  Version 2025???Download MathType Crack  Version 2025???
Download MathType Crack Version 2025???
Google
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Download 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-ActivatedDownload 4k Video Downloader Crack Pre-Activated
Download 4k Video Downloader Crack Pre-Activated
Web Designer
 
Medical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk ScoringMedical Device Cybersecurity Threat & Risk Scoring
Medical Device Cybersecurity Threat & Risk Scoring
ICS
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
How I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetryHow I solved production issues with OpenTelemetry
How I solved production issues with OpenTelemetry
Cees Bos
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business StageA Comprehensive Guide to CRM Software Benefits for Every Business Stage
A Comprehensive Guide to CRM Software Benefits for Every Business Stage
SynapseIndia
 
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-RuntimeReinventing Microservices Efficiency and Innovation with Single-Runtime
Reinventing Microservices Efficiency and Innovation with Single-Runtime
Natan Silnitsky
 
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint PresentationFrom Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
Shay Ginsbourg
 
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdfTop Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
Top Magento Hyvä Theme Features That Make It Ideal for E-commerce.pdf
evrigsolution
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by AjathMobile Application Developer Dubai | Custom App Solutions by Ajath
Mobile Application Developer Dubai | Custom App Solutions by Ajath
Ajath Infotech Technologies LLC
 
Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.pptPassive House Canada Conference 2025 Presentation [Final]_v4.ppt
Passive House Canada Conference 2025 Presentation [Final]_v4.ppt
IES VE
 
Programs as Values - Write code and don't get lost
Programs as Values - Write code and don't get lostPrograms as Values - Write code and don't get lost
Programs as Values - Write code and don't get lost
Pierangelo Cecchetto
 
Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509Orion Context Broker introduction 20250509
Orion Context Broker introduction 20250509
Fermin Galan
 
Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025Top 12 Most Useful AngularJS Development Tools to Use in 2025
Top 12 Most Useful AngularJS Development Tools to Use in 2025
GrapesTech Solutions
 
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb ClarkDeploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Deploying & Testing Agentforce - End-to-end with Copado - Ewenb Clark
Peter Caitens
 
Ad

MPI message passing interface

  • 1. MPI - MESSAGE PASSING INTERFACE An approach for parallel algorithms COMPUTER SCIENCE DEPARTMENT PROF. AKHTAR RASOOL UNDERTHE GUIDANCE OF
  • 2. TABLE OF CONTENT Parallel Merge Sort using MPI Introduction Background MPI Code implementation Result About Us Goal and Vision Target Programming language Cluster MPI library Dataset What is MPI Data type and syntax Communication Mode Features Merge sort implementation Flow of code Process flow Single processor Multiprocessor Summery
  • 4. Our Team Nishaant Sharma 131112226 Kartik 131112265 Mohit Raghuvanshi 131112232 Prabhash Prakash 131112241
  • 5. “Analysis of RunningTime complexity of Sorting Algorithm (Merge Sort) on parallel processing environment (preferably on a cluster with various processors) and single node Using MPI” Goal 05
  • 6. Installation Implementation Result Install mpich2 on Ubantu Implement merge sort algorithm parallel Change in time when we increse in the number of processor VISION Write your relevant text here 06
  • 7. Background Programming language Base of project  good knowledge of “C” for implementing code C for implementing the algorithm  Python for generating the data set Faker library in python 11
  • 8. Background Cluster Master and Slave Node  Master Node  Slave Node 11
  • 9. Background MPI Message passing interface  MPI is a proposed standard message-passing interface. It is a library Specification, not a language. The programs that users can write in Fortran 77 andC are compiled with Ordinary compilers and linked with the MPI library. 11
  • 10. Dataset Python Script For generating dataset We use faker module for generating the dataset of census. Some basic api of faker  fake.name() for generating fake name fake.email() for generating fake email fake.ean(length=13) for unique id of 13 digit fake.job() for creating fake job Many other api 11
  • 11. Dataset Python Script For generating dataset Dataset attribute Id Name Phone Number Salary Email 11
  • 13. What is MPI MPI Message Passing Interface A message-passing library specifications: Extended message-passing model Not a language or compiler specification Not a specific implementation or product For parallel computers, clusters, and heterogeneous networks. Designed to permit the development of parallel software libraries. Designed to provide access to advanced parallel hardware for End users Library writers Tool developers 13
  • 14. Communication Modes Based on the type of send: Synchronous: Completes once the acknowledgement is received by the sender. Buffered send: completes immediately, unless if an error occurs. Standard send: completes once the message has been sent, which may or may not imply that the message has arrived at its destination. Ready send: completes immediately, if the receiver is ready for the message it will get it, otherwise the message is dropped silently.
  • 15. DataTypes The following data types are supported by MPI: Predefined data types that are corresponding to data types from the programming language. Arrays. Sub blocks of a matrix User defined data structure. A set of predefined data types
  • 16. API of MPI #include “mpi.h” provides basic MPI definitions and types. MPI_Init starts MPI MPI_Finalize exits MPI Note that all non-MPI routines are local; thus “printf” run on each process
  • 17. MPI_INIT Initializing MPI The initialization routine MPI_INIT is the first MPI routine called. MPI_INIT is called once. int MPI_INIT( int *argc, char **argv );
  • 18. MPI_Finalize After a program has finished using the MPI library, it must call MPI_Finalize in order to clean up all MPI state. Once this routine is called, no MPI routine may be called. MPI_finalize is genrally last command in the program. MPI_finalize()
  • 19. MPI_Comm_rank It updates the rank of processes in the variable world_rank. Determines the rank of the calling process in the communicator int MPI_Comm_rank(MPI_COMM_WORLD, &wordld_rank);
  • 20. MPI_Comm_size Determines the size of the group associated with a communicator. int MPI_Comm_size(MPI_COMM comm, int *size);
  • 21. MPI_Scatter Sends data from one process to all other processes in a communicator. . int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype,void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm);
  • 23. MPI_Gather MPI_Gather is opposite of MPI_Scatter, it gather all the data from other processes to single (Master) process. . int MPI_Gather(const void *sendbuf, intsendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
  • 25. MPI_Bcast Broadcasts a message from the process with rank "root" to all other processes of the communicator. int MPI_Bcast( void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm )
  • 27. Parallel Merge Sort Algorithm
  • 28. Result No. of Process Time elapsed in reading input file(ms) Time elapsed to sort the data(ms) Time in writing output file(ms) 1 3982.326 8528.112 5839.587 2 4050.897 6878.000 5401.234 4 8145.740 12073.895 11083.125 5 10178.689 14361.952 13087.155
  • 29. Conclusion In this project we focused on using MPI as a message passing interface implementation on LINUX platform. The effect of parallel processes number and also the number of cores on the performance of parallel merge sort algorithms has been theoretically and experimentally studied.
  翻译: