Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

intel + copyprivate wrong error

$
0
0

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)

 


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>