title: openmp code not running in parallel
body: <pre><code>omp_set_num_threads( 8 );
  #pragma omp parallel for
  for( int tx = 0; tx &lt; numThread; tx++ )
  {
      cout&lt;&lt;"\nThread :"&lt;&lt;omp_get_num_threads()&lt;&lt;"\n";
  
  }
  </code></pre>
  
  <p>My understanding is that the above code is supposed to print 8. But the output I am getting is </p>
  
  <pre><code>Thread :1
  
  Thread :1
  
  Thread :1
  
  Thread :1
  
  Thread :1
  
  Thread :1
  
  Thread :1
  
  Thread :1
  </code></pre>
  
  <p>Please let me know what is going wrong here. I am beginner to openmp and so I am quite sure i must have made some stupid mistake.</p>
  
  <p>Thanks in advance</p>