View Single Post
  #1  
Old 11-26-2011, 03:12
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,116
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 110
Thanks Rcvd at 220 Times in 126 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
Intel, Parallelism and OpenMP

Hi,

I'm using OpenMP under the Intel compiler suite. Take a for() loop, like :

for(i=0; i<k; i++)
...

Intel docs makes the statement to NOT use the auto parallel pragmas if the value of 'k' is not fixed. Anybody know why?. If k varies each time the loop is encoutered, but remains constant during execution of the loop, why can't the loop be split into 4 threads, each handling approx k/4 iterations using :

#pragma omp parallel sections

and 4 of :
#pragma omp section

Is this a shortcoming of the pragmas or a fundamental point that I am missing?

Git
Reply With Quote