programming-model centric debugging for openmp/ompss · 2020-04-28 · programming-model centric...
TRANSCRIPT
![Page 1: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/1.jpg)
Programming-Model Centric Debuggingfor OpenMP/OMPss
Kevin PougetJean-Francois Mehaut, Miguel Santana
Universite Grenoble Alpes / LIG, STMicroelectronics, FranceNano2017-DEMA project
Nano2017/Dema Workshop, ChamonixDecember 14th, 2015
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 1 / 24
![Page 2: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/2.jpg)
Introduction: Embedded Systems and MPSoCIntroduction: Embedded Systems and MPSoC
Convergence of Embedded and HPC
HPC in embedded systemsI high-def. multimediaI augmented realityI video games on smartphones
Embedded systems in HPCI dedicated hardware acceleratorsI energy efficiency
F e.g. Mont-Blanc projects
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 2 / 24
![Page 3: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/3.jpg)
Introduction: Embedded Systems and MPSoCIntroduction: Embedded Systems and MPSoC
⇒ important demand for:
Powerful parallel architectures
I Shared+distrib mem cores+accelerators
High-level development methodologies
I Programming models & environments
Efficient verification & validation tools
I Our research effort
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 2 / 24
![Page 4: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/4.jpg)
Introduction: Embedded Systems and MPSoCIntroduction: Embedded Systems and MPSoC
⇒ important demand for:
Powerful parallel architecturesI Shared+distrib mem cores+accelerators
High-level development methodologies
I Programming models & environments
Efficient verification & validation tools
I Our research effort
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 2 / 24
![Page 5: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/5.jpg)
Introduction: Embedded Systems and MPSoCIntroduction: Embedded Systems and MPSoC
⇒ important demand for:
Powerful parallel architecturesI Shared+distrib mem cores+accelerators
High-level development methodologiesI Programming models & environments
Efficient verification & validation tools
I Our research effort
front
pred
front_controller
bh
imvp
pred_controller
red
pipe
ipred
hwcfg
3 ipf
20
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 2 / 24
![Page 6: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/6.jpg)
Introduction: Embedded Systems and MPSoCIntroduction: Embedded Systems and MPSoC
⇒ important demand for:
Powerful parallel architecturesI Shared+distrib mem cores+accelerators
High-level development methodologiesI Programming models & environments
Efficient verification & validation toolsI Our research effort
Preliminary Agenda
Wednesday, October 8
9.00 – 9.15Opening (Andreas Herkersdorf, TU München and Rainer Leupers, RWTH Aachen)
9.15 – 9.45[Keynote] Using Execution Traces to Debug Multicore SoCs: An Industrial Experience (Miguel Santana, ST Microelectronics)
9.45 – 10.30Session 1: Challenges and Opportunities of Modern SoC Debug Infrastructure• From Virtual Targets to USB: Upcoming SoC Debugging Approaches
Michael Eick (Lauterbach) and Rolf Kuehnis (Intel)• Multicore Start Execution Synchronization
Razvan Ionescu (Freescale)
10.30 – 11.00Coffee Break
11.00 – 12.30Session 2: What‘s next?• On the Shoulders of Giants – Can we Learn Diagnosis from SoC’s Larger
Siblings?Philipp Wagner (TU Munich)
• Programming-Model Centric Debugging for Multicore Embedded SystemsKevin Pouget (University of Grenoble)
Session 3: SW Development and Debugging for Manycore Systems• KPN-based Image Recognition Software Development for Scalable
Manycore Processor SMYLEvideoYukoh Matsumoto (TOPS Systems)
• SW Debugging for Multi-tile Systems: The EURETILE Methodology and ToolsLuis Murillo (RWTH Aachen)
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 2 / 24
![Page 7: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/7.jpg)
AgendaAgenda
1 Research Context
2 Research Context
3 Programming Model Centric Debugging
4 Case-Study Illustration: OpenMP
5 Conclusion
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 3 / 24
![Page 8: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/8.jpg)
AgendaAgenda
1 Research Context
2 Research Context
3 Programming Model Centric Debugging
4 Case-Study Illustration: OpenMP
5 Conclusion
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 3 / 24
![Page 9: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/9.jpg)
AgendaAgenda
1 Research Context
2 Research Context
3 Programming Model Centric Debugging
4 Case-Study Illustration: OpenMP
5 Conclusion
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 3 / 24
![Page 10: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/10.jpg)
Verification and Validation: DebuggingVerification and Validation: Debugging
Source-Level Interactive Debugging (e.g. GDB)
Developers mental representation VS. actual execution
Understand the different steps of the execution
What about programming models?
Source-level Interactive Debuggers operate at language-level.
They have no knowledge abouthigh-level abstract machines!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 4 / 24
![Page 11: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/11.jpg)
Verification and Validation: DebuggingVerification and Validation: Debugging
What about programming models?
Source-level Interactive Debuggers operate at language-level.
They have no knowledge abouthigh-level abstract machines!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 4 / 24
![Page 12: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/12.jpg)
Verification and Validation: DebuggingVerification and Validation: Debugging
What about programming models?
Source-level Interactive Debuggers operate at language-level.
They have no knowledge abouthigh-level abstract machines!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 4 / 24
![Page 13: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/13.jpg)
Verification and Validation: DebuggingVerification and Validation: Debugging
What about programming models?
Source-level Interactive Debuggers operate at language-level.
They have no knowledge abouthigh-level abstract machines!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 4 / 24
![Page 14: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/14.jpg)
Verification and Validation: DebuggingVerification and Validation: Debugging
What about programming models?
Source-level Interactive Debuggers operate at language-level.
They have no knowledge abouthigh-level abstract machines!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 4 / 24
![Page 15: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/15.jpg)
Research ContextResearch Context
Objective
Provide developers with means tobetter understand the state of the high-level applications
and control more easily their execution,suitable for various models and environments.
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 5 / 24
![Page 16: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/16.jpg)
AgendaAgenda
1 Research Context
2 Research Context
3 Programming Model Centric Debugging
4 Case-Study Illustration: OpenMP
5 Conclusion
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 5 / 24
![Page 17: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/17.jpg)
Programming Model Centric DebuggingProgramming Model Centric Debugging
Idea: Integrate programming model conceptsin interactive debugging
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 6 / 24
![Page 18: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/18.jpg)
Programming Model Centric DebuggingProgramming Model Centric Debugging
1 Provide a Structural RepresentationI Draw application architecture diagramsI Represent the relationship between the entities
2 Monitor Dynamic BehaviorsI Monitor the collaboration between the tasksI Detect communication, synchronization events
3 Interact with the Abstract MachineI Control the execution of the entitiesI Support interactions with real machine
Let’s apply to OpenMP!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 7 / 24
![Page 19: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/19.jpg)
Programming Model Centric DebuggingProgramming Model Centric Debugging
1 Provide a Structural RepresentationI Draw application architecture diagramsI Represent the relationship between the entities
2 Monitor Dynamic BehaviorsI Monitor the collaboration between the tasksI Detect communication, synchronization events
3 Interact with the Abstract MachineI Control the execution of the entitiesI Support interactions with real machine
Let’s apply to OpenMP!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 7 / 24
![Page 20: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/20.jpg)
Programming Model Centric DebuggingProgramming Model Centric Debugging
1 Provide a Structural RepresentationI Draw application architecture diagramsI Represent the relationship between the entities
2 Monitor Dynamic BehaviorsI Monitor the collaboration between the tasksI Detect communication, synchronization events
3 Interact with the Abstract MachineI Control the execution of the entitiesI Support interactions with real machine
Let’s apply to OpenMP!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 7 / 24
![Page 21: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/21.jpg)
Programming Model Centric DebuggingProgramming Model Centric Debugging
1 Provide a Structural RepresentationI Draw application architecture diagramsI Represent the relationship between the entities
2 Monitor Dynamic BehaviorsI Monitor the collaboration between the tasksI Detect communication, synchronization events
3 Interact with the Abstract MachineI Control the execution of the entitiesI Support interactions with real machine
Let’s apply to OpenMP!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 7 / 24
![Page 22: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/22.jpg)
AgendaAgenda
1 Research Context
2 Research Context
3 Programming Model Centric Debugging
4 Case-Study Illustration: OpenMP
5 Conclusion
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 7 / 24
![Page 23: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/23.jpg)
Nano2017/Dema project (with STMicroelectronics)Nano2017/Dema project (with STMicroelectronics)
Debugging Embedded and Multicore Applications
ARM Juno
heterogenous archi.
ARM big.LITTLE+ Mali GPU
OpenMP Parallel Programming
fork/join multithreading
tasks with dependencies
industrial standard for HPC
mcGDB debugger
Python extension of GDB
support for dataflow, components, ...
developed in partnership with STMicro
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 8 / 24
![Page 24: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/24.jpg)
OpenMP/OMPss: Problems with GDBOpenMP/OMPss: Problems with GDB
OpenMP and GDB
⇒ No high-level vision of the application by GDB
(gdb) list
17 // <==== current thread is here
18 #pragma omp critical
19 {20 printf("@%d Inside critical zone", id);
21 }(gdb) next
@4 Inside critical zone
@2 Inside critical zone
20 printf("@%d Inside critical zone", id);
(gdb) # I wanted to be the first :‘-(
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 9 / 24
![Page 25: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/25.jpg)
OpenMP/OMPss: Problems with GDBOpenMP/OMPss: Problems with GDB
OpenMP and GDB
⇒ No high-level vision of the application by GDB
(gdb) list
17 // <==== current thread is here
18 #pragma omp critical
19 {20 printf("@%d Inside critical zone" , id);
21 }(gdb) next
@4 Inside critical zone
@2 Inside critical zone
20 printf("@%d Inside critical zone", id);
(gdb) # I wanted to be the first :‘-(
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 9 / 24
![Page 26: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/26.jpg)
OpenMP/OMPss: Problems with GDBOpenMP/OMPss: Problems with GDB
OpenMP and GDB
⇒ No high-level vision of the application by GDB
(gdb) list
17 // <==== current thread is here
18 #pragma omp critical
19 {20 printf("@%d Inside critical zone" , id);
21 }(gdb) next
@4 Inside critical zone
@2 Inside critical zone
20 printf("@%d Inside critical zone" , id);
(gdb) # I wanted to be the first :‘-(
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 9 / 24
![Page 27: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/27.jpg)
OpenMP/OMPss: mcGDB Execution ControlOpenMP/OMPss: mcGDB Execution Control
... control the execution of the entities ...
1 start
2 omp start
3 omp step
4 omp next barrier
5 omp critical next
6 omp critical next
7 omp critical next
int main() {
¬// beginning of main function
#pragma omp parallel {
// beginning of parallel zone
#pragma omp single {
// execute single
}//implicit barrier
#pragma omp critical {
// execute critical
}
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 10 / 24
![Page 28: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/28.jpg)
OpenMP/OMPss: mcGDB Execution ControlOpenMP/OMPss: mcGDB Execution Control
... control the execution of the entities ...
1 start
2 omp start
3 omp step
4 omp next barrier
5 omp critical next
6 omp critical next
7 omp critical next
int main() {
// beginning of main function
#pragma omp parallel {
¬®¯// beginning of parallel zone
#pragma omp single {
// execute single
}//implicit barrier
#pragma omp critical {
// execute critical
}
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 10 / 24
![Page 29: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/29.jpg)
OpenMP/OMPss: mcGDB Execution ControlOpenMP/OMPss: mcGDB Execution Control
... control the execution of the entities ...
1 start
2 omp start
3 omp step
4 omp next barrier
5 omp critical next
6 omp critical next
7 omp critical next
int main() {
// beginning of main function
#pragma omp parallel {
®¯// beginning of parallel zone
#pragma omp single {
¬// execute single
}//implicit barrier
#pragma omp critical {
// execute critical
}
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 10 / 24
![Page 30: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/30.jpg)
OpenMP/OMPss: mcGDB Execution ControlOpenMP/OMPss: mcGDB Execution Control
... control the execution of the entities ...
1 start
2 omp start
3 omp step
4 omp next barrier
5 omp critical next
6 omp critical next
7 omp critical next
int main() {
// beginning of main function
#pragma omp parallel {
// beginning of parallel zone
#pragma omp single {
// execute single
}¬®¯//implicit barrier
#pragma omp critical {
// execute critical
}
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 10 / 24
![Page 31: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/31.jpg)
OpenMP/OMPss: mcGDB Execution ControlOpenMP/OMPss: mcGDB Execution Control
... control the execution of the entities ...
1 start
2 omp start
3 omp step
4 omp next barrier
5 omp critical next
6 omp critical next
7 omp critical next
int main() {
// beginning of main function
#pragma omp parallel {
// beginning of parallel zone
#pragma omp single {
// execute single
}//implicit barrier
#pragma omp critical ¬®¯ {
// execute critical
}
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 10 / 24
![Page 32: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/32.jpg)
OpenMP/OMPss: mcGDB Execution ControlOpenMP/OMPss: mcGDB Execution Control
... control the execution of the entities ...
1 start
2 omp start
3 omp step
4 omp next barrier
5 omp critical next
6 omp critical next
7 omp critical next
int main() {
// beginning of main function
#pragma omp parallel {
// beginning of parallel zone
#pragma omp single {
// execute single
}//implicit barrier
#pragma omp critical ®¯ {
¬// execute critical
}
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 10 / 24
![Page 33: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/33.jpg)
OpenMP/OMPss: mcGDB Execution ControlOpenMP/OMPss: mcGDB Execution Control
... control the execution of the entities ...
1 start
2 omp start
3 omp step
4 omp next barrier
5 omp critical next
6 omp critical next
7 omp critical next
int main() {
// beginning of main function
#pragma omp parallel {
// beginning of parallel zone
#pragma omp single {
// execute single
}//implicit barrier
#pragma omp critical ¯ {
®// execute critical
}¬
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 10 / 24
![Page 34: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/34.jpg)
OpenMP/OMPss: structural representationOpenMP/OMPss: structural representation
... provide a structural representation... provide details about entity state
1 fork-join =⇒ OpenMP sequence diagrams
2 task-based =⇒ mcGDB+Temanejo cooperation
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 11 / 24
![Page 35: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/35.jpg)
OpenMP/OMPss: structural representationOpenMP/OMPss: structural representation
... provide a structural representation... provide details about entity state
1 fork-join =⇒ OpenMP sequence diagrams
2 task-based =⇒ mcGDB+Temanejo cooperation
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 11 / 24
![Page 36: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/36.jpg)
OpenMP/OMPss: structural representationOpenMP/OMPss: structural representation
... provide a structural representation... provide details about entity state
1 fork-join =⇒ OpenMP sequence diagrams
2 task-based =⇒ mcGDB+Temanejo cooperation
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 11 / 24
![Page 37: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/37.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
DEMO
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 12 / 24
![Page 38: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/38.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 39: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/39.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 40: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/40.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 41: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/41.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 42: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/42.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 43: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/43.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 44: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/44.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 45: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/45.jpg)
OpenMP/OMPss: mcGDB sequence diagramOpenMP/OMPss: mcGDB sequence diagram
1 start
2 omp start
3 omp step
4 omp next barrier
5 thread 2
6 omp critical next
7 omp critical next
8 omp critical next
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 13 / 24
![Page 46: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/46.jpg)
OpenMP/OMPss: structural representationOpenMP/OMPss: structural representation
... provide a structural representation... provide details about entity state
1 fork-join =⇒ OpenMP sequence diagrams
2 task-based=⇒ mcGDB+Temanejo cooperation
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 14 / 24
![Page 47: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/47.jpg)
OpenMP/OMPss: mcGDB + TemanejoOpenMP/OMPss: mcGDB + Temanejo
OpenMP 4.0 task dependencies
#pragma omp task depend(in: i,j) depend(out:i,j)
update 1(&i, &j);
#pragma omp task depend(in: i) depend(out:i)
update 2a(&i);
#pragma omp task depend(in: j) depend(out:j)
update 2b(&j);
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 15 / 24
![Page 48: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/48.jpg)
OpenMP/OMPss: mcGDB + TemanejoOpenMP/OMPss: mcGDB + Temanejo
(HLRS Stuttgart) Temanejo ...
3 is a great visualization tool for task debugging,7 and does not support source-level debugging.
mcGDB ...
7 has no visualization engine,3 but provides source debugging at language (gdb) and model level.
So let’s do both!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 16 / 24
![Page 49: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/49.jpg)
OpenMP/OMPss: mcGDB + TemanejoOpenMP/OMPss: mcGDB + Temanejo
(HLRS Stuttgart) Temanejo ...
3 is a great visualization tool for task debugging,
7 and does not support source-level debugging.
mcGDB ...
7 has no visualization engine,
3 but provides source debugging at language (gdb) and model level.
So let’s do both!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 16 / 24
![Page 50: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/50.jpg)
OpenMP/OMPss: mcGDB + TemanejoOpenMP/OMPss: mcGDB + Temanejo
(HLRS Stuttgart) Temanejo ...
3 is a great visualization tool for task debugging,
7 and does not support source-level debugging.
mcGDB ...
7 has no visualization engine,
3 but provides source debugging at language (gdb) and model level.
So let’s do both!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 16 / 24
![Page 51: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/51.jpg)
mcGDB + TemanejomcGDB + Temanejo
mcGDB – Temanejo cooperation:
Temanejo
task graph visualization
simple model-level execution control.
sequence diagram visualization.
mcGDB
task graph and exec. events capture,
advanced model-level exec. control.
GDB
language and assembly levelexecution control, memory inspection.
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 17 / 24
![Page 52: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/52.jpg)
mcGDB + TemanejomcGDB + Temanejo
mcGDB – Temanejo cooperation:
Temanejo
task graph visualization
simple model-level execution control.
sequence diagram visualization.
mcGDB
task graph and exec. events capture,
advanced model-level exec. control.
GDB
language and assembly levelexecution control, memory inspection.
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 17 / 24
![Page 53: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/53.jpg)
mcGDB + TemanejomcGDB + Temanejo
mcGDB – Temanejo cooperation:
Temanejo
task graph visualization
simple model-level execution control.
sequence diagram visualization.
mcGDB
task graph and exec. events capture,
advanced model-level exec. control.
GDB
language and assembly levelexecution control, memory inspection.
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 17 / 24
![Page 54: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/54.jpg)
mcGDB + TemanejomcGDB + Temanejo
mcGDB – Temanejo cooperation:
Temanejo
task graph visualization
simple model-level execution control.
sequence diagram visualization.
mcGDB
task graph and exec. events capture,
advanced model-level exec. control.
GDB
language and assembly levelexecution control, memory inspection.
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 17 / 24
![Page 55: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/55.jpg)
OpenMP/OMPss: structural representationOpenMP/OMPss: structural representation
DEMO
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 18 / 24
![Page 56: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/56.jpg)
mcGDB + Temanejo: Node color means sourcesmcGDB + Temanejo: Node color means sources
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 19 / 24
![Page 57: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/57.jpg)
mcGDB + Temanejo: Dep. color means varnamemcGDB + Temanejo: Dep. color means varname
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 19 / 24
![Page 58: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/58.jpg)
mcGDB + Temanejo: Task 3 blocked.mcGDB + Temanejo: Task 3 blocked.
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 19 / 24
![Page 59: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/59.jpg)
mcGDB + Temanejo: Execution continued til lockedmcGDB + Temanejo: Execution continued til locked
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 19 / 24
![Page 60: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/60.jpg)
mcGDB + Temanejo: Task 3 unblocked, 16 breakptdmcGDB + Temanejo: Task 3 unblocked, 16 breakptd
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 19 / 24
![Page 61: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/61.jpg)
mcGDB + Temanejo: Done. Node color means exec.mcGDB + Temanejo: Done. Node color means exec.
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 19 / 24
![Page 62: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/62.jpg)
mcGDB + TemanejomcGDB + Temanejo
More on OMP tasks
#pragma omp task depend(in: i,j)
Support on-going:
//arrays and matrix
#pragma omp task depend(in: array[i])
#pragma omp task depend(in: matrix[i][j])
//ranges (*not* overlapping)
#pragma omp task depend(in: array[i:j])
#pragma omp task depend(in: matrix[i:l1][j:l2])
not verified by compiler, likely source of bug
dynamic, so good match for interactive debugging
but debugger unfriendly compilation:I array/index merged, len disappearsI symbol mangling, array types stripped, ...
tricky for me to implement!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 20 / 24
![Page 63: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/63.jpg)
mcGDB + TemanejomcGDB + Temanejo
More on OMP tasks
#pragma omp task depend(in: i,j)
Support on-going:
//arrays and matrix
#pragma omp task depend(in: array[i])
#pragma omp task depend(in: matrix[i][j])
//ranges (*not* overlapping)
#pragma omp task depend(in: array[i:j])
#pragma omp task depend(in: matrix[i:l1][j:l2])
not verified by compiler, likely source of bug
dynamic, so good match for interactive debugging
but debugger unfriendly compilation:I array/index merged, len disappearsI symbol mangling, array types stripped, ...
tricky for me to implement!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 20 / 24
![Page 64: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/64.jpg)
mcGDB + TemanejomcGDB + Temanejo
More on OMP tasks
#pragma omp task depend(in: i,j)
Support on-going:
//arrays and matrix
#pragma omp task depend(in: array[i])
#pragma omp task depend(in: matrix[i][j])
//ranges (*not* overlapping)
#pragma omp task depend(in: array[i:j])
#pragma omp task depend(in: matrix[i:l1][j:l2])
not verified by compiler, likely source of bug
dynamic, so good match for interactive debugging
but debugger unfriendly compilation:I array/index merged, len disappearsI symbol mangling, array types stripped, ...
tricky for me to implement!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 20 / 24
![Page 65: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/65.jpg)
mcGDB + TemanejomcGDB + Temanejo
Support on-going:
//arrays and matrix
#pragma omp task depend(in: array[i])
#pragma omp task depend(in: matrix[i][j])
//ranges (*not* overlapping)
#pragma omp task depend(in: array[i:j])
#pragma omp task depend(in: matrix[i:l1][j:l2])
not verified by compiler, likely source of bug
dynamic, so good match for interactive debugging
but debugger unfriendly compilation:I array/index merged, len disappearsI symbol mangling, array types stripped, ...
tricky for me to implement!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 20 / 24
![Page 66: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/66.jpg)
mcGDB + TemanejomcGDB + Temanejo
Support on-going:
//arrays and matrix
#pragma omp task depend(in: array[i])
#pragma omp task depend(in: matrix[i][j])
//ranges (*not* overlapping)
#pragma omp task depend(in: array[i:j])
#pragma omp task depend(in: matrix[i:l1][j:l2])
not verified by compiler, likely source of bug
dynamic, so good match for interactive debugging
but debugger unfriendly compilation:I array/index merged, len disappearsI symbol mangling, array types stripped, ...
tricky for me to implement!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 20 / 24
![Page 67: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/67.jpg)
mcGDB + TemanejomcGDB + Temanejo
Support on-going:
//arrays and matrix
#pragma omp task depend(in: array[i])
#pragma omp task depend(in: matrix[i][j])
//ranges (*not* overlapping)
#pragma omp task depend(in: array[i:j])
#pragma omp task depend(in: matrix[i:l1][j:l2])
not verified by compiler, likely source of bug
dynamic, so good match for interactive debugging
but debugger unfriendly compilation:I array/index merged, len disappearsI symbol mangling, array types stripped, ...
tricky for me to implement!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 20 / 24
![Page 68: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/68.jpg)
mcGDB + TemanejomcGDB + Temanejo
Support on-going:
//arrays and matrix
#pragma omp task depend(in: array[i])
#pragma omp task depend(in: matrix[i][j])
//ranges (*not* overlapping)
#pragma omp task depend(in: array[i:j])
#pragma omp task depend(in: matrix[i:l1][j:l2])
not verified by compiler, likely source of bug
dynamic, so good match for interactive debugging
but debugger unfriendly compilation:I array/index merged, len disappearsI symbol mangling, array types stripped, ...
tricky for me to implement!
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 20 / 24
![Page 69: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/69.jpg)
OpenMP/OMPss: OpenMP callstackOpenMP/OMPss: OpenMP callstack
OpenMP callstack
bad callstack of the threads where
Thread 3
#0 gomp_mutex_lock (mutex=0x7ffff7bd6748 <default_lock>)
#1 GOMP_critical_start ()
#2 in main._omp_fn.0 () at parallel-demo.c:17
#3 in GOMP_parallel_trampoline (arg=0x602060)
#4 in gomp_thread_start (xdata=<optimized out>)
#5 in pthread_create_trampoline (arg=0x602b10)
#6 in start_thread (
#7 in clone ()
Thread 2
#0 main._omp_fn.0 () at parallel-demo.c:17
#1 in gomp_thread_start (xdata=<optimized out>)
Requires model-level debugger knowledge
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 21 / 24
![Page 70: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/70.jpg)
OpenMP/OMPss: OpenMP callstackOpenMP/OMPss: OpenMP callstack
OpenMP callstack
bad callstack of the threads where
Thread 3
#0 gomp_mutex_lock (mutex=0x7ffff7bd6748 <default_lock>)
#1 GOMP_critical_start ()
#2 in main._omp_fn.0 () at parallel-demo.c:17
#3 in GOMP_parallel_trampoline (arg=0x602060)
#4 in gomp_thread_start (xdata=<optimized out>)
#5 in pthread_create_trampoline (arg=0x602b10)
#6 in start_thread (
#7 in clone ()
Thread 2
#0 main._omp_fn.0 () at parallel-demo.c:17
#1 in gomp_thread_start (xdata=<optimized out>)
Requires model-level debugger knowledge
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 21 / 24
![Page 71: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/71.jpg)
OpenMP/OMPss: OpenMP callstackOpenMP/OMPss: OpenMP callstack
OpenMP callstack
bad callstack of the threads where
better OpenMP aware thread callstack where no-filter
Thread 3
#0 gomp_mutex_lock (...)
#1 #pragma omp critical_start ()
#2 #parallel zone 1 of main () at parallel-demo.c:17
Thread 2
#0 #parallel zone 1 of main () at parallel-demo.c:17
Thread 1
#0 #parallel zone 1 of main () at parallel-demo.c:19
#2 #pragma omp parallel ()
#4 main () at parallel-demo.c:5
Requires model-level debugger knowledge
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 21 / 24
![Page 72: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/72.jpg)
OpenMP/OMPss: OpenMP callstackOpenMP/OMPss: OpenMP callstack
OpenMP callstack
bad callstack of the threads where
better OpenMP aware thread callstack where no-filter
Thread 3
#0 gomp_mutex_lock (...)
#1 #pragma omp critical_start ()
#2 #parallel zone 1 of main () at parallel-demo.c:17
Thread 2
#0 #parallel zone 1 of main () at parallel-demo.c:17
Thread 1
#0 #parallel zone 1 of main () at parallel-demo.c:19
#2 #pragma omp parallel ()
#4 main () at parallel-demo.c:5
main () at parallel-demo.c:5
#pragma omp parallel
#parallel zone #1 of main
--> + at parallel-demo.c:17 [Thread 1, 4]
#pragma omp critical_start ()
--> gomp_mutex_lock (...) [Thread 3]
--> + at parallel-demo.c:19 [Thread 2]
Requires model-level debugger knowledge
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 21 / 24
![Page 73: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/73.jpg)
OpenMP/OMPss: OpenMP callstackOpenMP/OMPss: OpenMP callstack
OpenMP callstack
bad callstack of the threads where
better OpenMP aware thread callstack where no-filter
best OpenMP tree callstack omp where
main () at parallel-demo.c:5
#pragma omp parallel
#parallel zone #1 of main
--> + at parallel-demo.c:17 [Thread 1, 4]
#pragma omp critical_start ()
--> gomp_mutex_lock (...) [Thread 3]
--> + at parallel-demo.c:19 [Thread 2]
Requires model-level debugger knowledge
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 21 / 24
![Page 74: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/74.jpg)
OpenMP/OMPss: runtime supportOpenMP/OMPss: runtime support
Intel OpenMP and Gomp:I breakpointsI libmcgdb-omp preloaded helper
F full support, main targets
OMPss tasks:I Some breakpoints, libmcgdb-omp not implemented
F only task support
I Initial support of Ayudame helperF HLRS Ayudame/Temanejo targets for free
OMP Trace/Debugging InterfacesI No support :(task dependencies missing) but it looks promising!!
F runtime agnostic mcGDB support
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 22 / 24
![Page 75: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/75.jpg)
OpenMP/OMPss: runtime supportOpenMP/OMPss: runtime support
Intel OpenMP and Gomp:I breakpointsI libmcgdb-omp preloaded helper
F full support, main targets
OMPss tasks:I Some breakpoints, libmcgdb-omp not implemented
F only task support
I Initial support of Ayudame helperF HLRS Ayudame/Temanejo targets for free
OMP Trace/Debugging InterfacesI No support :(task dependencies missing) but it looks promising!!
F runtime agnostic mcGDB support
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 22 / 24
![Page 76: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/76.jpg)
OpenMP/OMPss: runtime supportOpenMP/OMPss: runtime support
Intel OpenMP and Gomp:I breakpointsI libmcgdb-omp preloaded helper
F full support, main targets
OMPss tasks:I Some breakpoints, libmcgdb-omp not implemented
F only task supportI Initial support of Ayudame helper
F HLRS Ayudame/Temanejo targets for free
OMP Trace/Debugging InterfacesI No support :(task dependencies missing) but it looks promising!!
F runtime agnostic mcGDB support
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 22 / 24
![Page 77: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/77.jpg)
OpenMP/OMPss: runtime supportOpenMP/OMPss: runtime support
Intel OpenMP and Gomp:I breakpointsI libmcgdb-omp preloaded helper
F full support, main targets
OMPss tasks:I Some breakpoints, libmcgdb-omp not implemented
F only task supportI Initial support of Ayudame helper
F HLRS Ayudame/Temanejo targets for free
OMP Trace/Debugging InterfacesI No support :(task dependencies missing) but it looks promising!!
F runtime agnostic mcGDB support
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 22 / 24
![Page 78: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/78.jpg)
AgendaAgenda
1 Research Context
2 Research Context
3 Programming Model Centric Debugging
4 Case-Study Illustration: OpenMP
5 Conclusion
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 22 / 24
![Page 79: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/79.jpg)
Conclusion
OpenMP is a good target for model-centric debugging:I fork-join aware execution control and sequence diagram visualizationI tree-based callstack
I task graph visualizationI task dependency verification and visualization
OMP Trace API support would be great, but not yet possible
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 23 / 24
![Page 80: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/80.jpg)
Conclusion
OpenMP is a good target for model-centric debugging:I fork-join aware execution control and sequence diagram visualizationI tree-based callstack
I task graph visualizationI task dependency verification and visualization
OMP Trace API support would be great, but not yet possible
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 23 / 24
![Page 81: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/81.jpg)
Conclusion
OpenMP is a good target for model-centric debugging:I fork-join aware execution control and sequence diagram visualizationI tree-based callstack
I task graph visualizationI task dependency verification and visualization
OMP Trace API support would be great, but not yet possible
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 23 / 24
![Page 82: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/82.jpg)
Future work
Finish and polish array task dependency support
Validate with capture of KASTORS benchmark task graphI ... and benchmark mcGDB slowdown
OpenMP performance debugging/profiling: based on tasks?
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 24 / 24
![Page 83: Programming-Model Centric Debugging for OpenMP/OMPss · 2020-04-28 · Programming-Model Centric Debugging for OpenMP/OMPss Kevin Pouget Jean-Fran˘cois M ehaut, Miguel Santana Universit](https://reader034.vdocuments.site/reader034/viewer/2022042305/5ed072bb403b1d777903c305/html5/thumbnails/83.jpg)
Future work
Finish and polish array task dependency support
Validate with capture of KASTORS benchmark task graphI ... and benchmark mcGDB slowdown
OpenMP performance debugging/profiling: based on tasks?
Kevin Pouget Programming-Model Centric Debugging Nano2017/Dema Workshop 24 / 24