Interesting, when I ran the parallel helloworld code I did get the following output hello(0) world(0) hello(4) world(4) hello(2) world(2) .... I did not see interleaving. I had to put a time delay (time based on thread ID) in between the hello and world print statements to see the interleaving and then be certain that the threads were not being run in serial.
Hey Tim, you're awesome! Thank you. 5 years later from the video, I found it and learnt how important is shared variable in Parallel programming.
This is an absolutely excellent presentation of OpenMP intro.
Interesting, when I ran the parallel helloworld code I did get the following output
hello(0) world(0)
hello(4) world(4)
hello(2) world(2)
....
I did not see interleaving. I had to put a time delay (time based on thread ID) in between the hello and world print statements to see the interleaving and then be certain that the threads were not being run in serial.
difficult to write code that is race free? dude, Rust 1.0 was already out at this time.