Question: Using C language : write a code Use MPI to implement the histogram program discussed in Section 2 . 7 . 1 . Have process

Using C language : write a code
Use MPI to implement the histogram program discussed in Section 2.7.1. Have process 0 read in the input
data and distribute it among the processes. Also have process 0 print out the histogram.
histogram program discussed:
let's look at a small example. Suppose we have a program that generates large quantities of floating point
data that it stores in an array. In order to get some feel for the distribution of the data, we can make a
histogram of the data. Recall that to make a histogram, we simply divide the range of the data up into
equal sized subintervals, or bins, determine the number of measurements in each bin, and plot a bar graph
showing the relative sizes of the bins. As a very small example, suppose our data are
1.3,2.9,0.4,0.3,1.3,4.4,1.7,0.4,3.2,0.3,4.9,2.4,3.1,4.4,3.9,0.4,4.2,4.5,4.9,0.9.
Then the data lie in the range 0-5, and if we choose to have five bins,
 Using C language : write a code Use MPI to implement

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!