not vectorized: can't determine dependence
Tim Prince
n8tm@aol.com
Sat Jun 16 15:15:00 GMT 2007
Apparently, gfortran considers arrays unacceptably aliased when they are
in the same COMMON, or 2 slices of an array, or even when they start at
the same variable index:
mid= n/2
...
a(:mid-1)= a(:mid-1)+b(:mid-1)*c(:mid-1)
a(mid:n)= a(mid:n)+b(mid:n)*d(mid:n)
This example is from the Levine, Callahan, Dongarra VECTOR benchmark,
simplified to make it vectorizable. The first assignment is vectorized,
but the second throws the "can't determine dependence." (recent 4.3 for
x86-64)
The restriction against vectorizing when using COMMON is a big
disadvantage for semi-legacy applications. For example, several
Livermore Fortran Kernels are not vectorized on account of using
neighboring arrays from the same labeled COMMON.
ifort takes advantage of COMMON blocks in vectorization by analyzing the
relative alignments.
More information about the Fortran
mailing list