title: OpenMP in FORTRAN does not run expected number of threads
body: <p>I am new to parallel programming, and am having trouble getting a simple parallel Fortran program to use multiple threads in OpenMP.  The following program:</p>
  
  <pre><code>   Program Hello
     Use omp_lib
     Implicit None
  
     INTEGER        nthreads
     nthreads = 4
  
     CALL OMP_SET_NUM_THREADS(nthreads)
  
     write(*,*) omp_get_num_procs()
     write(*,*) omp_get_max_threads()
     write(*,*) omp_get_num_threads()
  
     !$OMP PARALLEL
       Write(*,*) 'Hello'
       Write(*,*) omp_get_num_threads()
     !%OMP END PARALLEL
  
     End Program Hello
  </code></pre>
  
  <p>Produces the result:</p>
  
  <pre><code>      32
         4
         1
     Hello
         1
  </code></pre>
  
  <p>What is the reason that the number of threads inside the parallel region is not the same as nthreads that I set above?  I am compiling the program using gfortran -f openmp Hello.f on a Windows machine running cygwin.</p>