#include <stdio.h>
#include <unistd.h>
/* getpid() */
#include <omp.h>
int
is_shared
=
1
;
int
main
(){
#pragma omp parallel num_threads(4)
{
is_shared
++;
printf
(
"Hello from thread %d, I see is_shared=%d.\n"
,
omp_get_thread_num
(),
is_shared
);
}
}