Question: Task 2: Data Partition in Parallel Version Let us assume that we have p cores (or launch p processes) in the parallelism context. Each core

 Task 2: Data Partition in Parallel Version Let us assume that

Task 2: Data Partition in Parallel Version Let us assume that we have p cores (or launch p processes) in the parallelism context. Each core has a unique rank in the range from 0 to p-1. Given n consecutive integer numbers starting with an integer number a, let us partition these n consecutive numbers into p chunks and each process calculates a partial sum of consecutive integer numbers in the assigned chunk. Answer the following two questions 1) how many exact additions should a process take in calculating the partial sum? 2) what could be the start integer number and end integer number of the chunk assigned to a process i for calculating the partial sum? > Submission task 1: write down a formula which consists of a, n, and p for each question. Hint: First decide the size of a chunk and then decide the local first or last number in a process. You could consider two cases: 1) n is divisible by p and n>p. 2) n is not divisible by p. For each case, devise an expression to calculate my first and my_last

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!