title: Change source file from dynamic scheduling to static scheduling
body: <p>I'm trying to change the following C source code to static scheduling, but I don't know how it's done. I've tried to <code>static</code>before <code>#pragma omp parallel private(nthreads, tid)</code>:</p>
  
  <pre><code>#include &lt;omp.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main (int argc, char *argv[]) 
  {
  int nthreads, tid;
  
  
  /* Fork a team of threads giving them their own copies of variables */
  static #pragma omp parallel private(nthreads, tid) //I tried it here
    {
  
    /* Obtain thread number */
    tid = omp_get_thread_num();
    printf("Hello World from thread = %d\n", tid);
  
    /* Only master thread does this */
    if (tid == 0) 
      {
      nthreads = omp_get_num_threads();
      printf("Number of threads = %d\n", nthreads);
      }
  
    }  /* All threads join master thread and disband */
  
  }
  </code></pre>
  
  <p>What I expect is that thread 0 gets the first chunk, thread 1 the second chunk, and so on. However, it's randomly now as it's dynamically</p>