#include #include //sudo apt-get install libomp-dev // compilation:gcc -fopenmp hello.c -o hello // execution :OMP_NUM_THREADS=8 ./hello //omp_set_num_threads(4) //double start=omp_get_wtime(); double end=omp_get_wtime(); //printf("the execution time= %lf",end-strat); // speedup= TS/TP;// efficacity= speedup/np; int main(int argc, char * argv []) { #pragma omp parallel num_threads(4) { int np = omp_get_num_threads(); //size int id = omp_get_thread_num(); // rank printf("Bonjour %d / %d\n",id, np); #pragma omp master printf("Hello worod %d",id); } }