Hello OpenMp professionals
I m working in the parallel region with openmp, and i get a random thread's ID (not in order) example for a number of threads =4, so i get Thread's ID =1,Thread's ID =3,Thread's ID =2,Thread's ID =0, and for another execution i get another order.How to get the order of IDs eq to 0, 1, 2, 3. Any satisfactory answer would be welcome.
Here is my code:
int nThread = omp_get_max_threads ();
#pragma omp parallel num_threads(nThread)
int myID=omp_get_thread_num ();
printf("Thread's ID %d \n", myID);
Thanks for your reply