carstenbauer / parallel-julia-zoo

MIT License
2 stars 1 forks source link

add increasingly slow loop example #1

Closed Moelf closed 9 months ago

carstenbauer commented 10 months ago

This is a mapreduce with f=fib. I would use a local summation for each task and only write to the outer array once at the end. See the mapreduce folder.

carstenbauer commented 10 months ago

Btw, we also need a nested example and Fibonacci could be a candidate for this. (But we can also take something basic)

Moelf commented 10 months ago

How about I convert this to nested example, at which level do we parallel?

carstenbauer commented 9 months ago

Hm, maybe Fibonacci isn't the best example after all. What we want is likely the following: a simple parallel program that we then run as part of a parallel reduction. I.e. a parallel mapreduce(f, +, ...) where f is also parallelised (and produces uniform workload). However, to be able to use and compare @threads, we need a for-loop kind of parallelization and this is probably non-trivial for Fibonacci (although potentially doable). I think we should just choose any simple and convenient parallel algorithm.

(Maybe a basic parallel matmul could be a choice for f? Or the standard parallel pi computation? I'm not very creative right now 😄)