I am new to parallel programming and wanted to know what is maximum number of threads i can launch.
i tried this
#include<stdio.h>
#include<omp.h>
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<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 ;
}
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.