Closed adrianjhpc closed 2 years ago
[cceamgi@login13 python3_dask_pi_dir]$ ./run.sh
Calculating PI using:
10000000 slices
1 workers
Dask setup time: 0.5512979030609131 seconds
Obtained value of PI: 3.141592653589731
Time taken: 3.319666862487793 seconds
[cceamgi@login13 python3_dask_pi_dir]$ ./run.sh 10000000 10
Calculating PI using:
10000000 slices
10 workers
Dask setup time: 0.4764735698699951 seconds
Obtained value of PI: 3.1415926535897905
Time taken: 3.394249200820923 seconds
Am I using it right? This is on Myriad
Looking at htop
while I run the example I'm not even sure this is using multiple processes at all, otherwise the performance scaling would be very underwhelming. But probably I'm doing something wrong.
My bad, I've left thread based parallelism enabled, but that's blocked by the GIL. I'll update and it should work
Can you try again now
[cceamgi@login13 python3_dask_pi_dir]$ ./run.sh 20000000 1
Calculating PI using:
20000000 slices
1 workers
Dask setup time: 1.565711259841919 seconds
Obtained value of PI: 3.141592653589961
Time taken: 6.514402389526367 seconds
[cceamgi@login13 python3_dask_pi_dir]$ ./run.sh 20000000 10
Calculating PI using:
20000000 slices
10 workers
Dask setup time: 1.8686230182647705 seconds
Obtained value of PI: 3.1415926535897567
Time taken: 0.8722851276397705 seconds
[cceamgi@login13 python3_dask_pi_dir]$ ./run.sh 20000000 18
Calculating PI using:
20000000 slices
18 workers
Dask setup time: 2.286681890487671 seconds
Obtained value of PI: 3.1415926535897887
Time taken: 0.6200428009033203 seconds
Looks better now, thanks!
I humbly constribute an example using Dask as the parallelisation method from python3