/* * "hello world" program */ #include #include #include /* OpenMP header file */ int main(void) { int my_id; #pragma omp parallel private(my_id) { my_id = omp_get_thread_num(); /* run this in each thread */ printf("hello, world, from thread %d\n", my_id); } printf("all done\n"); return EXIT_SUCCESS; }