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

segfault with omp reduction

$
0
0

dear all

the following code is segfaulting.

thanks

v

ifort -v
ifort version 14.0.1

 

cat ifort_14.0.1_reduction.f90
program test
  interface
    subroutine sub (a, c, n)
      integer :: n
      integer, allocatable :: a(:), c(:)
    end subroutine
  end interface

  integer, allocatable :: a(:), c(:)
  integer :: i, j
  allocate (a(5), c(5))
  call sub (a, c, 5)
end program test

subroutine sub (a, c, n)
  integer :: n
  integer, allocatable :: a(:), c(:)
!$omp parallel do shared(a) reduction(+:c)
  do i = 1, n
    c(a(i)) = c(a(i)) + 1
  end do
end subroutine sub

ifort -openmp ifort_14.0.1_reduction.f90
ifort_14.0.1_reduction.f90: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for ifort_14.0.1_reduction.f90 (code 1)

 

 


Viewing all articles
Browse latest Browse all 2746

Trending Articles



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