Programming-Model Centric Debugging for OpenMP Kevin Pouget - - PowerPoint PPT Presentation

programming model centric debugging for openmp
SMART_READER_LITE
LIVE PREVIEW

Programming-Model Centric Debugging for OpenMP Kevin Pouget - - PowerPoint PPT Presentation

Programming-Model Centric Debugging for OpenMP Kevin Pouget Jean-Fran cois M ehaut, Miguel Santana Universit e Grenoble Alpes / LIG, STMicroelectronics, France Nano2017-DEMA project Dema Workshop, Grenoble December 12 th , 2016 Kevin


slide-1
SLIDE 1

Programming-Model Centric Debugging for OpenMP

Kevin Pouget Jean-Fran¸ cois M´ ehaut, Miguel Santana

Universit´ e Grenoble Alpes / LIG, STMicroelectronics, France Nano2017-DEMA project

Dema Workshop, Grenoble December 12th, 2016

Kevin Pouget Programming-Model Centric Debugging Dema workshop 1 / 39

slide-2
SLIDE 2

Introduction Introduction

Today’s parallel computing

Multicore processors everywhere

◮ HPC systems, ◮ laptop and desktop computers, ◮ embedded systems ...

High-level programming environments Efficient verification & validation tools

Kevin Pouget Programming-Model Centric Debugging Dema workshop 2 / 39

slide-3
SLIDE 3

Introduction Introduction

Today’s parallel computing

Multicore processors everywhere

◮ HPC systems, ◮ laptop and desktop computers, ◮ embedded systems ...

High-level programming environments

◮ tasks with data-dependencies, ◮ fork-join parallelism ◮ =

⇒ OpenMP

Efficient verification & validation tools

Kevin Pouget Programming-Model Centric Debugging Dema workshop 2 / 39

slide-4
SLIDE 4

Introduction Introduction

Today’s parallel computing

Multicore processors everywhere

◮ HPC systems, ◮ laptop and desktop computers, ◮ embedded systems ...

High-level programming environments

◮ tasks with data-dependencies, ◮ fork-join parallelism ◮ =

⇒ OpenMP

Efficient verification & validation tools

◮ our research effort!

– – –

– What‘s

SoC’s

  • Kevin Pouget

Programming-Model Centric Debugging Dema workshop 2 / 39

slide-5
SLIDE 5

Agenda Agenda

1 Research Context 2 Programming Model Centric Debugging 3 Dema Year 1: Model-Centric Debugging for OpenMP 4 Dema Year 2: Interactive Performance Profiling and Debugging

Kevin Pouget Programming-Model Centric Debugging Dema workshop 3 / 39

slide-6
SLIDE 6

Agenda Agenda

1 Research Context 2 Programming Model Centric Debugging 3 Dema Year 1: Model-Centric Debugging for OpenMP 4 Dema Year 2: Interactive Performance Profiling and Debugging

Kevin Pouget Programming-Model Centric Debugging Dema workshop 3 / 39

slide-7
SLIDE 7

Verification and Validation: Debugging Verification and Validation: Debugging

Source-Level Interactive Debugging (e.g. GDB)

Developers mental representation VS. actual execution Understand the different steps of the execution

Kevin Pouget Programming-Model Centric Debugging Dema workshop 4 / 39

slide-8
SLIDE 8

Verification and Validation: Debugging Verification and Validation: Debugging

Source-level interactive debuggers operate at language-level.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 4 / 39

slide-9
SLIDE 9

Verification and Validation: Debugging Verification and Validation: Debugging

Source-level interactive debuggers operate at language-level. What about programming models?

Kevin Pouget Programming-Model Centric Debugging Dema workshop 4 / 39

slide-10
SLIDE 10

Verification and Validation: Debugging Verification and Validation: Debugging

Source-level interactive debuggers operate at language-level. What about programming models? They have no knowledge about high-level programming environments!

Kevin Pouget Programming-Model Centric Debugging Dema workshop 4 / 39

slide-11
SLIDE 11

Agenda Agenda

1 Research Context 2 Programming Model Centric Debugging 3 Dema Year 1: Model-Centric Debugging for OpenMP 4 Dema Year 2: Interactive Performance Profiling and Debugging

Kevin Pouget Programming-Model Centric Debugging Dema workshop 4 / 39

slide-12
SLIDE 12

Programming Model Centric Debugging Programming Model Centric Debugging

Objective

Provide developers with means to better 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 Dema workshop 5 / 39

slide-13
SLIDE 13

Programming Model Centric Debugging Programming Model Centric Debugging

Idea: Integrate programming model concepts in interactive debugging

Kevin Pouget Programming-Model Centric Debugging Dema workshop 5 / 39

slide-14
SLIDE 14

Programming Model Centric Debugging Programming Model Centric Debugging

1 Provide a Structural Representation

◮ Draw application architecture diagrams ◮ Represent the relationship between the entities

2 Monitor Dynamic Behaviors

◮ Monitor the collaboration between the tasks ◮ Detect communication, synchronization events

3 Interact with the Abstract Machine

◮ Control the execution of the entities ◮ Support interactions with real machine Kevin Pouget Programming-Model Centric Debugging Dema workshop 6 / 39

slide-15
SLIDE 15

Programming Model Centric Debugging Programming Model Centric Debugging

1 Provide a Structural Representation

◮ Draw application architecture diagrams ◮ Represent the relationship between the entities

2 Monitor Dynamic Behaviors

◮ Monitor the collaboration between the tasks ◮ Detect communication, synchronization events

3 Interact with the Abstract Machine

◮ Control the execution of the entities ◮ Support interactions with real machine Kevin Pouget Programming-Model Centric Debugging Dema workshop 6 / 39

slide-16
SLIDE 16

Programming Model Centric Debugging Programming Model Centric Debugging

1 Provide a Structural Representation

◮ Draw application architecture diagrams ◮ Represent the relationship between the entities

2 Monitor Dynamic Behaviors

◮ Monitor the collaboration between the tasks ◮ Detect communication, synchronization events

3 Interact with the Abstract Machine

◮ Control the execution of the entities ◮ Support interactions with real machine Kevin Pouget Programming-Model Centric Debugging Dema workshop 6 / 39

slide-17
SLIDE 17

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-18
SLIDE 18

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-19
SLIDE 19

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-20
SLIDE 20

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-21
SLIDE 21

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-22
SLIDE 22

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-23
SLIDE 23

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-24
SLIDE 24

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-25
SLIDE 25

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-26
SLIDE 26

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-27
SLIDE 27

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-28
SLIDE 28

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-29
SLIDE 29

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-30
SLIDE 30

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-31
SLIDE 31

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-32
SLIDE 32

Programming Model Centric Debugging Programming Model Centric Debugging

⇒ Detect and interpret the execution events of the runtime framework

Kevin Pouget Programming-Model Centric Debugging Dema workshop 7 / 39

slide-33
SLIDE 33

Information Capture Strategies Information Capture Strategies

Breakpoints and Debug Information Capturable Info. High Execution Overhead Significant Cooperation between Debugger and Env. None Portability Low

Kevin Pouget Programming-Model Centric Debugging Dema workshop 8 / 39

slide-34
SLIDE 34

Information Capture Strategies Information Capture Strategies

Breakpoints and Debug Information Preloaded Library Capturable Info. High Limited to API Execution Overhead Significant Limited Cooperation between Debugger and Env. None Low Portability Low Very Good

Kevin Pouget Programming-Model Centric Debugging Dema workshop 8 / 39

slide-35
SLIDE 35

Information Capture Strategies Information Capture Strategies

Breakpoints and Debug Information Preloaded Library Specialized Debug Module Capturable Info. High Limited to API Full Execution Overhead Significant Limited Limited Cooperation between Debugger and Env. None Low Strong Portability Low Very Good Vendor Specific

Kevin Pouget Programming-Model Centric Debugging Dema workshop 8 / 39

slide-36
SLIDE 36

Before DEMA Before DEMA

Model-Centric Debugging Before DEMA

components (STHORM NPM) dataflow (STHORM PEDF) kernel-based programming (GPU/STHORM OpenCL)

Kevin Pouget Programming-Model Centric Debugging Dema workshop 9 / 39

slide-37
SLIDE 37

Before DEMA Before DEMA

Model-Centric Debugging Before DEMA

components (STHORM NPM) dataflow (STHORM PEDF) kernel-based programming (GPU/STHORM OpenCL)

Kevin Pouget Programming-Model Centric Debugging Dema workshop 9 / 39

slide-38
SLIDE 38

Before DEMA Before DEMA

Dataflow Debugging

for ST/CEA MPSoC STHROM

logo by bullboykennels

Illustration 1: understanding a deadlock situation

Kevin Pouget Programming-Model Centric Debugging Dema workshop 10 / 39

slide-39
SLIDE 39

Dataflow Debugging: Deadlock Detection Dataflow Debugging: Deadlock Detection

(gdb) info threads

Id Target Id Frame 1 Thread 0xf7e77b 0xf7ffd430 in __kernel_vsyscall () * 2 Thread 0xf7e797

  • perator= (val=..., this=0xa0a1330)

Kevin Pouget Programming-Model Centric Debugging Dema workshop 11 / 39

slide-40
SLIDE 40

Dataflow Debugging: Deadlock Detection Dataflow Debugging: Deadlock Detection

(gdb) info threads

Id Target Id Frame 1 Thread 0xf7e77b 0xf7ffd430 in __kernel_vsyscall () * 2 Thread 0xf7e797

  • perator= (val=..., this=0xa0a1330)

(mcgdb) info graph

pred_controller ipred hwcfg pipe ipf

Kevin Pouget Programming-Model Centric Debugging Dema workshop 11 / 39

slide-41
SLIDE 41

Dataflow Debugging: Deadlock Detection Dataflow Debugging: Deadlock Detection

(gdb) info threads

Id Target Id Frame 1 Thread 0xf7e77b 0xf7ffd430 in __kernel_vsyscall () * 2 Thread 0xf7e797

  • perator= (val=..., this=0xa0a1330)

(mcgdb) info graph +state

pred_controller ipred hwcfg z pipe ipf Kevin Pouget Programming-Model Centric Debugging Dema workshop 11 / 39

slide-42
SLIDE 42

Dataflow Debugging: Deadlock Detection Dataflow Debugging: Deadlock Detection

(mcgdb) info graph +state

pred_controller ipred hwcfg z pipe ipf

(mcgdb) info actors +state

#0 Controller ‘pred_controller’: Blocked, waiting for step completion #1/2/3 Actors ‘pipe/ipref/ipf’: Blocked, reading from #4 ‘hwcfg’ #4 Actor ‘hwcfg’: Asleep, Step completed

Kevin Pouget Programming-Model Centric Debugging Dema workshop 11 / 39

slide-43
SLIDE 43

Dataflow Debugging: Deadlock Detection Dataflow Debugging: Deadlock Detection

(mcgdb) info graph +state

pred_controller ipred hwcfg z pipe ipf

(gdb) thread apply all where

Thread 1 (Thread 0xf7e77b): #0 0xf7ffd430 in __kernel_vsyscall () #1 0xf7fcd18c in pthread_cond_wait@ () #2 0x0809748f in wait_for_step_completion(struct... *) #3 0x0809596e in pred_controller_work_function() #4 0x08095cbc in entry(int, char**) ()

Kevin Pouget Programming-Model Centric Debugging Dema workshop 11 / 39

slide-44
SLIDE 44

Dataflow Debugging: Deadlock Detection Dataflow Debugging: Deadlock Detection

(mcgdb) info graph +state

pred_controller ipred hwcfg z pipe ipf

X

(gdb) thread apply all where

Thread 2 (Thread 0xf7e797): #0 operator= (val=..., this=0xa0a1330) #1 pipeRead (data=0) at pipeFilter.c:154 ւ 154 Smb = pedf.io.hwcfgSmb[count]; #2 0x0804da63 in PipeFilter_work_function () at pipe.c:361 #3 0x080a4132 in PedfBaseFilter::controller (this=0xa0d18)

Kevin Pouget Programming-Model Centric Debugging Dema workshop 11 / 39

slide-45
SLIDE 45

Before DEMA Before DEMA

OpenCL debugging

OpenCL (and Cuda)

Running on Sthorm, but primarily used with GPU Host-side debugging only BigDFT

Density functional theory solver

High performance computing Hybrid CPU/GPU MPI + OpenCL (C/Fortran) Illustration 2: Why execution visualization is needed

Kevin Pouget Programming-Model Centric Debugging Dema workshop 12 / 39

slide-46
SLIDE 46

Before DEMA: How execution visualization can help Before DEMA: How execution visualization can help

Let’s consider an example ...

C code

reductionKernel (int n, double * in, double * out){...} checkStatus(int * ptr, char * msg) { if(ptr == 0) exit(-1);} void main() { double * in = malloc(...) ; checkStatus(in,"in failed" ); double * out = malloc(...); checkStatus(out,"out failed" ); initialize(in); reductionKernel(N, in, out); // free ... }

Kevin Pouget Programming-Model Centric Debugging Dema workshop 13 / 39

slide-47
SLIDE 47

Before DEMA: How execution visualization can help Before DEMA: How execution visualization can help

OpenCL equivalent:

/* Instantiate the runtime. */ command_queue = clCreateCommandQueue((*context)->context, aDevices[0], 0, &ciErrNum); kerns->reduction_kernel_d=clCreateKernel(reductionProgram, "reductionKernel_d",&ciErrNum);

  • clErrorCheck(ciErrNum,"Failed to create kernel!");

/* Allocate the buffers on the GPU. */ *buff_ptr = clCreateBuffer((*context)->context, CL_MEM_READ_ONLY, *size, NULL, &ciErrNum);

  • clErrorCheck(ciErrNum,"Failed to create read buffer!");

/* Push the initial values to the GPU memory. */ cl_int ciErrNum = clEnqueueWriteBuffer((*command_queue)->command_queue, *buffer, CL_TRUE, 0, *size, p...

  • clErrorCheck(ciErrNum,"Failed to enqueue write buffer!");

/* Set the kernel parameters. */ clSetKernelArg(kernel, i++,sizeof(*ndat), (void*)ndat); clSetKernelArg(kernel, i++,sizeof(*in), (void*... clSetKernelArg(kernel, i++,sizeof(*out), (void*)out); clSetKernelArg(kernel, i++,sizeof(cl_dbl)*blk_... /* Trigger the kernel execution. */ ciErrNum = clEnqueueNDRangeKernel(command_queue->command_queue, kernel, 1, NULL, globalWorkSz, localWo...

  • clErrorCheck(errNum,"Failed to enqueue reduction kernel!");

/* Get the result back. */ cl_int ciErrNum = clEnqueueReadBuffer((*command_queue)->command_queue, *input, CL_TRUE, 0, sizeof(cl_d...

  • clErrorCheck(ciErrNum,"Failed to enqueue read buffer!");

/* Then release the memory ... */ Kevin Pouget Programming-Model Centric Debugging Dema workshop 14 / 39

slide-48
SLIDE 48

Programming Model Centric Debugging: (before Dema) Dataflo Programming Model Centric Debugging: (before Dema) Dataflo

(mcgdb) print flow

(an Eclipse visualization engine)

Update on user request / automatically on exec. stops, step-by-step, ...

Kevin Pouget Programming-Model Centric Debugging Dema workshop 15 / 39

slide-49
SLIDE 49

Programming Model Centric Debugging: (before Dema) Dataflo Programming Model Centric Debugging: (before Dema) Dataflo

(mcgdb) print flow

(an Eclipse visualization engine)

Set the kernel arguments.

◮ 2 scalars ◮ 2 GPU buffers

clSetKernelArg(kernel, i++, sizeof(*ndat),(void*)ndat); clSetKernelArg(kernel, i++, sizeof(*in), (void*)in); clSetKernelArg(kernel, i++, sizeof(*out), (void*)out); clSetKernelArg(kernel, i++, sizeof(*sz), (void*)sz);

Kevin Pouget Programming-Model Centric Debugging Dema workshop 15 / 39

slide-50
SLIDE 50

Programming Model Centric Debugging: (before Dema) Dataflo Programming Model Centric Debugging: (before Dema) Dataflo

(mcgdb) print flow

(an Eclipse visualization engine)

Set the kernel arguments.

◮ 2 scalars ◮ 2 GPU buffers

Trigger the kernel execution

◮ 2 buffers involved

ciErrNum = clEnqueueNDRangeKernel(command_queue->command_q, kernel, 1, NULL, globalWorkSz, localWorkSize, 0, NULL, NULL);

Kevin Pouget Programming-Model Centric Debugging Dema workshop 15 / 39

slide-51
SLIDE 51

Programming Model Centric Debugging: (before Dema) Dataflo Programming Model Centric Debugging: (before Dema) Dataflo

(mcgdb) print flow

(an Eclipse visualization engine)

Set the kernel arguments.

◮ 2 scalars ◮ 2 GPU buffers

Trigger the kernel execution

◮ 2 buffers involved

Retrieve the result

◮ buffer content is saved

cl_int ciErrNum = clEnqueueReadBuffer( (*command_queue)->command_queue, *input, CL_TRUE, 0, sizeof(cl_double),

  • ut, 0, NULL, NULL);

Kevin Pouget Programming-Model Centric Debugging Dema workshop 15 / 39

slide-52
SLIDE 52

Agenda Agenda

1 Research Context 2 Programming Model Centric Debugging 3 Dema Year 1: Model-Centric Debugging for OpenMP 4 Dema Year 2: Interactive Performance Profiling and Debugging

Kevin Pouget Programming-Model Centric Debugging Dema workshop 15 / 39

slide-53
SLIDE 53

Nano2017/Dema project Nano2017/Dema project

Debugging Embedded and Multicore Applications ARM Juno asymmetric arch. ARM big.litle + Mali GPU OpenMP Parallel Programming Fork/join multithreading Tasks with dependencies GNU Gomp, Intel OpenMP, ... mcGDB debugger Python extension of GDB Support for dataflow, components, ... Developed in partnership with ST

Kevin Pouget Programming-Model Centric Debugging Dema workshop 16 / 39

slide-54
SLIDE 54

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { ①// beginning of main function #pragma omp parallel { // beginning of parallel region #pragma omp single { // execute single }//implicit barrier #pragma omp critical { // execute critical }

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-55
SLIDE 55

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { // beginning of main function #pragma omp parallel { ①②③④// beginning of parallel region #pragma omp single { // execute single }//implicit barrier #pragma omp critical { // execute critical }

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-56
SLIDE 56

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { // beginning of main function #pragma omp parallel { ②③④// beginning of parallel region #pragma omp single { ①// execute single }//implicit barrier #pragma omp critical { // execute critical }

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-57
SLIDE 57

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { // beginning of main function #pragma omp parallel { // beginning of parallel region #pragma omp single { // execute single }①②③④//implicit barrier #pragma omp critical { // execute critical }

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-58
SLIDE 58

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { // beginning of main function #pragma omp parallel { // beginning of parallel region #pragma omp single { // execute single }//implicit barrier #pragma omp critical ①③④ { ② // execute critical }

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-59
SLIDE 59

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { // beginning of main function #pragma omp parallel { // beginning of parallel region #pragma omp single { // execute single }//implicit barrier #pragma omp critical ③④ { ①// execute critical }②

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-60
SLIDE 60

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { // beginning of main function #pragma omp parallel { // beginning of parallel region #pragma omp single { // execute single }//implicit barrier #pragma omp critical ④ { ③// execute critical }①②

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-61
SLIDE 61

OpenMP: OpenMP Execution Control OpenMP: OpenMP 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 8 omp critical next

int main() { // beginning of main function #pragma omp parallel { // beginning of parallel region #pragma omp single { // execute single }//implicit barrier #pragma omp critical { ④// execute critical }①②③

Kevin Pouget Programming-Model Centric Debugging Dema workshop 17 / 39

slide-62
SLIDE 62

OpenMP: structural representation OpenMP: 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 Dema workshop 18 / 39

slide-63
SLIDE 63

OpenMP: structural representation OpenMP: 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 Dema workshop 18 / 39

slide-64
SLIDE 64

OpenMP: structural representation OpenMP: 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 Dema workshop 18 / 39

slide-65
SLIDE 65

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-66
SLIDE 66

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-67
SLIDE 67

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-68
SLIDE 68

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-69
SLIDE 69

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-70
SLIDE 70

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-71
SLIDE 71

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-72
SLIDE 72

OpenMP: OpenMP Sequence Diagram OpenMP: OpenMP 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 Dema workshop 19 / 39

slide-73
SLIDE 73

OpenMP: structural representation OpenMP: 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 Dema workshop 20 / 39

slide-74
SLIDE 74

Task-Graph Visualization Task-Graph Visualization

(HLRS Stuttgart) Temanejo ... ✓ is a great visualization tool for task debugging, ✗ and does not support source-level debugging.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 21 / 39

slide-75
SLIDE 75

Task-Graph Visualization Task-Graph Visualization

(HLRS Stuttgart) Temanejo ... ✓ is a great visualization tool for task debugging, ✗ and does not support source-level debugging. GDB/mcGDB ... ✗ has no visualization engine, ✓ but provides source debugging at language (gdb) and model level.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 21 / 39

slide-76
SLIDE 76

Task-Graph Visualization Task-Graph Visualization

(HLRS Stuttgart) Temanejo ... ✓ is a great visualization tool for task debugging, ✗ and does not support source-level debugging. GDB/mcGDB ... ✗ has no visualization engine, ✓ but provides source debugging at language (gdb) and model level. So let’s combine them!

Kevin Pouget Programming-Model Centric Debugging Dema workshop 21 / 39

slide-77
SLIDE 77

Task-Graph Visualization Task-Graph Visualization

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 level execution control, memory inspection.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 22 / 39

slide-78
SLIDE 78

Task-Graph Visualization Task-Graph Visualization

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 level execution control, memory inspection.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 22 / 39

slide-79
SLIDE 79

Task-Graph Visualization Task-Graph Visualization

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 level execution control, memory inspection.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 22 / 39

slide-80
SLIDE 80

Task-Graph Visualization Task-Graph Visualization

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 level execution control, memory inspection.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 22 / 39

slide-81
SLIDE 81

mcGDB + Temanejo mcGDB + Temanejo

Node color

◮ sources files Kevin Pouget Programming-Model Centric Debugging Dema workshop 23 / 39

slide-82
SLIDE 82

mcGDB + Temanejo mcGDB + Temanejo

Node color

◮ sources files

Links color

◮ dependencies Kevin Pouget Programming-Model Centric Debugging Dema workshop 23 / 39

slide-83
SLIDE 83

mcGDB + Temanejo mcGDB + Temanejo

Node color

◮ sources files ◮ debug state

Links color

◮ dependencies

Task 3 blocked

blue finished purple blocked

Kevin Pouget Programming-Model Centric Debugging Dema workshop 23 / 39

slide-84
SLIDE 84

mcGDB + Temanejo mcGDB + Temanejo

Node color

◮ sources files ◮ debug state ◮ executed by

Links color

◮ dependencies

Task 3 blocked

blue finished purple blocked

  • Exec. finished

Kevin Pouget Programming-Model Centric Debugging Dema workshop 23 / 39

slide-85
SLIDE 85

Agenda Agenda

1 Research Context 2 Programming Model Centric Debugging 3 Dema Year 1: Model-Centric Debugging for OpenMP 4 Dema Year 2: Interactive Performance Profiling and Debugging

Kevin Pouget Programming-Model Centric Debugging Dema workshop 23 / 39

slide-86
SLIDE 86

Interactive Performance Debugging Interactive Performance Debugging

Performance Debugging Methodology

1 Benchmark the code 2 Locate the time-expensive areas 3 Estimate their (in)efficiency: how is the time spent? can it be reduced? 4 Optimize the code accordingly 5 Go back to step 1.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 24 / 39

slide-87
SLIDE 87

Interactive Performance Debugging Interactive Performance Debugging

Performance Debugging Methodology

1 Benchmark the code 2 Locate the time-expensive areas 3 Estimate their (in)efficiency: how is the time spent? can it be reduced? 4 Optimize the code accordingly 5 Go back to step 1.

Profiling tools

gprof perf stat, Papi trace-based analyzers (aftermath)

Kevin Pouget Programming-Model Centric Debugging Dema workshop 24 / 39

slide-88
SLIDE 88

Interactive Performance Debugging Interactive Performance Debugging

Performance Debugging Methodology

1 Benchmark the code 2 Locate the time-expensive areas 3 Estimate their (in)efficiency: how is the time spent? can it be reduced? 4 Optimize the code accordingly 5 Go back to step 1.

Profiling tools : not really interactive

gprof, perf stat, aftermath, . . .

◮ profile all or nothing (perf can attach/detach)

Papi

◮ customizable, but from within the code Kevin Pouget Programming-Model Centric Debugging Dema workshop 24 / 39

slide-89
SLIDE 89

Interactive Performance Debugging Interactive Performance Debugging

Performance Debugging Methodology

1 Benchmark the code 2 Locate the time-expensive areas 3 Estimate their (in)efficiency: how is the time spent? can it be reduced? 4 Optimize the code accordingly 5 Go back to step 1.

Source-level debuggers (gdb/mcgdb) have interactivity!

execute the code step-by-step, study the state, alter it to test hypotheses on-the-fly . . . but nothing for performance debugging!

Kevin Pouget Programming-Model Centric Debugging Dema workshop 24 / 39

slide-90
SLIDE 90

Interactive Performance Debugging Interactive Performance Debugging

Performance Debugging Methodology

1 Benchmark the code 2 Locate the time-expensive areas 3 Estimate their (in)efficiency: how is the time spent? can it be reduced? 4 Optimize the code accordingly 5 Go back to step 1.

Source-level debuggers (gdb/mcgdb) have interactivity!

execute the code step-by-step, study the state, alter it to test hypotheses on-the-fly . . . but nothing for performance debugging!

Kevin Pouget Programming-Model Centric Debugging Dema workshop 24 / 39

slide-91
SLIDE 91

Interactive Performance Debugging Interactive Performance Debugging

This is an on-going work

1 Interactive profiling

◮ What to measure? ◮ Where to profile?

2 OpenMP profiling 3 MG benchmark performance bug and mcGDB

◮ loop profiling ◮ intermediate profiling charts ◮ execution control and profiling ◮ performance optimization and results Kevin Pouget Programming-Model Centric Debugging Dema workshop 25 / 39

slide-92
SLIDE 92

Interactive Performance Debugging Interactive Performance Debugging

What to measure?

/proc/$PID/... values (mem usage, context switches, ...) gprof counters function/address execution counter (breakpoints involved) perf stat counters

Kevin Pouget Programming-Model Centric Debugging Dema workshop 26 / 39

slide-93
SLIDE 93

Interactive Performance Debugging Interactive Performance Debugging

What to measure?

/proc/$PID/... values (mem usage, context switches, ...) gprof counters function/address execution counter (breakpoints involved) perf stat counters

◮ cache-misses, cache-references ◮ instructions ◮ cpu-clock, task-clock ◮ node-load-misses, node-store-misses Kevin Pouget Programming-Model Centric Debugging Dema workshop 26 / 39

slide-94
SLIDE 94

Interactive Performance Debugging Interactive Performance Debugging

Where to profile?

During the execution:

◮ a function execution ◮ a region: from line ... to line ... (breakpoints involved) ◮ start and stop on user request

Outside of the normal execution (base on gdb+gcc dynamic compilation)

◮ code compiled on-demand and inserted in the process address-space ◮ custom function calls, ◮ repeat n times ◮ test different compilation flags, ... Kevin Pouget Programming-Model Centric Debugging Dema workshop 27 / 39

slide-95
SLIDE 95

Interactive Performance Debugging Interactive Performance Debugging

Where to profile?

During the execution:

◮ a function execution ◮ a region: from line ... to line ... (breakpoints involved) ◮ start and stop on user request ◮ what about OpenMP?

Outside of the normal execution (base on gdb+gcc dynamic compilation)

◮ code compiled on-demand and inserted in the process address-space ◮ custom function calls, ◮ repeat n times ◮ test different compilation flags, ... Kevin Pouget Programming-Model Centric Debugging Dema workshop 27 / 39

slide-96
SLIDE 96

OpenMP Profiling OpenMP Profiling

Profiling the whole execution: Aftermath1 Dema SP2 Fine-grain Interactive Profiling: mcGDB profiler

use mcGDB for a fine-grained profiling of loops and tasks use mcGDB to trigger the generation of on-going Aftermath traces

1http://www.openstream.info/aftermath Kevin Pouget Programming-Model Centric Debugging Dema workshop 28 / 39

slide-97
SLIDE 97

Before going further: mg.C performance bug Before going further: mg.C performance bug

performance bug on idchire (numa arch, 24 nodes, 192 cores) #pragma omp for /* mc.c function resid */ for (i3 = 1; i3 < n3-1; i3++) { for (i2 = 1; i2 < n2-1; i2++) { for (i1 = 0; i1 < n1; i1++) { u1[i1] = u[i3][i2-1][i1] + u[i3][i2+1][i1] + u[i3-1][i2][i1] + u[i3+1][i2][i1]; u2[i1] = u[i3-1][i2-1][i1] + u[i3-1][i2+1][i1] + u[i3+1][i2-1][i1] + u[i3+1][i2+1][i1]; } for (i1 = 1; i1 < n1-1; i1++) { r[i3][i2][i1] = v[i3][i2][i1] - a[0] * u[i3][i2][i1]

  • a[2] * (u2[i1] + u1[i1-1] + u1[i1+1])
  • a[3] * (u2[i1-1] + u2[i1+1]);

} } }

Kevin Pouget Programming-Model Centric Debugging Dema workshop 29 / 39

slide-98
SLIDE 98

Before going further: mg.C performance bug Before going further: mg.C performance bug

performance bug on idchire (numa arch, 24 nodes, 192 cores)

CPU 8 CPU 12 CPU 16 CPU 20 CPU 24 CPU 28 CPU 32 CPU 36 CPU 40 CPU 44 CPU 48 CPU 52 CPU 56 CPU 60 CPU 64 CPU 68 CPU 72 CPU 76 CPU 80 CPU 84 CPU 88 CPU 92 CPU 96 CPU 100 CPU 104 CPU 108 CPU 112 CPU 116 CPU 120 CPU 124 CPU 128 CPU 132 CPU 136 CPU 140 CPU 144 CPU 148 3.000e+12 3.100e+12 3.200e+12 3.300e+12 3.400e+12 3.500e+12 3.600e+12 3.700e+12 3.800e+12 3.900e+12 4.000e+12 4.100e+12 4.200e+12 4.300e+12 4.400e+12 4.500e+12 4.600e+12

Y axis is time

Kevin Pouget Programming-Model Centric Debugging Dema workshop 29 / 39

slide-99
SLIDE 99

Before going further: mg.C performance bug Before going further: mg.C performance bug

performance bug on idchire (numa arch, 24 nodes, 192 cores) Use mcGDB knowledge for a fine-grained profiling of loops and tasks attach/detach perf stat when a loop iteration starts/stops

◮ force sequentiality for accuracy / feasibility

| #23 loop profile | cache-references: 20,322 | cycles: 41,501,975 | node-stores: 2,828 | node-misses: 2,445 | instructions: 78,896,610 | omp_loop_len: 1 | omp_loop_start: 441 | numa node/code: 19/156 |

Kevin Pouget Programming-Model Centric Debugging Dema workshop 29 / 39

slide-100
SLIDE 100

mg.C performance bug: intermediate chart view mg.C performance bug: intermediate chart view

Instructions count sorted by numa core id; columns are loop iterations Two phases (2 then 1 chunk), but the instruction count is constant.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 30 / 39

slide-101
SLIDE 101

mg.C performance bug: intermediate chart view mg.C performance bug: intermediate chart view

Loop length and thread 1st loop index sorted by numa core id (hidden) (confirmation that the instruction count depends on the loop length)

Kevin Pouget Programming-Model Centric Debugging Dema workshop 31 / 39

slide-102
SLIDE 102

mg.C performance bug: intermediate chart view mg.C performance bug: intermediate chart view

Instructions count and cycles sorted by numa core id (hidden) With the same instruction count, some cores consume less cycles.

Kevin Pouget Programming-Model Centric Debugging Dema workshop 32 / 39

slide-103
SLIDE 103

mg.C performance bug: intermediate chart view mg.C performance bug: intermediate chart view

Cycles and node-misses sorted by numa core id (hidden) Low cycle count → low node misses = ⇒ numa memory-location problem

Kevin Pouget Programming-Model Centric Debugging Dema workshop 33 / 39

slide-104
SLIDE 104

OpenMP Profiling: mcGDB / Aftermath cooperation OpenMP Profiling: mcGDB / Aftermath cooperation

Cooperation with Aftermath

Correlation could have been highlighted with the help of Aftermath:

◮ (gdb) aftermath trace dump ◮ (gdb) aftermath visu reload ◮ (gdb) aftermath trace insert marker “stopped here”

= ⇒ preliminary code written this summer

Kevin Pouget Programming-Model Centric Debugging Dema workshop 34 / 39

slide-105
SLIDE 105

OpenMP Profiling: execution control and inspection OpenMP Profiling: execution control and inspection

Profiling breakpoint

(gdb) profile break if node-misses < 100

Loop control

(gdb) omp loop break before/after next

Numa-aware state inspection

(gdb) numa pagemap &r[$omp_loop_start()][0][0] | Address 0x7fdbc9336380 is located on node N12 (gdb) numa current_node | Thread #102 is bound to node N12, cpu 100.

https://forge.imag.fr/projects/pagemap by B. Videau et V. Danjean

Kevin Pouget Programming-Model Centric Debugging Dema workshop 35 / 39

slide-106
SLIDE 106

OOpenMP Profiling: numa optimizations OOpenMP Profiling: numa optimizations

(gdb) run # on breakpoint after memory alloc 19s + 54s # init and compute time normal run, launched from shell or GDB

Kevin Pouget Programming-Model Centric Debugging Dema workshop 36 / 39

slide-107
SLIDE 107

OOpenMP Profiling: numa optimizations OOpenMP Profiling: numa optimizations

(gdb) run # on breakpoint after memory alloc 19s + 54s # init and compute time normal run, launched from shell or GDB (gdb) numa spread_heap # on breakpoint after memory alloc 20s + 13s spreads the whole heap (3GB) over the nodes, page by page

⇒ confirmation of numa memory-location problem

Kevin Pouget Programming-Model Centric Debugging Dema workshop 36 / 39

slide-108
SLIDE 108

OOpenMP Profiling: numa optimizations OOpenMP Profiling: numa optimizations

(gdb) run # on breakpoint after memory alloc 19s + 54s # init and compute time normal run, launched from shell or GDB (gdb) numa spread_heap # on breakpoint after memory alloc 20s + 13s spreads the whole heap (3GB) over the nodes, page by page

⇒ confirmation of numa memory-location problem

(gdb) numa spread_3D_mat r[$i] m3[$i] m2[$i] m1[$i] 34s + 16s # i=9 and m3[$i]=m2[$i]=m1[$i]=514 spread only r[9] and u[9] 3D matrices spread them according to OpenMP static loop distribution

⇒ confirmation of numa memory-location problem

Kevin Pouget Programming-Model Centric Debugging Dema workshop 36 / 39

slide-109
SLIDE 109

Before going further: mg.C performance bug Before going further: mg.C performance bug

Back to Aftermath for comparison ... 1/Native execution

CPU 8 CPU 12 CPU 16 CPU 20 CPU 24 CPU 28 CPU 32 CPU 36 CPU 40 CPU 44 CPU 48 CPU 52 CPU 56 CPU 60 CPU 64 CPU 68 CPU 72 CPU 76 CPU 80 CPU 84 CPU 88 CPU 92 CPU 96 CPU 100 CPU 104 CPU 108 CPU 112 CPU 116 CPU 120 CPU 124 CPU 128 CPU 132 CPU 136 CPU 140 CPU 144 CPU 148 3.000e+12 3.100e+12 3.200e+12 3.300e+12 3.400e+12 3.500e+12 3.600e+12 3.700e+12 3.800e+12 3.900e+12 4.000e+12 4.100e+12 4.200e+12 4.300e+12 4.400e+12 4.500e+12 4.600e+12

Kevin Pouget Programming-Model Centric Debugging Dema workshop 37 / 39

slide-110
SLIDE 110

Before going further: mg.C performance bug Before going further: mg.C performance bug

Back to Aftermath for comparison ... 2/Heap spread

CPU 4 CPU 8 CPU 12 CPU 16 CPU 20 CPU 24 CPU 28 CPU 32 CPU 36 CPU 40 CPU 44 CPU 48 CPU 52 CPU 56 CPU 60 CPU 64 CPU 68 CPU 72 CPU 76 CPU 80 CPU 84 CPU 88 CPU 92 CPU 96 CPU 100 CPU 104 CPU 108 CPU 112 CPU 116 CPU 120 CPU 124 CPU 128 CPU 132 CPU 136 CPU 140 4.800e+11 4.900e+11 5.000e+11 5.100e+11 5.200e+11 5.300e+11 5.400e+11 5.500e+11 5.600e+11 5.700e+11

Kevin Pouget Programming-Model Centric Debugging Dema workshop 37 / 39

slide-111
SLIDE 111

Before going further: mg.C performance bug Before going further: mg.C performance bug

Back to Aftermath for comparison ... 3/Matrix remapped

CPU 4 CPU 8 CPU 12 CPU 16 CPU 20 CPU 24 CPU 28 CPU 32 CPU 36 CPU 40 CPU 44 CPU 48 CPU 52 CPU 56 CPU 60 CPU 64 CPU 68 CPU 72 CPU 76 CPU 80 CPU 84 CPU 88 CPU 92 CPU 96 CPU 100 CPU 104 CPU 108 CPU 112 CPU 116 CPU 120 CPU 124 CPU 128 CPU 132 CPU 136 CPU 140 4.600e+11 4.700e+11 4.800e+11 4.900e+11 5.000e+11 5.100e+11 5.200e+11 5.300e+11 5.400e+11

Kevin Pouget Programming-Model Centric Debugging Dema workshop 37 / 39

slide-112
SLIDE 112

Conclusion Conclusion

Debuggers lack information about

◮ programming models ◮ runtime libraries ◮ architectures

They could benefit from additional knowledge

◮ to provide a better code execution understanding

Our contribution: model-centric interactive debugging and profiling mcGDB extends GDB through its Python interface:

◮ Extensible framework for model-centric debugging

and performance testing and profiling

mcGDB OpenMP support:

◮ Developed for GNU Gomp and Intel OpenMP ◮ Better control and understanding of fork-join / task-based execution ◮ Fine-grained loop and task performance profiling Kevin Pouget Programming-Model Centric Debugging Dema workshop 38 / 39

slide-113
SLIDE 113

Conclusion Conclusion

Debuggers lack information about

◮ programming models ◮ runtime libraries ◮ architectures

They could benefit from additional knowledge

◮ to provide a better code execution understanding

Our contribution: model-centric interactive debugging and profiling mcGDB extends GDB through its Python interface:

◮ Extensible framework for model-centric debugging

and performance testing and profiling

mcGDB OpenMP support:

◮ Developed for GNU Gomp and Intel OpenMP ◮ Better control and understanding of fork-join / task-based execution ◮ Fine-grained loop and task performance profiling Kevin Pouget Programming-Model Centric Debugging Dema workshop 38 / 39

slide-114
SLIDE 114

Conclusion Conclusion

Debuggers lack information about

◮ programming models ◮ runtime libraries ◮ architectures

They could benefit from additional knowledge

◮ to provide a better code execution understanding

Our contribution: model-centric interactive debugging and profiling mcGDB extends GDB through its Python interface:

◮ Extensible framework for model-centric debugging

and performance testing and profiling

mcGDB OpenMP support:

◮ Developed for GNU Gomp and Intel OpenMP ◮ Better control and understanding of fork-join / task-based execution ◮ Fine-grained loop and task performance profiling Kevin Pouget Programming-Model Centric Debugging Dema workshop 38 / 39

slide-115
SLIDE 115

Conclusion Conclusion

Debuggers lack information about

◮ programming models ◮ runtime libraries ◮ architectures

They could benefit from additional knowledge

◮ to provide a better code execution understanding

Our contribution: model-centric interactive debugging and profiling mcGDB extends GDB through its Python interface:

◮ Extensible framework for model-centric debugging

and performance testing and profiling

mcGDB OpenMP support:

◮ Developed for GNU Gomp and Intel OpenMP ◮ Better control and understanding of fork-join / task-based execution ◮ Fine-grained loop and task performance profiling Kevin Pouget Programming-Model Centric Debugging Dema workshop 38 / 39

slide-116
SLIDE 116

Programming-Model Centric Debugging for OpenMP

Kevin Pouget Jean-Fran¸ cois M´ ehaut, Miguel Santana

Universit´ e Grenoble Alpes / LIG, STMicroelectronics, France Nano2017-DEMA project

Dema Workshop, Grenoble December 12th, 2016

Kevin Pouget Programming-Model Centric Debugging Dema workshop 39 / 39