title: Maximum Threads in openMp
body: <p>I am new to parallel programming and wanted to know what is maximum number of threads i can launch.</p>
  
  <p>i tried this</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;omp.h&gt;  
  void pooh(int id,int a[])
  {
      a[id]=a[id]-1 ;
      printf("%d\n",id) ; 
  }
  int main()
  {
       int a[1001] ;
       int  i ;
       for(i=0;i&lt;1000;i++)
      {
           a[i]=i+1 ;
      }
      omp_set_num_threads(1000) ;
      #pragma omp parallel
      {
          int id=omp_get_thread_num() ;
          pooh(id,a) ;
      }
  
      return 0 ;
   }
  </code></pre>
  
  <p>but when i tried omp_set_num_threads(10000) ;
  the programs doesnt run. I wanted to know the maximum number threads tha can be launched to get a job done. </p>