You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/lecture_10/lecture.md
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,33 @@ Julia offers different levels of parallel programming
7
7
8
8
In this lecture, we will focus mainly on the first two, since SIMD instructions are mainly used for optimization of loops, and task switching is not a true paralelism, but allows to run a different task when one task is waiting for example for IO.
9
9
10
+
## controller / worker model of parallel processes
11
+
- the usual remote fetch call
12
+
- solve monte carlo
13
+
- pmap
10
14
15
+
- how to set up workers,
16
+
+ how to load functions, modules
17
+
+ julia -p 16 -L load_my_script.jl
18
+
- how to send data / how to define variable on remote process
19
+
20
+
## Synchronization primitives
21
+
- Channels and their guarantees
22
+
- How to orchestrate workers by channels
23
+
- how to kill the remote process with channel
24
+
25
+
## Sending data
26
+
- Do not send `randn(1000, 1000)`
27
+
- Serialization is very time consuming, an efficient converstion to something simple might be wort
28
+
- Dict("a" => [1,2,3], "b" = [2,3,4,5]) -> (Array of elements, array of bounds, keys)
11
29
12
30
## Multi-Threadding
31
+
- Locks / lock-free multi-threadding
32
+
- Show the effect of different schedullers
33
+
- intra-model parallelism
34
+
- sucks when operating with Heap
35
+
36
+
## Julia sets
13
37
An example adapted from [Eric Aubanel](http://www.cs.unb.ca/~aubanel/JuliaMultithreadingNotes.html).
14
38
15
39
For ilustration, we will use Julia set fractals, ad they can be easily paralelized. Some fractals (Julia set, Mandelbrot) are determined by properties of some complex-valued functions. Julia set counts, how many iteration is required for ``f(z)=z^2+c`` to be bigger than two in absolute value, ``|f(z)>=2``. The number of iterations can then be mapped to the pixel's color, which creates a nice visualization we know.
@@ -150,4 +174,13 @@ function juliaset_folds!(img, c, n)
0 commit comments