SlideShare a Scribd company logo
1 of 20
SOME BASIC MPI
ROUTINES
With formal datatypes
specified
Preliminaries
int MPI_Init(int *argc, char **argv[])
*argc argument from main()
**argv[] argument from main()
Initialize MPI environment
Terminate MPI execution
environment.
int MPI_Finalize(void)
Parameters: None.
Determine rank of process in
communicator
int MPI_Comm_rank(MPI_Comm comm, int *rank)
Parameters:
comm communicator
*rank rank (returned)
Determine size of group
associated with communicator
int MPI_Comm_size(MPI_Comm comm, int *size)
Parameters:
comm communicator
*size size of group (returned)
Return elapsed time from some
point in past, in seconds
double MPI_Wtime(void)
Parameters: None.
Basic Blocking Point-to-
Point Message Passing
Datatypes
MPI defines various datatypes for
MPI_Datatype, mostly with corresponding C
datatypes, including
MPI_CHAR signed char
MPI_INT signed int
MPI_FLOAT float
Send message (synchronous)
int MPI_Ssend(void *buf, int count,
MPI_Datatype datatype, int dest, int tag,
MPI_Comm comm)
Parameters:
*buf send buffer
count number of entries in buffer
datatype data type of entries
dest destination process rank
tag message tag
comm communicator
Send message (blocking)
int MPI_Send(void *buf, int count, MPI_Datatype
datatype, int dest, int tag, MPI_Comm comm)
Parameters:
*buf send buffer
count number of entries in buffer
datatype data type of entries
dest destination process rank
tag message tag
comm communicator
Receive message (blocking)
int MPI_Recv(void *buf, int count,
MPI_Datatype datatype, int source, int tag,
MPI_Comm comm, MPI_Status *status)
Parameters:
*buf receive buffer (loaded)
count max number of entries in buffer
datatype data type of entries
source source process rank
tag message tag
comm communicator
*status status (returned)
Receive message (blocking)
continued
MPI_ANY_TAG in tag and MPI_ANY_SOURCE in source
matches with anything.
Return status is a structure with at least three members:
status -> MPI_SOURCErank of source of message
status -> MPI_TAG tag of source message
status -> MPI_ERROR potential errors
Basic Group Routines
Barrier: Block process until all
processes have called it
int MPI_Barrier(MPI_Comm comm)
Parameters:
comm communicator
Broadcast message from root process
to all processes in comm and itself.
int MPI_Bcast(void *buf, int count,
MPI_Datatype datatype, int root, MPI_Comm
comm)
Parameters:
*buf message buffer (loaded)
count number of entries in buffer
datatype data type of buffer
root rank of root
Gather values for group of processes
int MPI_Gather(void *sendbuf, int sendcount,
MPI_Datatype sendtype, void *recvbuf, int
recvcount, MPI_Datatype recvtype, int root,
MPI_Comm comm)
Parameters:
*sendbuf send buffer
sendcount number of send buffer elements
sendtype data type of send elements
*recvbuf receive buffer (loaded)
recvcount number of elements each receive
recvtype data type of receive elements
root rank of receiving process
comm communicator
Scatter a buffer from root in parts to
group of processes
int MPI_Scatter(void *sendbuf, int sendcount,
MPI_Datatype sendtype, void *recvbuf, int
recvcount, MPI_Datatype recvtype, int root,
MPI_Comm comm)
Parameters:
*sendbuf send buffer
sendcount number of elements send, each process
sendtype data type of elements
*recvbuf receive buffer (loaded)
recvcount number of recv buffer elements
recvtype type of recv elements
root root process rank
comm communicator
Combine values on all processes to
single value
int MPI_Reduce(void *sendbuf, void *recvbuf, int
count, MPI_Datatype datatype, MPI_Op op, int root,
MPI_Comm comm)
Parameters:
*sendbuf send buffer address
*recvbuf receive buffer address
count number of send buffer elements
datatype data type of send elements
op reduce operation.
Several operations, including
MPI_MAX Maximum
MPI_MIN Minimum
MPI_SUM Sum
MPI_PROD Product
root root process rank for result
comm communicator
Bibliography
• Gropp, W., E. Lusk, and A. Skjellum (1999), Using MPI
Portable Parallel Programming with the Message-Passing
Interface, 2nd ed., MIT Press, Cambridge, Massachusetts.
• Gropp, W., E. Lusk, and R. Thakur (1999), Using MPI-2
Advanced Features of the Message-Passing Interface, MIT
Press, Cambridge, Massachusetts.
• Snir, M., S. W. Otto, S. Huss-Lederman, D. W. Walker, and J.
Dongarra (1998), MPI — The Complete Reference: Volume 1,
The MPI Core, MIT Press, Cambridge, Massachusetts.
• Gropp, W., S. Huss-Lederman, A. Lumsdaine, E. Lusk, B.
Nitzberg, W. Saphir, and M. Snir (1998), MPI — The Complete
Reference: Volume 2, The MPI-2 Extensions, MIT Press,
Cambridge, Massachusetts.

More Related Content

Similar to BASIC_MPI.ppt

Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPIyaman dua
 
I have come code already but I cant quite get the output rig.pdf
I have come code already but I cant quite get the output rig.pdfI have come code already but I cant quite get the output rig.pdf
I have come code already but I cant quite get the output rig.pdfkashishkochhar5
 
Boost.Python: C++ and Python Integration
Boost.Python: C++ and Python IntegrationBoost.Python: C++ and Python Integration
Boost.Python: C++ and Python IntegrationGlobalLogic Ukraine
 
JIT compilation for CPython
JIT compilation for CPythonJIT compilation for CPython
JIT compilation for CPythondelimitry
 
High Performance Computing using MPI
High Performance Computing using MPIHigh Performance Computing using MPI
High Performance Computing using MPIAnkit Mahato
 
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docxeugeniadean34240
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAdam Getchell
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfKosmikTech1
 
Advanced Web Technology ass.pdf
Advanced Web Technology ass.pdfAdvanced Web Technology ass.pdf
Advanced Web Technology ass.pdfsimenehanmut
 
Lisandro dalcin-mpi4py
Lisandro dalcin-mpi4pyLisandro dalcin-mpi4py
Lisandro dalcin-mpi4pyA Jorge Garcia
 
What is Data Types and Functions?
What is Data Types and Functions?What is Data Types and Functions?
What is Data Types and Functions?AnuragSrivastava272
 

Similar to BASIC_MPI.ppt (20)

Introduction to MPI
Introduction to MPIIntroduction to MPI
Introduction to MPI
 
I have come code already but I cant quite get the output rig.pdf
I have come code already but I cant quite get the output rig.pdfI have come code already but I cant quite get the output rig.pdf
I have come code already but I cant quite get the output rig.pdf
 
Boost.Python: C++ and Python Integration
Boost.Python: C++ and Python IntegrationBoost.Python: C++ and Python Integration
Boost.Python: C++ and Python Integration
 
25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx25-MPI-OpenMP.pptx
25-MPI-OpenMP.pptx
 
JIT compilation for CPython
JIT compilation for CPythonJIT compilation for CPython
JIT compilation for CPython
 
MPI Tutorial
MPI TutorialMPI Tutorial
MPI Tutorial
 
High Performance Computing using MPI
High Performance Computing using MPIHigh Performance Computing using MPI
High Performance Computing using MPI
 
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
 
Mpi cheat sheet
Mpi cheat sheetMpi cheat sheet
Mpi cheat sheet
 
My ppt hpc u4
My ppt hpc u4My ppt hpc u4
My ppt hpc u4
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
Brief Introduction to Cython
Brief Introduction to CythonBrief Introduction to Cython
Brief Introduction to Cython
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
 
Advanced+pointers
Advanced+pointersAdvanced+pointers
Advanced+pointers
 
Advanced Web Technology ass.pdf
Advanced Web Technology ass.pdfAdvanced Web Technology ass.pdf
Advanced Web Technology ass.pdf
 
Python
PythonPython
Python
 
Lisandro dalcin-mpi4py
Lisandro dalcin-mpi4pyLisandro dalcin-mpi4py
Lisandro dalcin-mpi4py
 
Lecture10
Lecture10Lecture10
Lecture10
 
What is Data Types and Functions?
What is Data Types and Functions?What is Data Types and Functions?
What is Data Types and Functions?
 
mpi4py.pdf
mpi4py.pdfmpi4py.pdf
mpi4py.pdf
 

More from aminnezarat

Health-medicine-and-Block-chain1402-1-12.pptx
Health-medicine-and-Block-chain1402-1-12.pptxHealth-medicine-and-Block-chain1402-1-12.pptx
Health-medicine-and-Block-chain1402-1-12.pptxaminnezarat
 
ارائه ابزار.pptx
ارائه ابزار.pptxارائه ابزار.pptx
ارائه ابزار.pptxaminnezarat
 
00 - BigData-Chapter_01-PDC.pdf
00 - BigData-Chapter_01-PDC.pdf00 - BigData-Chapter_01-PDC.pdf
00 - BigData-Chapter_01-PDC.pdfaminnezarat
 
Smart Data Strategy EN (1).pdf
Smart Data Strategy EN (1).pdfSmart Data Strategy EN (1).pdf
Smart Data Strategy EN (1).pdfaminnezarat
 
slides8 SharedMemory.ppt
slides8 SharedMemory.pptslides8 SharedMemory.ppt
slides8 SharedMemory.pptaminnezarat
 
06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.ir06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.iraminnezarat
 
05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.ir
05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.ir05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.ir
05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.iraminnezarat
 
04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...
04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...
04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...aminnezarat
 
03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.ir03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.iraminnezarat
 
02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.ir
02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.ir02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.ir
02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.iraminnezarat
 
01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.ir
01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.ir01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.ir
01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.iraminnezarat
 
Machine learning and big-data-in-physics 13970711-Dr. Amin Nezarat
Machine learning and big-data-in-physics 13970711-Dr. Amin NezaratMachine learning and big-data-in-physics 13970711-Dr. Amin Nezarat
Machine learning and big-data-in-physics 13970711-Dr. Amin Nezarataminnezarat
 
Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019
Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019
Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019aminnezarat
 
Camera ready-nash equilibrium-ngct2015-format
Camera ready-nash equilibrium-ngct2015-formatCamera ready-nash equilibrium-ngct2015-format
Camera ready-nash equilibrium-ngct2015-formataminnezarat
 
Data set cloudrank-d-hpca_tutorial
Data set cloudrank-d-hpca_tutorialData set cloudrank-d-hpca_tutorial
Data set cloudrank-d-hpca_tutorialaminnezarat
 

More from aminnezarat (16)

Health-medicine-and-Block-chain1402-1-12.pptx
Health-medicine-and-Block-chain1402-1-12.pptxHealth-medicine-and-Block-chain1402-1-12.pptx
Health-medicine-and-Block-chain1402-1-12.pptx
 
ارائه ابزار.pptx
ارائه ابزار.pptxارائه ابزار.pptx
ارائه ابزار.pptx
 
00 - BigData-Chapter_01-PDC.pdf
00 - BigData-Chapter_01-PDC.pdf00 - BigData-Chapter_01-PDC.pdf
00 - BigData-Chapter_01-PDC.pdf
 
Smart Data Strategy EN (1).pdf
Smart Data Strategy EN (1).pdfSmart Data Strategy EN (1).pdf
Smart Data Strategy EN (1).pdf
 
slides8 SharedMemory.ppt
slides8 SharedMemory.pptslides8 SharedMemory.ppt
slides8 SharedMemory.ppt
 
Chap2 GGKK.ppt
Chap2 GGKK.pptChap2 GGKK.ppt
Chap2 GGKK.ppt
 
06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.ir06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
06 hpc library_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
 
05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.ir
05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.ir05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.ir
05 mpi fundamentals_of_parallelism_and_code_optimization-www.astek.ir
 
04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...
04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...
04 memory traffic_fundamentals_of_parallelism_and_code_optimization-www.astek...
 
03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.ir03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
03 open mp_fundamentals_of_parallelism_and_code_optimization-www.astek.ir
 
02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.ir
02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.ir02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.ir
02 vectorization fundamentals_of_parallelism_and_code_optimization-www.astek.ir
 
01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.ir
01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.ir01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.ir
01 introduction fundamentals_of_parallelism_and_code_optimization-www.astek.ir
 
Machine learning and big-data-in-physics 13970711-Dr. Amin Nezarat
Machine learning and big-data-in-physics 13970711-Dr. Amin NezaratMachine learning and big-data-in-physics 13970711-Dr. Amin Nezarat
Machine learning and big-data-in-physics 13970711-Dr. Amin Nezarat
 
Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019
Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019
Big data HPC Convergence-Dr. Amin-Nezarat-(aminnezarat@gmail.com)-2019
 
Camera ready-nash equilibrium-ngct2015-format
Camera ready-nash equilibrium-ngct2015-formatCamera ready-nash equilibrium-ngct2015-format
Camera ready-nash equilibrium-ngct2015-format
 
Data set cloudrank-d-hpca_tutorial
Data set cloudrank-d-hpca_tutorialData set cloudrank-d-hpca_tutorial
Data set cloudrank-d-hpca_tutorial
 

Recently uploaded

Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiSuhani Kapoor
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 

Recently uploaded (20)

Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
 
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service BhilaiLow Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
Low Rate Call Girls Bhilai Anika 8250192130 Independent Escort Service Bhilai
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 

BASIC_MPI.ppt

  • 1. SOME BASIC MPI ROUTINES With formal datatypes specified
  • 3. int MPI_Init(int *argc, char **argv[]) *argc argument from main() **argv[] argument from main() Initialize MPI environment
  • 4. Terminate MPI execution environment. int MPI_Finalize(void) Parameters: None.
  • 5. Determine rank of process in communicator int MPI_Comm_rank(MPI_Comm comm, int *rank) Parameters: comm communicator *rank rank (returned)
  • 6. Determine size of group associated with communicator int MPI_Comm_size(MPI_Comm comm, int *size) Parameters: comm communicator *size size of group (returned)
  • 7. Return elapsed time from some point in past, in seconds double MPI_Wtime(void) Parameters: None.
  • 9. Datatypes MPI defines various datatypes for MPI_Datatype, mostly with corresponding C datatypes, including MPI_CHAR signed char MPI_INT signed int MPI_FLOAT float
  • 10. Send message (synchronous) int MPI_Ssend(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) Parameters: *buf send buffer count number of entries in buffer datatype data type of entries dest destination process rank tag message tag comm communicator
  • 11. Send message (blocking) int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) Parameters: *buf send buffer count number of entries in buffer datatype data type of entries dest destination process rank tag message tag comm communicator
  • 12. Receive message (blocking) int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) Parameters: *buf receive buffer (loaded) count max number of entries in buffer datatype data type of entries source source process rank tag message tag comm communicator *status status (returned)
  • 13. Receive message (blocking) continued MPI_ANY_TAG in tag and MPI_ANY_SOURCE in source matches with anything. Return status is a structure with at least three members: status -> MPI_SOURCErank of source of message status -> MPI_TAG tag of source message status -> MPI_ERROR potential errors
  • 15. Barrier: Block process until all processes have called it int MPI_Barrier(MPI_Comm comm) Parameters: comm communicator
  • 16. Broadcast message from root process to all processes in comm and itself. int MPI_Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm) Parameters: *buf message buffer (loaded) count number of entries in buffer datatype data type of buffer root rank of root
  • 17. Gather values for group of processes int MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) Parameters: *sendbuf send buffer sendcount number of send buffer elements sendtype data type of send elements *recvbuf receive buffer (loaded) recvcount number of elements each receive recvtype data type of receive elements root rank of receiving process comm communicator
  • 18. Scatter a buffer from root in parts to group of processes int MPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) Parameters: *sendbuf send buffer sendcount number of elements send, each process sendtype data type of elements *recvbuf receive buffer (loaded) recvcount number of recv buffer elements recvtype type of recv elements root root process rank comm communicator
  • 19. Combine values on all processes to single value int MPI_Reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) Parameters: *sendbuf send buffer address *recvbuf receive buffer address count number of send buffer elements datatype data type of send elements op reduce operation. Several operations, including MPI_MAX Maximum MPI_MIN Minimum MPI_SUM Sum MPI_PROD Product root root process rank for result comm communicator
  • 20. Bibliography • Gropp, W., E. Lusk, and A. Skjellum (1999), Using MPI Portable Parallel Programming with the Message-Passing Interface, 2nd ed., MIT Press, Cambridge, Massachusetts. • Gropp, W., E. Lusk, and R. Thakur (1999), Using MPI-2 Advanced Features of the Message-Passing Interface, MIT Press, Cambridge, Massachusetts. • Snir, M., S. W. Otto, S. Huss-Lederman, D. W. Walker, and J. Dongarra (1998), MPI — The Complete Reference: Volume 1, The MPI Core, MIT Press, Cambridge, Massachusetts. • Gropp, W., S. Huss-Lederman, A. Lumsdaine, E. Lusk, B. Nitzberg, W. Saphir, and M. Snir (1998), MPI — The Complete Reference: Volume 2, The MPI-2 Extensions, MIT Press, Cambridge, Massachusetts.