title: maximum number of variables in private() clause in OpenMP
body: <p>I want to know whether there is any limitation on number of variables that can be defined in a private() clause in OpenMP. </p>
  
  <p>I have a code which has 4 for loops with lot of variables. The outermost for loop can be easily parallelized using a pragma. Also the inner most loop can also be parallelized using pragma. But I am using only one pragma at a time. (either the outermost or innermost)
  Of course, using pragma in innermost loop is not advisable because the overhead of thread creation is so much because of the 3 for loops above it. I just put the pragma for correctness test purposes.</p>
  
  <pre><code>#pragma omp parallel for private(var1,var2,...i,k,l)
  for(j = ...) 
  { 
     int var1;
     int var2; 
      for (i = ... )
      {
          ...
          for(k = ...  )
          { 
              ...
              for(l = ... )
              {
               ...
               ...
              }
           }
       }
  }
  </code></pre>
  
  <p>OR </p>
  
  <pre><code>for(j = ...) 
  { 
     int var1;
     int var2; 
      for (i = ... )
      {
          ...
          for(k = ...  )
          { 
              ...
              #pragma omp parallel for private(var3,var4)
              for(l = ... )
              {
               int var3;
               int var4;
              }
           }
       }
  }
  </code></pre>
  
  <p>Correctness test fails for outermost for loop. Compared to inner most loop, the private variables list for outermost loop is about 29 while inner most pragma contains about 21 variables in private variable list. </p>
  
  <p>I compare the C version with OpenMp version, print the values in an array and sort and compare. </p>