Difference between revisions of "OpenMP in Small Bites/Tasking"
OpenMP in Small Bites/Tasking
Jump to navigation
Jump to search
m (Adapt aspect ration of video embedding) |
|||
| Line 8: | Line 8: | ||
== Quiz == | == Quiz == | ||
| + | {{hidden begin | ||
| + | |title = 1. What is the default data scoping of a variable in a task scope? Hint: Assume that the variable is declared before the task region, but in the same function. | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | - Always <code>firstprivate</code>. | ||
| + | || Wrong. | ||
| + | + <code>firstprivate</code> unless shared in the enclosing context. | ||
| + | || Correct. | ||
| + | - <code>shared</code> unless fristprivate in the enclosing context. | ||
| + | || Correct. | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = 2. Which tasks are synchronized with by a <code>taskyield</code> construct? | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | - All tasks of the same thread team. | ||
| + | || | ||
| + | - All desendant tasks. | ||
| + | || | ||
| + | + The direct child tasks. | ||
| + | || | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
| + | |||
| + | {{hidden begin | ||
| + | |title = 3. Why can it be benficial for the performance to use cut-off strategies for task-based OpenMP programs? | ||
| + | }} | ||
| + | <quiz display=simple> | ||
| + | { | ||
| + | |type="()"} | ||
| + | + It can avoid overhead caused by too fine-grained tasks. | ||
| + | || Correct. | ||
| + | - It can synchonize tasks faster. | ||
| + | || Wrong. | ||
| + | - It can accelerate task stealing be enforcing one task queue per thread. | ||
| + | || Wrong. | ||
| + | </quiz> | ||
| + | {{hidden end}} | ||
Revision as of 17:00, 30 November 2020
| Tutorial | |
|---|---|
| Title: | OpenMP in Small Bites |
| Provider: | HPC.NRW
|
| Contact: | tutorials@hpc.nrw |
| Type: | Multi-part video |
| Topic Area: | Programming Paradigms |
| License: | CC-BY-SA |
| Syllabus
| |
| 1. Overview | |
| 2. Worksharing | |
| 3. Data Scoping | |
| 4. False Sharing | |
| 5. Tasking | |
| 6. Tasking and Data Scoping | |
| 7. Tasking and Synchronization | |
| 8. Loops and Tasks | |
| 9. Tasking Example: Sudoku Solver | |
| 10. Task Scheduling | |
| 11. Non-Uniform Memory Access | |
Video
Quiz
1. What is the default data scoping of a variable in a task scope? Hint: Assume that the variable is declared before the task region, but in the same function.
2. Which tasks are synchronized with by a
taskyield construct?
3. Why can it be benficial for the performance to use cut-off strategies for task-based OpenMP programs?