For each question parallelize the program using openmp


For each question, parallelize the program using OpenMP. Present the results for each processor type (dual or quad) as a table of run time and scalability (wrt sequential and OpenMP on 1 thread). Comment on the results. 
1. Use OpenMP to parallelize the algorithm described in the lectures for calculating pi by integration 4/1+x*x from 0 to 1. Use 10,000,000 slices. 
A. Run the code sequentially and using OpenMP on both both dual core and quad core nodes using 1, 2, 3, 4, and 8 threads and time the results. 
B. Modify the code to run similar tests using dynamic and guided scheduling. 
C. List the various run times and scalibility in seperate tables for each type of scheduling and comment on the scalability of each scheduling type and draw conclusions as to which is preferable (and in what circumstances).

Note: when timing the output remember not to print anything while timing. 
2. Write code to use the Monte Carlo method to compute pi, and parallelize it using OpenMP. Use 1,000,000 tests. Run it sequentially and using OpenMP on 1, 2, 3, 4, and 8 threads and time the results, on dual core and quad core nodes. 
Recall the discussion about thread safe libraries and the need to ensure that the pseudo-random sequences used by different threads are in fact different. Comment on the results. 
3. Implement and check the time to do a matrix-matrix product of a 1000x500 matrix with a 500x800 matrix of floats sequentially and using 1,2,3,4, and 8 threads on dual and quad core processors. 
Present a table of the run times and scalability and comment on the results.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: For each question parallelize the program using openmp
Reference No:- TGS0128796

Expected delivery within 24 Hours