program basic_para_region
!$ use OMP_LIB
implicit none
logical :: inpara
!$OMP PARALLEL
!$ inpara = OMP_IN_PARALLEL ()
print *, " Im a in PR : ", inpara
!$OMP END PARALLEL
!$ inpara = OMP_IN_PARALLEL ()
print *, " Im a in PR : ", inpara
end program basic_para_region
#include
#include
int main(int argc, char** argv)
{
int inpara;
#pragma omp parallel
{
inpara = omp_in_parallel();
printf(" Im a in PR : %d\n",inpara);
}
inpara = omp_in_parallel();
printf(" Im a in PR : %d\n",inpara);
return 0;
}