Question: answer with C language Q1/ Write an MPI program to implement the flow of events as follows: 1- Create an array 2- Root process (process
answer with C language
Q1/ Write an MPI program to implement the flow of events as follows: 1- Create an array 2- Root process (process 0) initializes the array. 3- PO distributes the array over other processes. (All processes must have equal number of elements including Po). 4- All processes search the array for value 10. Print index of the element matches the search value. 5- Each process finds maximum value of their subset numbers. 6- Root process finds the one maximum value of the array among maximum of all processes. 7- Print maximum value. Note: use collective communication functions whenever possible. Q2/ Write an open MP program to: 1- Input a number 2- Print maximum number of available threads. 3- Find factorial of the number. 4- Print number of threads that are active inside the pragma Q1/ Write an MPI program to implement the flow of events as follows: 1- Create an array 2- Root process (process 0) initializes the array. 3- PO distributes the array over other processes. (All processes must have equal number of elements including Po). 4- All processes search the array for value 10. Print index of the element matches the search value. 5- Each process finds maximum value of their subset numbers. 6- Root process finds the one maximum value of the array among maximum of all processes. 7- Print maximum value. Note: use collective communication functions whenever possible. Q2/ Write an open MP program to: 1- Input a number 2- Print maximum number of available threads. 3- Find factorial of the number. 4- Print number of threads that are active inside the pragma
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
