Get total num of tasks and assign id for each task to simulate scatter/gather
Implement calculation logic