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.
This is still a problem in Ifort 22.214.171.124
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