title: OpenMP creates only one thread
body: <p>I use Ubuntu and write several lines of code.But it creates only one thread. When I run on my terminal the <code>nproc</code> command, the output is 2. My code is below</p>
  
  <pre><code>int nthreads, tid;
  
  #pragma omp parallel private(tid)
  {
      tid = omp_get_thread_num(); 
      printf("Thread = %d\n", tid);
  
      /* for only main thread */
      if (tid == 0) 
      {
          nthreads = omp_get_num_threads(); 
          printf("Number of threads = %d\n", nthreads);
      }
  }  
  </code></pre>
  
  <p>The output:</p>
  
  <pre><code>Thread = 0
  Number of threads = 1
  </code></pre>
  
  <p>How can I do parallelism?</p>