openmp dynamic scheduling

Use this forum to discuss the book: Using OpenMP - Portable Shared Memory Parallel Programming, by Barbara Chapman, Gabriele Jost and Ruud van der Pas Read the viewtopic.php?f=8&t=465 for book info and to download the examples. Post your feedback about the book and examples to this forum

openmp dynamic scheduling

Postby JC1119 » Fri Mar 11, 2016 4:29 pm

I'm new to openMP and parallel programming.
Given a very simple program as following:
#pragma omp parallel for num_threads(2)
for(k = 1; k <= 16; ++k)
a[k] = f(k); // this line costs T(k).
And these are the cost functions:
T(1) = 1, T(5)=5, T(9) = 9, T(13)=13
T(2) = 1, T(6)=3, T(10)=5, T(14)=7
T(3) = 3, T(7)=7, T(11)=11, T(15)=15
T(4) = 1, T(8)=1, T(12)=3, T(16)=1
The question is to compute the parallel runtime for (dynamic,1) to (dynamic,4).
Need detailed explanation.
JC1119
 
Posts: 1
Joined: Fri Mar 11, 2016 3:52 pm

Return to Using OpenMP - The Book and Examples

Who is online

Users browsing this forum: No registered users and 1 guest

cron