Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28440 Discussions

Catastrophic error when using OpenMP SIMD declare clause

M___Nils
Beginner
475 Views

Hi,

I have another problem when trying to use OpenMP SIMD vector pragmas. The MWE is:

FUNCTION func(x) result(y)
!$OMP declare simd (func) linear(ref(x))
  REAL, INTENT(IN) :: x
  REAL, DIMENSION(23) :: y
  do i = 1, 23
    y(i) = x * i
  enddo
END FUNCTION func

program hello
  REAL, DIMENSION(256) :: x
  REAL, DIMENSION(23) :: y

!$OMP simd private(y)
  do i = 1, 256
    y = func(x(i))
  enddo
end program hello

Compiling this using :

ifort -qopenmp-simd -fno-inline-functions -c -o test.o test.f90

on ifort version 18.0.5 produces:

/tmp/ifortOK1P4p.i90: 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.

The number 23 does not matter, it falls for all values > 0 (well for the couple ones I tested). The same is true for the number 256.

Interestingly, from analyzing the assembly when not having the hello program present (only func), the assembly looks very nice. func will accept a pointer to an array of addresses where it will store the resulting y values for each x. The variable x will be accessible inside func via a zmm register. So it actually looks very promising.

0 Kudos
1 Solution
Juergen_R_R
Valued Contributor I
475 Views

This is an internal compiler error and should be reported to the Intel Online Support Center.

View solution in original post

0 Kudos
2 Replies
Juergen_R_R
Valued Contributor I
476 Views

This is an internal compiler error and should be reported to the Intel Online Support Center.

0 Kudos
AThar2
Beginner
475 Views

This is still a problem in Ifort 19.0.1.144

does anybody know if it solved in the later updates?

The problem is really confusing. It is only one specific loop which triggers an internal error when I have a !$omp simd or !DIR$ simd

 

0 Kudos
Reply