Returns the thread number, within its team, of the thread executing the function.
int omp_get_thread_num (void);
The thread number lies between 0 and omp_get_num_threads()-1, inclusive. The master thread of the team is thread 0.