Intel® Advisor Help
User-defined functions in the loop body are preventing the compiler from vectorizing the loop
Inlining of user-defined functions is disabled by compiler option. To fix: When using the Ob or inline-level compiler option to control inline expansion, replace the 0 argument with the 1 argument to enable inlining when an inline keyword or attribute is specified or the 2 argument to enable inlining of any function at compiler discretion.
Read More:
Some user-defined function(s) are not vectorized or inlined by the compiler. To fix: Do one of the following:
Example:
real function f (x) !DIR$ OMP DECLARE SIMD real, intent(in), value :: x f= x + 1 end function f !DIR$ OMP SIMD do k = 1, N a(k) = f(k) enddo
Read More:
Passing an array/array section to an ELEMENTAL function/subroutine is creating a dependency that prevents vectorization. To fix:
Target | Directive |
---|---|
Source loop | !DIR$ SIMD or !$OMP SIMD |
Inner function definition or declaration | !$OMP DECLARE SIMD |
Example:
Original code:
elemental subroutine callee(t,q,r) real, intent(in) :: t, q real, intent(out) :: r r = t + q end subroutine callee ... do k = 1,nlev call callee(a(:,k), b(:,k), c(:,k)) end do ...
Revised code:
subroutine callee(t,q,r) !$OMP DECLARE SIMD(callee) real, intent(in) :: t, q real, intent(out) :: r r = t + q end subroutine callee ... do k = 1,nlev !$OMP SIMD do i = 1,n call callee(a(i,k), b(i,k), c(i,k)) end do end do ...
Read More: