Question: Write a program that uses MPI to check the maximum number of an array of integers. Your program must take as a command line argument
Write a program that uses MPI to check the maximum number of an array of integers. Your program must take as a command line argument the name of a file containing an array of integers and prints its maximum.
Test your program on the file Array.txt that is provided to you. This file contains an array of 100000 integers.
Your program should print for each process the following output: The local maximum found by process i is n , where i is the rank of the process, and n is the local maximum found by this process. Your program should also print: The global maximum found is m , where m is the value of the global maximum of the array.
Save your program with the name YourName_Prob3.c.
Note: Include a Read-Me file including your name, in addition to how to compile and run the program
FOR the input it an array of 100000 integers i can provide them if needed.Thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
