Write a parallel MPI code to compute the sum of the first N integer numbers (1 +
Question:
Write a parallel MPI code to compute the sum of the first N integer numbers (1 + 2 + 3 + … + N) using multiple processors. The work of computing the sum should be divided among the processors. The manager processor should print the total sum on the screen.
• Name your parallel code mpi_sum.c
• N should be user input
• The code should be able to run on any number of processors (assume p<
• Comment and ident your code properly.
• Use only point-to-point communication
• Also add a header to your code with your name, course and homework number.
• Provide evidence that your code is producing the correct result.
This is just basic MPI in C. Take user input and sum up numbers from 1 to N by distributing work among processors, then print the result to the terminal.