Suppose comm sz = 4 and suppose that x is a vector with n = 14 components.
a. How would the components of x be distributed among the processes in a program that used a block distribution?
b. How would the components of x be distributed among the processes in a program that used a cyclic distribution?
c. How would the components of x be distributed among the processes in a program that used a block-cyclic distribution with blocksize b = 2?
You should try to make your distributions general so that they could be used regardless of what comm sz and n are. You should also try to make your distributions “fair” so that if q and r are any two processes, the difference between the number of components assigned to q and the number of components assigned to r is as small as possible.
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.