SlideShare a Scribd company logo
1 of 17
Agenda Background Multiprocessing Programming Preference Programming Model Parallel Section Clauses Synchronization
Background Parallel has no semantic impact Concurrency has a substantial semantic impact
Background Symmetric Multi Processor(SMP) Shared  Memory  Multiprocessing Programming OpenMP Massively Parallel Processor(MPP) Message Passing Interface Programming MPI
Background
Multiprocessing Programming
Multiprocessing Programming General Threading Model Main thread executes the program’s main function Main thread creates subthreads, witch execute other functions in the program. Subthreads can also create additional threads.
Multiprocessing Programming Benefits Increased performance and better resource utilization Even on single processor systems – for hiding latency and increasing throughput IPC thread shared memory is more efficient Risk Increases complexity of the application Difficult to debug (data races, deadlocks, etc.)
OpenMP Preference (later  VS2005)
OpenMP Preference (later  GCC 4.2)
Programming Model Generate multi-thread code by referencing directive code  Compiler is required to support openMP To eliminate synchronization and dependency
Programming Model
Parallel Section (for) #pragmaomp for [clause [clause …] ]  {     for loop }
Parallel Section (sections) #pragmaomp sections [clause [clause …] ] {     [#progmaomp section]         structured code block }
Clauses private(var1, …)  to block sharing selected values with threads shared(var1, …) to share selected values with threads  schedule(type [, chunk_size]) to divide work with threads for equality static dynamic
Synchronization (critical section) Declaring critical section in parallel section Running only single thread at moment #pragmaomp critical [(name)] {     structured code block }
https://computing.llnl.gov/tutorials/openMP/

More Related Content

Viewers also liked (9)

MPI Introduction
MPI IntroductionMPI Introduction
MPI Introduction
 
Intro to OpenMP
Intro to OpenMPIntro to OpenMP
Intro to OpenMP
 
Cuda Architecture
Cuda ArchitectureCuda Architecture
Cuda Architecture
 
Cuda
CudaCuda
Cuda
 
Chapter 6 pc
Chapter 6 pcChapter 6 pc
Chapter 6 pc
 
Message passing interface
Message passing interfaceMessage passing interface
Message passing interface
 
The Message Passing Interface (MPI) in Layman's Terms
The Message Passing Interface (MPI) in Layman's TermsThe Message Passing Interface (MPI) in Layman's Terms
The Message Passing Interface (MPI) in Layman's Terms
 
What is [Open] MPI?
What is [Open] MPI?What is [Open] MPI?
What is [Open] MPI?
 
Introduction to MPI
Introduction to MPI Introduction to MPI
Introduction to MPI
 

Similar to Open MP

Parallel Programming Primer
Parallel Programming PrimerParallel Programming Primer
Parallel Programming Primer
Sri Prasanna
 
Parallel Programming Primer 1
Parallel Programming Primer 1Parallel Programming Primer 1
Parallel Programming Primer 1
mobius.cn
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
CherryBerry2
 
Parallel Programing Model
Parallel Programing ModelParallel Programing Model
Parallel Programing Model
Adlin Jeena
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
Ruymán Reyes
 

Similar to Open MP (20)

Unit5
Unit5Unit5
Unit5
 
Aq4301224227
Aq4301224227Aq4301224227
Aq4301224227
 
Parallelization using open mp
Parallelization using open mpParallelization using open mp
Parallelization using open mp
 
Threads
ThreadsThreads
Threads
 
parallel programming models
 parallel programming models parallel programming models
parallel programming models
 
Parallel Programming Primer
Parallel Programming PrimerParallel Programming Primer
Parallel Programming Primer
 
Concurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core ProcessorsConcurrent Matrix Multiplication on Multi-core Processors
Concurrent Matrix Multiplication on Multi-core Processors
 
Parallel Programming Primer 1
Parallel Programming Primer 1Parallel Programming Primer 1
Parallel Programming Primer 1
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming Models
 
Java multi thread programming on cmp system
Java multi thread programming on cmp systemJava multi thread programming on cmp system
Java multi thread programming on cmp system
 
Concurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System DiscussionConcurrent Programming OpenMP @ Distributed System Discussion
Concurrent Programming OpenMP @ Distributed System Discussion
 
Parallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMPParallelization of Coupled Cluster Code with OpenMP
Parallelization of Coupled Cluster Code with OpenMP
 
openmp final2.pptx
openmp final2.pptxopenmp final2.pptx
openmp final2.pptx
 
Petapath HP Cast 12 - Programming for High Performance Accelerated Systems
Petapath HP Cast 12 - Programming for High Performance Accelerated SystemsPetapath HP Cast 12 - Programming for High Performance Accelerated Systems
Petapath HP Cast 12 - Programming for High Performance Accelerated Systems
 
Parallel Programing Model
Parallel Programing ModelParallel Programing Model
Parallel Programing Model
 
parallel language and compiler
parallel language and compilerparallel language and compiler
parallel language and compiler
 
Directive-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous ComputingDirective-based approach to Heterogeneous Computing
Directive-based approach to Heterogeneous Computing
 
Parallel programming model, language and compiler in ACA.
Parallel programming model, language and compiler in ACA.Parallel programming model, language and compiler in ACA.
Parallel programming model, language and compiler in ACA.
 
Hybrid Model Based Testing Tool Architecture for Exascale Computing System
Hybrid Model Based Testing Tool Architecture for Exascale Computing SystemHybrid Model Based Testing Tool Architecture for Exascale Computing System
Hybrid Model Based Testing Tool Architecture for Exascale Computing System
 
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
GTC16 - S6410 - Comparing OpenACC 2.5 and OpenMP 4.5
 

More from Woonhyuk Baek

3d tracking : chapter4 natural features, model-based tracking
3d tracking : chapter4 natural features, model-based tracking3d tracking : chapter4 natural features, model-based tracking
3d tracking : chapter4 natural features, model-based tracking
Woonhyuk Baek
 
3d tracking : chapter3 fiducial-based tracking
3d tracking : chapter3 fiducial-based tracking3d tracking : chapter3 fiducial-based tracking
3d tracking : chapter3 fiducial-based tracking
Woonhyuk Baek
 
3d tracking : chapter2-2 kalman filter
3d tracking : chapter2-2 kalman filter3d tracking : chapter2-2 kalman filter
3d tracking : chapter2-2 kalman filter
Woonhyuk Baek
 
3 d tracking_-_chapter3_fiducial-based_tracking
3 d tracking_-_chapter3_fiducial-based_tracking3 d tracking_-_chapter3_fiducial-based_tracking
3 d tracking_-_chapter3_fiducial-based_tracking
Woonhyuk Baek
 
3d tracking : chapter2-1 mathematical tools
3d tracking : chapter2-1 mathematical tools3d tracking : chapter2-1 mathematical tools
3d tracking : chapter2-1 mathematical tools
Woonhyuk Baek
 
open source & license
open source & licenseopen source & license
open source & license
Woonhyuk Baek
 

More from Woonhyuk Baek (6)

3d tracking : chapter4 natural features, model-based tracking
3d tracking : chapter4 natural features, model-based tracking3d tracking : chapter4 natural features, model-based tracking
3d tracking : chapter4 natural features, model-based tracking
 
3d tracking : chapter3 fiducial-based tracking
3d tracking : chapter3 fiducial-based tracking3d tracking : chapter3 fiducial-based tracking
3d tracking : chapter3 fiducial-based tracking
 
3d tracking : chapter2-2 kalman filter
3d tracking : chapter2-2 kalman filter3d tracking : chapter2-2 kalman filter
3d tracking : chapter2-2 kalman filter
 
3 d tracking_-_chapter3_fiducial-based_tracking
3 d tracking_-_chapter3_fiducial-based_tracking3 d tracking_-_chapter3_fiducial-based_tracking
3 d tracking_-_chapter3_fiducial-based_tracking
 
3d tracking : chapter2-1 mathematical tools
3d tracking : chapter2-1 mathematical tools3d tracking : chapter2-1 mathematical tools
3d tracking : chapter2-1 mathematical tools
 
open source & license
open source & licenseopen source & license
open source & license
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Open MP