dear all
ifort produces a wrong error with the following codethanks
v
ifort -v
ifort version 14.0.1
cat ifort_14.0.1_copyprivate.f90
program test
use omp_lib
implicit none
integer :: b
!$omp parallel
!$omp end parallel
!$omp parallel private (b)
!$omp single
b = omp_get_num_threads ()
!$omp end single copyprivate (b)
write(*,*) b
!$omp end parallel
end program test
ifort -openmp ifort_14.0.1_copyprivate.f90
ifort_14.0.1_copyprivate.f90(12): error #7982: Variables in the COPYPRIVATE list must be PRIVATE in the enclosing parallel region. [B]
!$omp end single copyprivate (b)
--------------------------------^
compilation aborted for ifort_14.0.1_copyprivate.f90 (code 1)