From add8a64936be1359cbf44a7f3483cfa2c763c157 Mon Sep 17 00:00:00 2001
From: jfe <git@jfengels.de>
Date: Sun, 2 Jun 2024 16:50:18 +0200
Subject: [PATCH] Some progress.

---
 _quarto.yml                     |  2 +-
 lectures/parallelism/slides.qmd | 34 ++++++++++++++++-----------------
 2 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/_quarto.yml b/_quarto.yml
index 2d41e32..606e6d9 100644
--- a/_quarto.yml
+++ b/_quarto.yml
@@ -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"
diff --git a/lectures/parallelism/slides.qmd b/lectures/parallelism/slides.qmd
index 59f9c6a..eaf7139 100644
--- a/lectures/parallelism/slides.qmd
+++ b/lectures/parallelism/slides.qmd
@@ -1,6 +1,6 @@
 ---
 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
-- 
GitLab