SlideShare a Scribd company logo
Parallel Computing
30.09.2020
Holy Cross College, Puttady Kerala
International Webinar
Dr.A.Bharathi Lakshmi
Head of IT Department, VVVC, VNR
Content
•What
•Why
•Architecture
•Software and Processors
•Parallel Programming
•Research Work
Preliminary
Preliminary
Preliminary
Parallel Computing
Serial Computing
Parallel Computing
Why Parallel Computing
•Save Time
•Memory Usage
•Concurrency
Architecture
Architecture
•Flynn’s Taxonomy
•Feng’s Classification
•Handler Classification
Flynn’s Taxonomy
Flynn’s Taxonomy - SISD
Flynn’s Taxonomy – SIMD
Flynn’s Taxonomy - MISD
Flynn’s Taxonomy - MIMD
Memory Architecture
•Shared Memory
•Uniform Memory Access (UMA)
•Non Uniform Memory Access (NUMA)
•Distributed Memory
•Hybrid Memory
Memory Architecture - UMA
Memory Architecture - NUMA
Memory Architecture
Distributed Memory
Memory Architecture
Hybrid Memory
Type of Parallel Computing
•Data Parallel
•Task Parallel
•Pipeline Parallel
OS & Processor
• Multiprocessing
• Multitasking
• Multithreading
• AMD
• 4 – 32 Cores
• 4 – 64 Threads
• Intel
• 2 – 7 Cores
• Duo – multithreading
• I7 – 8 Cores
Programming Languages
• Apache Hadoop
• Apache Spark
• Apache Flink
• Apache Beam
• CUDA
• OpenCL
• OpenHMPP
• OpenMP for C, C++ and Fortran (Shared Memory)
• Message Passing Interface (MPI) for C, C++ and Fortran (Distributed
Memory)
OpenMP
•Thread Modeling
•Converting Serial to Parallel program is easy
•Unix pThread
•Compiler directives
•Runtime Library
•Environmental Variables
•Fork-Join Model
OpenMP – Fork-Join Model
OpenMP - Directives
• For Parallel work-sharing
• parallel - # pragma omp parallel
• for - #pragma omp [parallel] for [clauses]
• sections - #pragma omp [parallel] sections [clauses]
• single - #pragma omp single [clauses]
• For Master and Synchronization
• master
• critical
• barrier
• atomic
• flush
• Ordered
• #pragma omp directive
OpenMP
•omp.h – Runtime Library
•Environmental Variable
•omp_dynamic
•omp_num_threads
•omp_schedule
•omp_nested
omp_dynamic
•Syntax
omp_dynamic = boolean value
•value – true | false
•True – allow users to adjust number of threads
•False – users can’t adjust number of threads
•Default value - false
omp_num_threads
• Syntax
omp_num_threads = num_list
• Num_list – positive integer values
• Single value
• True & parallel construct without num_threads
• false & parallel construct without num_threads
• Multiple values
• True & parallel construct without num_threads
• false & parallel construct without num_threads
omp_schedule
• Syntax
omp_schedule [= type[,size]]
• Type
• Dynamic
• Guided
• Runtime
• static
• Size
• Iterations
• Integer
• Not valid – Runtime
omp_nested
• Syntax
omp_nested [= true | false]
• True - enabled
• False – disabled
• Default - false
Functions
• omp_set_num_threads(int num_threads)
• int omp_get_num_threads
• int omp_get_max_threads
• int omp_get_thread_num
• int omp_get_num_procs
• void omp_set_dynamic
• int omp_get_dynamic
• void omp_set_nested
• int omp_get_nested
OpenMP - Clauses
• For General attributes
• if - if(expression)
• num_threads – num_threads(num)
• ordered - ordered
• schedule
• nowait - nowait
• For data-sharing attributes
• private – private(var)
• firstprivate – firstprivate(var)
• lastprivate – lastprivate(var)
• shared – shared(var)
• default – default(shared | none)
• reduction – reduction(operator:list)
Paradigm for using OMP
• Write a sequential program
• Identify the portion to be parallelized
•Add directive/pragmas
• In addition to this call runtime library routines and
modify environment variables
• Parallel programming is ready.
• Use OpenMP’s compiler to compile
•Run the program
Matrix Multiplication
•Serial coding
for(int i=0;i<n;i++)
for(int k=0;k<n;k++)
for(int j=0;j<m;j++)
c[i][j]=c[i][j]+a[i][k]*b[k][j];
Matrix Multiplication
• Parallel coding
#include<omp.h>
omp_set_num_threads(4);
#pragma omp parallel for private(i,j,k)
{
for(int i=0;i<n;i++)
for(int k=0;k<n;k++)
for(int j=0;j<m;j++)
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
Sum of an Array
•Serial coding
sum=0;
for(int i=0;i<n;i++)
for(int j=0;j<m;j++)
sum+=a[i][j];
Sum of an Array
• Parallel coding
#include<omp.h>
omp_set_num_threads(4);
#pragma omp parallel for private(i,j) reduction(+:sum)
{
for(int i=0;i<n;i++)
for(int j=0;j<m;j++)
sum+=a[i][j];
}
Image Reconstruction - Pseducode
Image Reconstruction – Time complexity
Time complexity Time complexity Graph
Speedup Graph
10 12 15 20 30
FBP 0.008455 0.007704 0.00781 0.015839 0.021083
SIRT 75.6588 76.6664 91.628 56.3881 176.8353
SART 50.5161 57.6855 56.3243 56.3881 202.067
ART 1609.1 1699.73 1889.8 918.3131 723.983
MLEM 522.894 462.973 750.215 709.861 2134.4
MAPEM 726.522 532.309 727.098 532.317 771.465
2 Core 502.087 332.341 502.65 332.347 463.192
4 Core 398.953 297.146 399.495 297.143 447.483
8 Core 198.488 145.926 199.045 145.934 259.513
Square Naïve Matrix Multiplication
Time complexity
Time complexity Graph
Speedup Graph
0
200
400
600
800
1000
1200
1400
1000 × 1000 2000 × 2000 3000 × 3000 4000 × 4000 5000 × 5000
1 Core 2 Cores 4 Cores 8 Cores
12 Cores 16 Cores 18 cores 20 Cores
0.0000
2.0000
4.0000
6.0000
8.0000
10.0000
12.0000
14.0000
16.0000
18.0000
1000 ×
1000
2000 ×
2000
3000 ×
3000
4000 ×
4000
5000 ×
5000
2 4 8 12
16 18 20
Cores
1000 x
1000
2000 x
2000
3000 x
3000
4000 x
4000
5000 x
5000
1 4.1621 54.4683 233.965 639.153 1282.2257
2 2.1539 25.9129 118.3784 316.9857 641.8125
4 1.0993 17.0027 64.2888 172.9639 329.7763
8 0.5822 8.5168 34.0960 81.1930 163.0.773
12 0.5074 5.8074 22.6845 62.6338 135.0753
16 0.5061 4.7371 19.455 57.1035 126.0156
18 0.4708 4.6368 18.6277 52.2070 120.5529
20 0.4487 0.5695 0.6275 0.5502 0.5177
Hot research
•Nividia
•Data mining – tremendous data
•Lacking in techniques and Computational power
•AI/Machine learning
•Image Processing
•Medical Field
• Image Reconstruction
Parallel Computing--Webminar.ppsx
Parallel Computing--Webminar.ppsx

More Related Content

Similar to Parallel Computing--Webminar.ppsx

Connecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with EmbindConnecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with Embind
Chad Austin
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"
Yulia Tsisyk
 
State of the .Net Performance
State of the .Net PerformanceState of the .Net Performance
State of the .Net Performance
CUSTIS
 
Fedor Polyakov - Optimizing computer vision problems on mobile platforms
Fedor Polyakov - Optimizing computer vision problems on mobile platforms Fedor Polyakov - Optimizing computer vision problems on mobile platforms
Fedor Polyakov - Optimizing computer vision problems on mobile platforms
Eastern European Computer Vision Conference
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
tieleman
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nlbartzon
 
SQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLIT
SQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLITSQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLIT
SQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLIT
chaitalidarode1
 
Building source code level profiler for C++.pdf
Building source code level profiler for C++.pdfBuilding source code level profiler for C++.pdf
Building source code level profiler for C++.pdf
ssuser28de9e
 
Performance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen BorgersPerformance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen Borgers
NLJUG
 
Look Mommy, No GC! (TechDays NL 2017)
Look Mommy, No GC! (TechDays NL 2017)Look Mommy, No GC! (TechDays NL 2017)
Look Mommy, No GC! (TechDays NL 2017)
Dina Goldshtein
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance Tuning
jClarity
 
c++ UNIT II.pptx
c++ UNIT II.pptxc++ UNIT II.pptx
SMS Spam Filter Design Using R: A Machine Learning Approach
SMS Spam Filter Design Using R: A Machine Learning ApproachSMS Spam Filter Design Using R: A Machine Learning Approach
SMS Spam Filter Design Using R: A Machine Learning ApproachReza Rahimi
 
Algorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem SolvingAlgorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem Solving
coolpie
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
Rajendran
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM Metrics
Maaz Anjum
 
Ip mdu-b.tech
Ip mdu-b.techIp mdu-b.tech
Ip mdu-b.tech
BALUJAINSTITUTE
 
Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large Graphs
Nishant Gandhi
 
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldMonitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Brian Troutwine
 

Similar to Parallel Computing--Webminar.ppsx (20)

Connecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with EmbindConnecting C++ and JavaScript on the Web with Embind
Connecting C++ and JavaScript on the Web with Embind
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"
 
State of the .Net Performance
State of the .Net PerformanceState of the .Net Performance
State of the .Net Performance
 
Fedor Polyakov - Optimizing computer vision problems on mobile platforms
Fedor Polyakov - Optimizing computer vision problems on mobile platforms Fedor Polyakov - Optimizing computer vision problems on mobile platforms
Fedor Polyakov - Optimizing computer vision problems on mobile platforms
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
SQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLIT
SQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLITSQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLIT
SQL SCIPY STREAMLIT_Introduction to the basic of SQL SCIPY STREAMLIT
 
Building source code level profiler for C++.pdf
Building source code level profiler for C++.pdfBuilding source code level profiler for C++.pdf
Building source code level profiler for C++.pdf
 
Performance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen BorgersPerformance van Java 8 en verder - Jeroen Borgers
Performance van Java 8 en verder - Jeroen Borgers
 
Look Mommy, No GC! (TechDays NL 2017)
Look Mommy, No GC! (TechDays NL 2017)Look Mommy, No GC! (TechDays NL 2017)
Look Mommy, No GC! (TechDays NL 2017)
 
The Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance TuningThe Diabolical Developers Guide to Performance Tuning
The Diabolical Developers Guide to Performance Tuning
 
c++ UNIT II.pptx
c++ UNIT II.pptxc++ UNIT II.pptx
c++ UNIT II.pptx
 
MATLAB & Image Processing
MATLAB & Image ProcessingMATLAB & Image Processing
MATLAB & Image Processing
 
SMS Spam Filter Design Using R: A Machine Learning Approach
SMS Spam Filter Design Using R: A Machine Learning ApproachSMS Spam Filter Design Using R: A Machine Learning Approach
SMS Spam Filter Design Using R: A Machine Learning Approach
 
Algorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem SolvingAlgorithm and Data Structures - Basic of IT Problem Solving
Algorithm and Data Structures - Basic of IT Problem Solving
 
Basic terminologies & asymptotic notations
Basic terminologies & asymptotic notationsBasic terminologies & asymptotic notations
Basic terminologies & asymptotic notations
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM Metrics
 
Ip mdu-b.tech
Ip mdu-b.techIp mdu-b.tech
Ip mdu-b.tech
 
Processing Large Graphs
Processing Large GraphsProcessing Large Graphs
Processing Large Graphs
 
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard WorldMonitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
 

More from BharathiLakshmiAAssi

VB.net&OOP.pptx
VB.net&OOP.pptxVB.net&OOP.pptx
VB.net&OOP.pptx
BharathiLakshmiAAssi
 
VB.netIDE.pptx
VB.netIDE.pptxVB.netIDE.pptx
VB.netIDE.pptx
BharathiLakshmiAAssi
 
VB.Net-Introduction.ppt
VB.Net-Introduction.pptVB.Net-Introduction.ppt
VB.Net-Introduction.ppt
BharathiLakshmiAAssi
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
BharathiLakshmiAAssi
 
Demand Paging.pptx
Demand Paging.pptxDemand Paging.pptx
Demand Paging.pptx
BharathiLakshmiAAssi
 
Virtual Memory.pptx
Virtual Memory.pptxVirtual Memory.pptx
Virtual Memory.pptx
BharathiLakshmiAAssi
 
Knowing about Computer SS.pptx
Knowing about Computer SS.pptxKnowing about Computer SS.pptx
Knowing about Computer SS.pptx
BharathiLakshmiAAssi
 
MAPEM.ppsx
MAPEM.ppsxMAPEM.ppsx
Iterative Algorithms.ppsx
Iterative Algorithms.ppsxIterative Algorithms.ppsx
Iterative Algorithms.ppsx
BharathiLakshmiAAssi
 
Intensity Transformation.ppsx
Intensity Transformation.ppsxIntensity Transformation.ppsx
Intensity Transformation.ppsx
BharathiLakshmiAAssi
 
MAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsxMAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsx
BharathiLakshmiAAssi
 
Web Designing.ppsx
Web Designing.ppsxWeb Designing.ppsx
Web Designing.ppsx
BharathiLakshmiAAssi
 
Graphics Designing-Intro.ppsx
Graphics Designing-Intro.ppsxGraphics Designing-Intro.ppsx
Graphics Designing-Intro.ppsx
BharathiLakshmiAAssi
 
Intensity Transformation & Spatial Filtering.ppsx
Intensity Transformation & Spatial Filtering.ppsxIntensity Transformation & Spatial Filtering.ppsx
Intensity Transformation & Spatial Filtering.ppsx
BharathiLakshmiAAssi
 
DIP Slide Share.ppsx
DIP Slide Share.ppsxDIP Slide Share.ppsx
DIP Slide Share.ppsx
BharathiLakshmiAAssi
 
Class Timetable.ppsx
Class Timetable.ppsxClass Timetable.ppsx
Class Timetable.ppsx
BharathiLakshmiAAssi
 
MAPEM.ppsx
MAPEM.ppsxMAPEM.ppsx

More from BharathiLakshmiAAssi (17)

VB.net&OOP.pptx
VB.net&OOP.pptxVB.net&OOP.pptx
VB.net&OOP.pptx
 
VB.netIDE.pptx
VB.netIDE.pptxVB.netIDE.pptx
VB.netIDE.pptx
 
VB.Net-Introduction.ppt
VB.Net-Introduction.pptVB.Net-Introduction.ppt
VB.Net-Introduction.ppt
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
 
Demand Paging.pptx
Demand Paging.pptxDemand Paging.pptx
Demand Paging.pptx
 
Virtual Memory.pptx
Virtual Memory.pptxVirtual Memory.pptx
Virtual Memory.pptx
 
Knowing about Computer SS.pptx
Knowing about Computer SS.pptxKnowing about Computer SS.pptx
Knowing about Computer SS.pptx
 
MAPEM.ppsx
MAPEM.ppsxMAPEM.ppsx
MAPEM.ppsx
 
Iterative Algorithms.ppsx
Iterative Algorithms.ppsxIterative Algorithms.ppsx
Iterative Algorithms.ppsx
 
Intensity Transformation.ppsx
Intensity Transformation.ppsxIntensity Transformation.ppsx
Intensity Transformation.ppsx
 
MAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsxMAtrix Multiplication Parallel.ppsx
MAtrix Multiplication Parallel.ppsx
 
Web Designing.ppsx
Web Designing.ppsxWeb Designing.ppsx
Web Designing.ppsx
 
Graphics Designing-Intro.ppsx
Graphics Designing-Intro.ppsxGraphics Designing-Intro.ppsx
Graphics Designing-Intro.ppsx
 
Intensity Transformation & Spatial Filtering.ppsx
Intensity Transformation & Spatial Filtering.ppsxIntensity Transformation & Spatial Filtering.ppsx
Intensity Transformation & Spatial Filtering.ppsx
 
DIP Slide Share.ppsx
DIP Slide Share.ppsxDIP Slide Share.ppsx
DIP Slide Share.ppsx
 
Class Timetable.ppsx
Class Timetable.ppsxClass Timetable.ppsx
Class Timetable.ppsx
 
MAPEM.ppsx
MAPEM.ppsxMAPEM.ppsx
MAPEM.ppsx
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 

Recently uploaded (20)

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 

Parallel Computing--Webminar.ppsx

  • 1. Parallel Computing 30.09.2020 Holy Cross College, Puttady Kerala International Webinar Dr.A.Bharathi Lakshmi Head of IT Department, VVVC, VNR
  • 7. Why Parallel Computing •Save Time •Memory Usage •Concurrency
  • 15. Memory Architecture •Shared Memory •Uniform Memory Access (UMA) •Non Uniform Memory Access (NUMA) •Distributed Memory •Hybrid Memory
  • 20. Type of Parallel Computing •Data Parallel •Task Parallel •Pipeline Parallel
  • 21. OS & Processor • Multiprocessing • Multitasking • Multithreading • AMD • 4 – 32 Cores • 4 – 64 Threads • Intel • 2 – 7 Cores • Duo – multithreading • I7 – 8 Cores
  • 22. Programming Languages • Apache Hadoop • Apache Spark • Apache Flink • Apache Beam • CUDA • OpenCL • OpenHMPP • OpenMP for C, C++ and Fortran (Shared Memory) • Message Passing Interface (MPI) for C, C++ and Fortran (Distributed Memory)
  • 23. OpenMP •Thread Modeling •Converting Serial to Parallel program is easy •Unix pThread •Compiler directives •Runtime Library •Environmental Variables •Fork-Join Model
  • 25. OpenMP - Directives • For Parallel work-sharing • parallel - # pragma omp parallel • for - #pragma omp [parallel] for [clauses] • sections - #pragma omp [parallel] sections [clauses] • single - #pragma omp single [clauses] • For Master and Synchronization • master • critical • barrier • atomic • flush • Ordered • #pragma omp directive
  • 26. OpenMP •omp.h – Runtime Library •Environmental Variable •omp_dynamic •omp_num_threads •omp_schedule •omp_nested
  • 27. omp_dynamic •Syntax omp_dynamic = boolean value •value – true | false •True – allow users to adjust number of threads •False – users can’t adjust number of threads •Default value - false
  • 28. omp_num_threads • Syntax omp_num_threads = num_list • Num_list – positive integer values • Single value • True & parallel construct without num_threads • false & parallel construct without num_threads • Multiple values • True & parallel construct without num_threads • false & parallel construct without num_threads
  • 29. omp_schedule • Syntax omp_schedule [= type[,size]] • Type • Dynamic • Guided • Runtime • static • Size • Iterations • Integer • Not valid – Runtime
  • 30. omp_nested • Syntax omp_nested [= true | false] • True - enabled • False – disabled • Default - false
  • 31. Functions • omp_set_num_threads(int num_threads) • int omp_get_num_threads • int omp_get_max_threads • int omp_get_thread_num • int omp_get_num_procs • void omp_set_dynamic • int omp_get_dynamic • void omp_set_nested • int omp_get_nested
  • 32. OpenMP - Clauses • For General attributes • if - if(expression) • num_threads – num_threads(num) • ordered - ordered • schedule • nowait - nowait • For data-sharing attributes • private – private(var) • firstprivate – firstprivate(var) • lastprivate – lastprivate(var) • shared – shared(var) • default – default(shared | none) • reduction – reduction(operator:list)
  • 33. Paradigm for using OMP • Write a sequential program • Identify the portion to be parallelized •Add directive/pragmas • In addition to this call runtime library routines and modify environment variables • Parallel programming is ready. • Use OpenMP’s compiler to compile •Run the program
  • 34. Matrix Multiplication •Serial coding for(int i=0;i<n;i++) for(int k=0;k<n;k++) for(int j=0;j<m;j++) c[i][j]=c[i][j]+a[i][k]*b[k][j];
  • 35. Matrix Multiplication • Parallel coding #include<omp.h> omp_set_num_threads(4); #pragma omp parallel for private(i,j,k) { for(int i=0;i<n;i++) for(int k=0;k<n;k++) for(int j=0;j<m;j++) c[i][j]=c[i][j]+a[i][k]*b[k][j]; }
  • 36. Sum of an Array •Serial coding sum=0; for(int i=0;i<n;i++) for(int j=0;j<m;j++) sum+=a[i][j];
  • 37. Sum of an Array • Parallel coding #include<omp.h> omp_set_num_threads(4); #pragma omp parallel for private(i,j) reduction(+:sum) { for(int i=0;i<n;i++) for(int j=0;j<m;j++) sum+=a[i][j]; }
  • 39. Image Reconstruction – Time complexity Time complexity Time complexity Graph Speedup Graph 10 12 15 20 30 FBP 0.008455 0.007704 0.00781 0.015839 0.021083 SIRT 75.6588 76.6664 91.628 56.3881 176.8353 SART 50.5161 57.6855 56.3243 56.3881 202.067 ART 1609.1 1699.73 1889.8 918.3131 723.983 MLEM 522.894 462.973 750.215 709.861 2134.4 MAPEM 726.522 532.309 727.098 532.317 771.465 2 Core 502.087 332.341 502.65 332.347 463.192 4 Core 398.953 297.146 399.495 297.143 447.483 8 Core 198.488 145.926 199.045 145.934 259.513
  • 40. Square Naïve Matrix Multiplication Time complexity Time complexity Graph Speedup Graph 0 200 400 600 800 1000 1200 1400 1000 × 1000 2000 × 2000 3000 × 3000 4000 × 4000 5000 × 5000 1 Core 2 Cores 4 Cores 8 Cores 12 Cores 16 Cores 18 cores 20 Cores 0.0000 2.0000 4.0000 6.0000 8.0000 10.0000 12.0000 14.0000 16.0000 18.0000 1000 × 1000 2000 × 2000 3000 × 3000 4000 × 4000 5000 × 5000 2 4 8 12 16 18 20 Cores 1000 x 1000 2000 x 2000 3000 x 3000 4000 x 4000 5000 x 5000 1 4.1621 54.4683 233.965 639.153 1282.2257 2 2.1539 25.9129 118.3784 316.9857 641.8125 4 1.0993 17.0027 64.2888 172.9639 329.7763 8 0.5822 8.5168 34.0960 81.1930 163.0.773 12 0.5074 5.8074 22.6845 62.6338 135.0753 16 0.5061 4.7371 19.455 57.1035 126.0156 18 0.4708 4.6368 18.6277 52.2070 120.5529 20 0.4487 0.5695 0.6275 0.5502 0.5177
  • 41. Hot research •Nividia •Data mining – tremendous data •Lacking in techniques and Computational power •AI/Machine learning •Image Processing •Medical Field • Image Reconstruction