Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ // dotprod.c #include #include #include #include #define SIZE 10000000 volatile float a[SIZE]; volatile float b[SIZE]; int main(int argc, char **argv) { long int i;

image text in transcribed ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ // dotprod.c

#include #include #include #include

#define SIZE 10000000

volatile float a[SIZE]; volatile float b[SIZE];

int main(int argc, char **argv) { long int i; double sum; struct timeval time1, time2;

srand(time(0)); for (i = 0; i

gettimeofday(&time2, 0); printf("Elapsed time (us) = %d ", (time2.tv_sec-time1.tv_sec)*1000000 + time2.tv_usec - time1.tv_usec);

return 0; }

What code do you need to add to the program? What MPI primitives are useful? Write a parallel MPI version of dotprod.c. Run your resulting code on different number of processors and produce a plot of speedup versus number of processors up to 16 processors. How do you get statistically sound measurements? For each point what efficiency do you get? What do you think are the underlying overheads leading to the efficiency. What code do you need to add to the program? What MPI primitives are useful? Write a parallel MPI version of dotprod.c. Run your resulting code on different number of processors and produce a plot of speedup versus number of processors up to 16 processors. How do you get statistically sound measurements? For each point what efficiency do you get? What do you think are the underlying overheads leading to the efficiency

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

Connect with your audience

Answered: 1 week ago