Order Programming Language Assignment
Please download the attachment ‘MPI 01.tar.gz’ (Attached the file) and complete the following questions.
Q1: Understand the source code for each of the following five programs. Compile, run and paste one output sequence for each program.
(a) MPI-Hello.c (b) Ring-Example-1.c (c) Ring-Example-2.c
(d) Ring-Example-3.c (e) Send-Receive.c
Please download the attachment ‘MPI-02.tar.gz’ (Attached the file) and complete the four questions Q1 ~ Q4
Q1: Complete the program ‘Scatter-Reduce.c’ (Refer to ‘Scatter-Gather.c’) to compute the product of all elements in a given array.
Q2: Complete the program ‘Bcast-Reduce-Assignment.c’ (Refer to ‘Bcast-Reduce-Example.c’) to make the program have the output as follows if we run the program using 2 processes.
The input sequence is:
0 1 2 3
The output sequence is:
0 2 6 12
Order Programming Language Assignment
Q3: The MPI program ‘Standard-Deviation.c’ computes the standard deviation for an array of elements.(https://en.wikipedia.org/wiki/Standard_deviation Links to an external site.). Here, we assume that the maximum number of elements in the array is 10. Some necessary error checkings are performed to ensure that the number of inputs is correct and their values are valid. Please run the program using each of the following commands and submit your screenshots for the outputs.
(a) mpiexec -n 2 ./Stddev (b) mpiexec -n 2 ./Stddev 0 (c) mpiexec -n 3 ./Stddev 7
(d) mpiexec -n 3 ./Stddev 9 (e) mpiexec -n 4 ./Stddev 21
Q4: Complete the MPI program ‘Send-Receive-Checking’ to perform the necessary error checking for our previous example ‘Send-Receive.c’ to ensure that two processes are required for running the program.
Please download the attachment ‘MPI-01.tar.gz’ (Attached the file) and complete the two questions Q1 and Q2 by following the instructions below.
Q1: Complete the program ‘Ring-Assignment-1.c’ to make the program work well for any number of processes specified by users and have one possible output sequence as follows if we run the program using 4 processes.
Process 0: Token value is received from process 3
Process 2: Token value is received from process 1
Process 1: Token value is received from process 0
Process 3: Token value is received from process 2
Q2: Complete the program ‘Ring-Assignment-2.c’ to make the program have the same outputs as ‘Ring-Example-2.c’.
Please download the attachment ‘Project Description.pdf’ (Attached the file) and complete the question Q1 by following the instructions below.
Q1: Write an MPI program ‘Estimate-Pi.c’ from the scratch to estimate the value of Pi (π) using a Monte Carlo method. Your program should perform necessary error checking for inputs. Please see the project description ( Project-Description.pdf)
Complete the assignment by following the instructions.
1. In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n.
Example: 4! = 4*3*2*1 = 24 Note: 0! = 1
Write a Pthreads program ‘Factorial.c’ from the scratch to calculate the factorial of a given non-negative integer. Your program should perform necessary error checking for inputs.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more