#include #ifdef _OPENMP #include #endif int main() { /*Example of how to use thread numbers*/ #pragma omp parallel { int tid=0; /*Dummy thread number for the case OMP is not enabled*/ #ifdef _OPENMP tid=omp_get_thread_num(); #endif printf("Doing some stuff" " in thread %i\n",tid); } return 0; }