module impr

contains

subroutine imp()
integer, external :: omp_get_thread_num
integer, external :: omp_get_num_threads
integer :: ith,nth

!$OMP PARALLEL default(shared) private(ith,nth) num_threads(8) 
ith=omp_get_thread_num()
nth=omp_get_num_threads()
!$OMP CRITICAL
write(0,*) "Hello world",ith,nth
!$OMP END CRITICAL
!$OMP END PARALLEL
end subroutine
end module
