User Tools

Site Tools


Site Tools

pr.f90
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
pr.c
#include<stdio.h>
#include<omp.h>
 
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;
}