Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture materials
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
generic software skills
lecture materials
Commits
add8a649
Commit
add8a649
authored
10 months ago
by
Jan Frederik Engels
Browse files
Options
Downloads
Patches
Plain Diff
Some progress.
parent
625e2593
No related branches found
Branches containing commit
No related tags found
1 merge request
!72
Draft: Compute devices lecture
Pipeline
#69533
passed
10 months ago
Stage: test
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_quarto.yml
+1
-1
1 addition, 1 deletion
_quarto.yml
lectures/parallelism/slides.qmd
+16
-18
16 additions, 18 deletions
lectures/parallelism/slides.qmd
with
17 additions
and
19 deletions
_quarto.yml
+
1
−
1
View file @
add8a649
...
...
@@ -52,7 +52,7 @@ website:
-
"
exercises/user-experience.qmd"
# - "exercises/testing.qmd"
# - "exercises/git2.qmd"
#
- "exercises/parallelism.qmd"
-
"
exercises/parallelism.qmd"
# - "exercises/hardware.qmd"
# - "exercises/file_and_data_systems.qmd"
# - "exercises/memory_hierarchies.qmd"
...
...
This diff is collapsed.
Click to expand it.
lectures/parallelism/slides.qmd
+
16
−
18
View file @
add8a649
---
title: "Parallelism"
author: "
CF, GM, JFE FIXME
"
author: "
Georgiana Mania, Claudia Frauen, Jan Frederik Engels
"
---
# Motivation
...
...
@@ -11,18 +11,14 @@ author: "CF, GM, JFE FIXME"
* Use independent compute resources for each piece
* Outlook for next week: The individual computing element does no longer
get much faster, but there are more of them
* FIXME: What else?
## This lecture
* Is mostly about parallelism as a concept
* Next week:
Hardware using this concept
* Next week:
Complications due to existing hardware
[comment]: # (Thinking about it, I think we should not give a theoretical definition here,
but first give the example and explain parallelism there. Eventually, with the
task-parallelism we should probably give a real definition and different flavours.)
# Our example problem
...
...
@@ -41,8 +37,16 @@ FIXME show plot of a soliton
::::
# Our example problem
FIXME
show some central loop
```c
while ( t < 50 ){
//[...]
for(i=0; i<npoints; i++){
//[...]
u[i]=u2[i]-(delta_t/delta_x)*lu(h1,u1,i);
h[i]=h2[i]-(delta_t/delta_x)*lh(h1,u1,i);
}
}
```
# Decomposing problem domains
## Our problem domain
...
...
@@ -115,8 +119,11 @@ time ./serial.x # use `time` to check the runtime
3. Compile and run the example using OpenMP
```bash
gcc -fopenmp main.c -o parallel.x -lm
OMP_NUM_THREADS=2
time
./parallel.x
time
OMP_NUM_THREADS=2 ./parallel.x
```
FIXME: time is often a shell builtin, so output varies and also the place
where the env-var needs to be set.
4. See next slide!
# Hands-on Session! {background-color=var(--dark-bg-color) .leftalign}
...
...
@@ -442,15 +449,6 @@ S1 and S2 can NOT be executed in parallel!
* Parallelisation should not change the results! Exceptions to be discussed next week!
# FIXME
* Homework:
* Revisit `schedule` and try `dynamic` and explain why that happens.
* Parallelize the loop in `maxval`.
* Do a strong-scaling experiment starting with 2 threads and up to 32
threads and plot the result.
* If you were to increase the number of threads, do you expect the speedup
to continue indefinitely? If not, which limits can you imagine? Feel free
to use kitchen metaphors.
# Additional reading
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment