SlideShare uma empresa Scribd logo
1 de 16
Lab: FCDS - midterm presentation
Ruochun Tzeng
OpenMP
● Memory Model: Shared-Memory
● Execution Model: Fork-Join
#pragma omp parallel num_threads(4)
{
hello();
}
// logically equivalent code
void thunk() {
hello();
}
pthread_t tid[4];
for (int i=1; i<4; ++i)
pthread_create(&tid[i], 0, thunk, 0);
thunk();
for (int i=1; i<4; ++i) pthread_join(tid[i]);
compiler directives
compiler
OpenMP
● Memory Model: Shared-Memory
● Execution Model: Fork-Join
#pragma omp parallel num_threads(4)
{
hello();
}
// logically equivalent code
void thunk() {
hello();
}
pthread_t tid[4];
for (int i=1; i<4; ++i)
pthread_create(&tid[i], 0, thunk, 0);
thunk();
for (int i=1; i<4; ++i) pthread_join(tid[i]);
compiler directives
compiler
OpenMP
● Memory Model: Shared-Memory
● Execution Model: Fork-Join
#pragma omp parallel num_threads(4)
{
hello();
}
// logically equivalent code
void thunk() {
hello();
}
pthread_t tid[4];
for (int i=1; i<4; ++i)
pthread_create(&tid[i], 0, thunk, 0);
thunk();
for (int i=1; i<4; ++i) pthread_join(tid[i]);
compiler directives
compiler
OpenMP
● Memory Model: Shared-Memory
● Execution Model: Fork-Join
#pragma omp parallel num_threads(4)
{
hello();
}
// logically equivalent code
void thunk() {
hello();
}
pthread_t tid[4];
for (int i=1; i<4; ++i)
pthread_create(&tid[i], 0, thunk, 0);
thunk();
for (int i=1; i<4; ++i) pthread_join(tid[i]);
compiler directives
compiler
OpenMP
● Data Parallelism
– #pragma omp parallel for
for(i=0; i<MAX; i++)
...
● Task Parallelism
– #pragma omp section
thread1 thread2 thread3 thread4sequential
OpenMP
● Data Parallelism
– #pragma omp parallel for
for(i=0; i<MAX; i++)
...
● Task Parallelism
– #pragma omp section
thread1 thread2 thread3 thread4sequential
A
B
C
D
A B
C
D
#pragma omp sections
{
{ A(); }
#pragma omp section
{ B(); C();}
#pragma omp section
{ D(); }
}
OpenMP
● Others(recursive, irregular)
– Try #pragma omp task
Task Overview
● Tried 4 of 5
– Bucketsort
● Faster than seq and scaled to medium input
– Unbounded Knapsack Problem
● Faster than seq and scaled to largest input
– 3-SAT
● Better than seq, but not scaled
– Mutually Friendly Number
● Slower than seq, not scaled
Bucketsort
● N = 10^10, #Bucket = 94
1. Putting items to local buckets
2. Sort individually
3. Merge local buckets into shared bucket
– current: non-inplace merge
● Experiment
– Medium input (10^7) tested
– Large input(10^10) not complete the test
Bucketsort
#thread
● N < 1024, M < 10^6
● Dynamic programming works
for (int i=0; i<n; ++i)
for (int j = weight[i]; j <= w; ++j)
c[j] = max(c[j], c[j - weight[i]] + cost[i]);
Unbounded Knapsack
c[j]: the max value I could have with capacity at most up to j
take item inot to take item i
// Update to c[j] is atomic
#pragma omp parallel for
Unbounded Knapsack
sequential: > 14 hours
#thread
● V1: just parallel seq code → slower than seq
● V2: random assign variables
– #trial = 10^10, true negative = 50%
→ not acceptable at all
● V3: dfs (clause by clause) + little opt
– C = (x1 v -x1 v x2) → C is satisfied
→ faster than seq but doesn't scale
3-SAT
3-SAT
#thread
Mutually Friendly Numbers
#thread

Mais conteúdo relacionado

Mais procurados

Bigdata Presentation
Bigdata PresentationBigdata Presentation
Bigdata PresentationYonas Gidey
 
Async await in C++
Async await in C++Async await in C++
Async await in C++cppfrug
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Codemotion
 
Briefly Rust - Daniele Esposti - Codemotion Rome 2017
Briefly Rust - Daniele Esposti - Codemotion Rome 2017Briefly Rust - Daniele Esposti - Codemotion Rome 2017
Briefly Rust - Daniele Esposti - Codemotion Rome 2017Codemotion
 
Runtime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for SmalltalkRuntime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for SmalltalkESUG
 
multi-line record grep
multi-line record grepmulti-line record grep
multi-line record grepRyoichi KATO
 
Thrfit从入门到精通
Thrfit从入门到精通Thrfit从入门到精通
Thrfit从入门到精通炜龙 何
 
Troubleshooting .net core on linux
Troubleshooting .net core on linuxTroubleshooting .net core on linux
Troubleshooting .net core on linuxPavel Klimiankou
 
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019Rafał Leszko
 
General Programming on the GPU - Confoo
General Programming on the GPU - ConfooGeneral Programming on the GPU - Confoo
General Programming on the GPU - ConfooSirKetchup
 
Compiler basics: lisp to assembly
Compiler basics: lisp to assemblyCompiler basics: lisp to assembly
Compiler basics: lisp to assemblyPhil Eaton
 
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...Tsundere Chen
 
Dive into CPython Bytecode
Dive into CPython BytecodeDive into CPython Bytecode
Dive into CPython BytecodeAlex Gaynor
 
Jsr310 - Java 8 Date and Time API
Jsr310 - Java 8 Date and Time APIJsr310 - Java 8 Date and Time API
Jsr310 - Java 8 Date and Time APIAdy Liu
 

Mais procurados (20)

Bigdata Presentation
Bigdata PresentationBigdata Presentation
Bigdata Presentation
 
Async await in C++
Async await in C++Async await in C++
Async await in C++
 
Go at uber
Go at uberGo at uber
Go at uber
 
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
Asynchronous IO in Rust - Enrico Risa - Codemotion Rome 2017
 
Briefly Rust - Daniele Esposti - Codemotion Rome 2017
Briefly Rust - Daniele Esposti - Codemotion Rome 2017Briefly Rust - Daniele Esposti - Codemotion Rome 2017
Briefly Rust - Daniele Esposti - Codemotion Rome 2017
 
Runtime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for SmalltalkRuntime Bytecode Transformation for Smalltalk
Runtime Bytecode Transformation for Smalltalk
 
multi-line record grep
multi-line record grepmulti-line record grep
multi-line record grep
 
Thrfit从入门到精通
Thrfit从入门到精通Thrfit从入门到精通
Thrfit从入门到精通
 
Troubleshooting .net core on linux
Troubleshooting .net core on linuxTroubleshooting .net core on linux
Troubleshooting .net core on linux
 
Polymorphism in c++
Polymorphism in c++Polymorphism in c++
Polymorphism in c++
 
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
Stream Processing in the Cloud - Athens Kubernetes Meetup 16.07.2019
 
Loops (1)
Loops (1)Loops (1)
Loops (1)
 
Code Tuning
Code TuningCode Tuning
Code Tuning
 
General Programming on the GPU - Confoo
General Programming on the GPU - ConfooGeneral Programming on the GPU - Confoo
General Programming on the GPU - Confoo
 
Compiler basics: lisp to assembly
Compiler basics: lisp to assemblyCompiler basics: lisp to assembly
Compiler basics: lisp to assembly
 
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
PyCon TW 2017 - PyPy's approach to construct domain-specific language runtime...
 
Performance .NET Core - M. Terech, P. Janowski
Performance .NET Core - M. Terech, P. JanowskiPerformance .NET Core - M. Terech, P. Janowski
Performance .NET Core - M. Terech, P. Janowski
 
MFC Cosinus
MFC CosinusMFC Cosinus
MFC Cosinus
 
Dive into CPython Bytecode
Dive into CPython BytecodeDive into CPython Bytecode
Dive into CPython Bytecode
 
Jsr310 - Java 8 Date and Time API
Jsr310 - Java 8 Date and Time APIJsr310 - Java 8 Date and Time API
Jsr310 - Java 8 Date and Time API
 

Semelhante a LCDS - State Presentation

Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovWorkshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovFwdays
 
Beyond Parallelize and Collect by Holden Karau
Beyond Parallelize and Collect by Holden KarauBeyond Parallelize and Collect by Holden Karau
Beyond Parallelize and Collect by Holden KarauSpark Summit
 
Programming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdf
Programming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdfProgramming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdf
Programming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdfssuser6254411
 
Introduction to objective c
Introduction to objective cIntroduction to objective c
Introduction to objective csagaroceanic11
 
Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016Holden Karau
 
Threaded Programming
Threaded ProgrammingThreaded Programming
Threaded ProgrammingSri Prasanna
 
Giorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrencyGiorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrencyGiorgio Zoppi
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance PythonIan Ozsvald
 
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 PerformanceCUSTIS
 
"Optimization of a .NET application- is it simple ! / ?", Yevhen Tatarynov
"Optimization of a .NET application- is it simple ! / ?",  Yevhen Tatarynov"Optimization of a .NET application- is it simple ! / ?",  Yevhen Tatarynov
"Optimization of a .NET application- is it simple ! / ?", Yevhen TatarynovFwdays
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptUdhayaKumar175069
 
Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in Cummeafruz
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functionsray143eddie
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptAlefya1
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.pptJoshCasas1
 
Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015Holden Karau
 
NYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKeeNYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKeeRizwan Habib
 

Semelhante a LCDS - State Presentation (20)

Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen TatarynovWorkshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
Workshop "Can my .NET application use less CPU / RAM?", Yevhen Tatarynov
 
Task and Data Parallelism
Task and Data ParallelismTask and Data Parallelism
Task and Data Parallelism
 
Beyond Parallelize and Collect by Holden Karau
Beyond Parallelize and Collect by Holden KarauBeyond Parallelize and Collect by Holden Karau
Beyond Parallelize and Collect by Holden Karau
 
Programming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdf
Programming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdfProgramming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdf
Programming For Big Data [ Submission DvcScheduleV2.cpp and StaticA.pdf
 
Introduction to objective c
Introduction to objective cIntroduction to objective c
Introduction to objective c
 
Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016Testing and validating spark programs - Strata SJ 2016
Testing and validating spark programs - Strata SJ 2016
 
Threaded Programming
Threaded ProgrammingThreaded Programming
Threaded Programming
 
Giorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrencyGiorgio zoppi cpp11concurrency
Giorgio zoppi cpp11concurrency
 
Euro python2011 High Performance Python
Euro python2011 High Performance PythonEuro python2011 High Performance Python
Euro python2011 High Performance Python
 
C Programming Homework Help
C Programming Homework HelpC Programming Homework Help
C Programming Homework Help
 
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
 
"Optimization of a .NET application- is it simple ! / ?", Yevhen Tatarynov
"Optimization of a .NET application- is it simple ! / ?",  Yevhen Tatarynov"Optimization of a .NET application- is it simple ! / ?",  Yevhen Tatarynov
"Optimization of a .NET application- is it simple ! / ?", Yevhen Tatarynov
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Survey of programming language getting started in C
Survey of programming language getting started in CSurvey of programming language getting started in C
Survey of programming language getting started in C
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt270_1_CIntro_Up_To_Functions.ppt
270_1_CIntro_Up_To_Functions.ppt
 
Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015
 
NYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKeeNYAI - Scaling Machine Learning Applications by Braxton McKee
NYAI - Scaling Machine Learning Applications by Braxton McKee
 

Mais de Ruochun Tzeng

Word Mover's Distance
Word Mover's DistanceWord Mover's Distance
Word Mover's DistanceRuochun Tzeng
 
PRUNE: Preserving Proximity and Global Ranking for Network Embedding
PRUNE: Preserving Proximity and Global Ranking for Network EmbeddingPRUNE: Preserving Proximity and Global Ranking for Network Embedding
PRUNE: Preserving Proximity and Global Ranking for Network EmbeddingRuochun Tzeng
 
Multiscale Laplacian Graph Kernel
Multiscale Laplacian Graph KernelMultiscale Laplacian Graph Kernel
Multiscale Laplacian Graph KernelRuochun Tzeng
 
Omni-Prop: Seamless Node Classification on Arbitrary Label Correlation
Omni-Prop: Seamless Node Classification on Arbitrary Label CorrelationOmni-Prop: Seamless Node Classification on Arbitrary Label Correlation
Omni-Prop: Seamless Node Classification on Arbitrary Label CorrelationRuochun Tzeng
 
Scalable gradientbasedtuningcontinuousregularizationhyperparameters ppt
Scalable gradientbasedtuningcontinuousregularizationhyperparameters pptScalable gradientbasedtuningcontinuousregularizationhyperparameters ppt
Scalable gradientbasedtuningcontinuousregularizationhyperparameters pptRuochun Tzeng
 
Tensorizing Neural Network
Tensorizing Neural NetworkTensorizing Neural Network
Tensorizing Neural NetworkRuochun Tzeng
 
On the Number of Linear Regions of DNN
On the Number of Linear Regions of DNNOn the Number of Linear Regions of DNN
On the Number of Linear Regions of DNNRuochun Tzeng
 
Cloud Database Final Project
Cloud Database Final ProjectCloud Database Final Project
Cloud Database Final ProjectRuochun Tzeng
 
Lab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed SystemsLab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed SystemsRuochun Tzeng
 

Mais de Ruochun Tzeng (10)

Word Mover's Distance
Word Mover's DistanceWord Mover's Distance
Word Mover's Distance
 
PRUNE: Preserving Proximity and Global Ranking for Network Embedding
PRUNE: Preserving Proximity and Global Ranking for Network EmbeddingPRUNE: Preserving Proximity and Global Ranking for Network Embedding
PRUNE: Preserving Proximity and Global Ranking for Network Embedding
 
Multiscale Laplacian Graph Kernel
Multiscale Laplacian Graph KernelMultiscale Laplacian Graph Kernel
Multiscale Laplacian Graph Kernel
 
Omni-Prop: Seamless Node Classification on Arbitrary Label Correlation
Omni-Prop: Seamless Node Classification on Arbitrary Label CorrelationOmni-Prop: Seamless Node Classification on Arbitrary Label Correlation
Omni-Prop: Seamless Node Classification on Arbitrary Label Correlation
 
Scalable gradientbasedtuningcontinuousregularizationhyperparameters ppt
Scalable gradientbasedtuningcontinuousregularizationhyperparameters pptScalable gradientbasedtuningcontinuousregularizationhyperparameters ppt
Scalable gradientbasedtuningcontinuousregularizationhyperparameters ppt
 
Tensorizing Neural Network
Tensorizing Neural NetworkTensorizing Neural Network
Tensorizing Neural Network
 
On the Number of Linear Regions of DNN
On the Number of Linear Regions of DNNOn the Number of Linear Regions of DNN
On the Number of Linear Regions of DNN
 
XSSearch
XSSearchXSSearch
XSSearch
 
Cloud Database Final Project
Cloud Database Final ProjectCloud Database Final Project
Cloud Database Final Project
 
Lab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed SystemsLab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed Systems
 

Último

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 

Último (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

LCDS - State Presentation

  • 1. Lab: FCDS - midterm presentation Ruochun Tzeng
  • 2. OpenMP ● Memory Model: Shared-Memory ● Execution Model: Fork-Join #pragma omp parallel num_threads(4) { hello(); } // logically equivalent code void thunk() { hello(); } pthread_t tid[4]; for (int i=1; i<4; ++i) pthread_create(&tid[i], 0, thunk, 0); thunk(); for (int i=1; i<4; ++i) pthread_join(tid[i]); compiler directives compiler
  • 3. OpenMP ● Memory Model: Shared-Memory ● Execution Model: Fork-Join #pragma omp parallel num_threads(4) { hello(); } // logically equivalent code void thunk() { hello(); } pthread_t tid[4]; for (int i=1; i<4; ++i) pthread_create(&tid[i], 0, thunk, 0); thunk(); for (int i=1; i<4; ++i) pthread_join(tid[i]); compiler directives compiler
  • 4. OpenMP ● Memory Model: Shared-Memory ● Execution Model: Fork-Join #pragma omp parallel num_threads(4) { hello(); } // logically equivalent code void thunk() { hello(); } pthread_t tid[4]; for (int i=1; i<4; ++i) pthread_create(&tid[i], 0, thunk, 0); thunk(); for (int i=1; i<4; ++i) pthread_join(tid[i]); compiler directives compiler
  • 5. OpenMP ● Memory Model: Shared-Memory ● Execution Model: Fork-Join #pragma omp parallel num_threads(4) { hello(); } // logically equivalent code void thunk() { hello(); } pthread_t tid[4]; for (int i=1; i<4; ++i) pthread_create(&tid[i], 0, thunk, 0); thunk(); for (int i=1; i<4; ++i) pthread_join(tid[i]); compiler directives compiler
  • 6. OpenMP ● Data Parallelism – #pragma omp parallel for for(i=0; i<MAX; i++) ... ● Task Parallelism – #pragma omp section thread1 thread2 thread3 thread4sequential
  • 7. OpenMP ● Data Parallelism – #pragma omp parallel for for(i=0; i<MAX; i++) ... ● Task Parallelism – #pragma omp section thread1 thread2 thread3 thread4sequential A B C D A B C D #pragma omp sections { { A(); } #pragma omp section { B(); C();} #pragma omp section { D(); } }
  • 9. Task Overview ● Tried 4 of 5 – Bucketsort ● Faster than seq and scaled to medium input – Unbounded Knapsack Problem ● Faster than seq and scaled to largest input – 3-SAT ● Better than seq, but not scaled – Mutually Friendly Number ● Slower than seq, not scaled
  • 10. Bucketsort ● N = 10^10, #Bucket = 94 1. Putting items to local buckets 2. Sort individually 3. Merge local buckets into shared bucket – current: non-inplace merge ● Experiment – Medium input (10^7) tested – Large input(10^10) not complete the test
  • 12. ● N < 1024, M < 10^6 ● Dynamic programming works for (int i=0; i<n; ++i) for (int j = weight[i]; j <= w; ++j) c[j] = max(c[j], c[j - weight[i]] + cost[i]); Unbounded Knapsack c[j]: the max value I could have with capacity at most up to j take item inot to take item i // Update to c[j] is atomic #pragma omp parallel for
  • 14. ● V1: just parallel seq code → slower than seq ● V2: random assign variables – #trial = 10^10, true negative = 50% → not acceptable at all ● V3: dfs (clause by clause) + little opt – C = (x1 v -x1 v x2) → C is satisfied → faster than seq but doesn't scale 3-SAT