I'm trying to run a function on different combination of all the elements in different arrays with dask, and I'm struggling to apply it.
The serial code is as below:
for i in range(5):
for j in range(5):
for k in range(5):
function(listA[i],listB[j],listC[k])
print(f'{i}.{j}.{k}')
k=k+1
j=j+1
i=i+1
This code running time on my computer is 18 min, while each array has only 5 elements, i want to run this code parallel with dask on bigger size of arrays. All the calculations inside the function doesn't independent on one another. You can assume that what the function does is: listA[i]*listB[j]*listC[k]
After searching a lot online, i couldn't find any solution. Much appreciate.