3. Use the integral y = sin x
Related questions
Question
100%
dont reject pls

Transcribed Image Text:Assignment 3 due on 19th Nov 2021 (6%)
Name:
Matric #:
Do the following task (45 marks):
1. Write a sequential program for numerical integration using Midpoint, Trapezoid,
Simpson's 1/3 rule, and Monte Carlo methods.
2. Transform the programs above into parallel program using MPI. You can use any
parallelization technique such as data partition, task partition, divide-and-conquer, or
other approaches. Use the default number of processors that are supported by your
computer, i.e., p = 4.
3. Use the integral
y =
sin x
4. Create the subintervals, h, up to 5000, if your system does not cause any memory leak.
Record the execution time between sequential and parallel executions and the results of
the integration in a table. Then, plot a graph with fixed number of processors, but
different values of h with its corresponding execution time, compute the speed up factor
and efficiency of your parallelism.
a. Your program shall be able to read number of subintervals from user command
prompt and display the timing at the end of execution for both sequential and
parallel programming. (5m)
b. Your report must contain: table, graphs, description of observation and result,
free from compilation error, well documented comments in the source code,
instructions how to compile and execute your programs. (40m)
5. Submit sequential.c or sequential.m and parallel.c or parallel.m files with the report. Zip
them and submit through eleap system with 'matric#_yourname.zip' BEFORE due date.
6. Collaboration:
You may discuss all aspects of the program with your classmates. However, you should
never show any of your code to another student, and you should never copy anyone
else's code without an explicit acknowledgment.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
