Create a table with your results

Assignment Help Computer Engineering
Reference no: EM131465892

Introduction

This project involves an investigation of OpenMP scheduling. You will create a rumble between static scheduling vs. dynamic, and small vs. large chunksize.

You are deliberately giving each thread a very different amount of work to do and testing how OpenMP can best accomplish that.

Requirements

- Use OpenMP for this. Have a global floating-point Array whose size, ARRAYSIZE, is at least 32K (32*1024).
- Use a variety of different numbers of threads. Use at least 1, 2, and 4. You will get better results if you use more, maybe something like 1, 2, 4, 6, 8, 10, 12, 14, and 16. You can also use more if you'd like.
- Fill that array with ARRAYSIZE random floating-point numbers, e.g., Array[i] = Ranf( - 1.f, 1.f ); Why do this if we don't care about the answers? This keeps a smart compiler from trying to figure out what the answers are ahead of time and avoiding the computation altogether. Maybe I'm just paranoid.
- The outer for-loop loops through i = 0 ... ARRAYSIZE-1 iterations. For each of these iterations, an inner for-loop loops through j = 0 ... i and that many of the Array's floating- point numbers are multiplied, e.g., prod *= Array[j]
- #pragma the outer for-loop. You could, instead, #pragma the inner for-loop, but your performance would be slower. (Why?)
- Set the running product to 1. inside the outer for-loop, but outside the inner for-loop. This makes it a private variable for each thread.
- Test both static and dynamic scheduling and chunksizes of 1 and 4096. Thus, you will have 4 test cases and a range of thread numbers for each. Joe Parallel's spreadsheet looked like this:

- You can control static vs. dynamic scheduling and the chunksize by adding a clause to the end of the #pragma line. Use either schedule(static,1) or schedule(static,4096) or schedule(dynamic,1). or schedule(dynamic,4096).
- Record the data in units of something that gets larger as speed increases. Joe Parallel used "MegaMults Per Second".
long int numMuled = (long int)ARRAYSIZE * (long int)(ARRAYSIZE+1) / 2; // count of how many multiplications were done:

fprintf( stderr, "Threads = %2d; ChunkSize = %5d; Scheduling=static ; MegaMults/sec = %10.2lf\n", NUMT, CHUNKSIZE, (double)numMuled/(time1- time0)/1000000. );
but you can use anything that makes sense.
- Your commentary write-up (turned in as a PDF file) should include:

1. Tell what machine you ran this on
2. Create a table with your results.
3. Draw a graph. The X axis will be the number of threads. The Y axis will be the performance in whatever units you sensibly choose. On the same graph, plot 4 curves:
o static,1
o static,4096
o dynamic,1
o dynamic,4096
4. What patterns are you seeing in the speeds?
5. Why does chunksize 1 vs. 4096 matter like this?
6. Why does static vs. dynamic matter like this?

A Random Number Function
#include <stdlib.h> float
Ranf( float low, float high )
{
float r = (float) rand(); // 0 - RAND_MAX

return( low + r * ( high - low ) / (float)RAND_MAX );
}

Verified Expert

This project is implemented in C++ using open mp library. In this project I have implemented the openmp scheduling of for-loop using #pragma omp parallel for schedule (,[]) directive. The piece of code which is parallelized is computation of the mulitplication of array values of floating type. The openmp has an API support to set the number of threads for parallelizing the code. In this program I have used threads :1,2,4,6,8,10,12,14 and 16 and then computed speed of execution for static and dynamic schedule with chunk size of 1 and 4096.

Reference no: EM131465892

Questions Cloud

Example of the globalization of production : Which of the following is an example of the globalization of production?
What is good example of ethnocentric strategy of global hrm : What is a good example of an ethnocentric strategy of global HRM?
Juveniles should have the same expectation of privacy : Do you think juveniles should have the same expectation of privacy in their school lockers? Why or why not?
What is average inter-arrival time at self-service counter : Flying Lukas needs to check in at Philadelphia Airport to take his US Airway flight to Boston. What is new average inter-arrival time at a self-service counter?
Create a table with your results : Have a global floating-point Array whose size, ARRAYSIZE - Draw a graph. The X axis will be the number of threads.
Find the resultant of the concurrent forces r and s : Find the resultant of the concurrent forces R and S for which the direction is specified by slope, expressed as rise and run values. Show a sketch of R and S.
Colleges to make their teaching skills better : How has technology helped colleges to make their teaching skills better and to be able to do online courses and more.?
Identify exceptions to the exclusionary rule : Explain the common law background of the Fourth Amendment.Analyze the rationale and purpose of the exclusionary rule.
Communication over email when dealing with customers : Why would Teresa Carleo and Steve Martucci favor face-to-face communication over email when dealing with customers?

Reviews

inf1465892

5/9/2017 5:30:06 AM

It has been an extremely positive and wonderful experience working with you. On the off chance that I require any further help, I will definitely all you once more. Much appreciated once more.

len1465892

4/18/2017 1:29:36 AM

Grading: Feature Points Table of Results 30 Graph of Results 30 Good, insightful commentary 40 Potential Total 100 Why does chunksize 1 vs. 4096 matter like this? Why does static vs. dynamic matter like this?

len1465892

4/18/2017 1:29:09 AM

This project involves an investigation of OpenMP scheduling. You will create a rumble between static scheduling vs. dynamic, and small vs. large chunksize. You are deliberately giving each thread a very different amount of work to do and testing how OpenMP can best accomplish that.

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd