Cause:
This vectorization diagnostic is emitted starting from Intel(R) C++ Compiler 15.0. This diagnostic message is emitted when a user defined function cannot be vectorized when annotated using __declspec(vector) because the function body invokes other functions which cannot be vectorized. In the below example, the user tries to generate vector variant of foo() but the function foo() has call to omp_init_lock() which cannot be vectorized.
Examples:
#include <omp.h> omp_lock_t x; void bar(){ omp_init_lock(&x); } __declspec(vector) void foo(int *x, int y){ bar(); }
$ icpc test46.cc -c -O2 -qopt-report2 -qopt-report-phase=vec -qopt-report-file=stderr
test46.cc(7): (col. 24) warning #13397: vector function was not vectorized
Begin optimization report for: foo..xN2vv.J(int *, int)
Report from: Vector optimizations [vec]
remark #15527: function was not vectorized: function call to omp_init_lock cannot be vectorized [ test46.cc(4,3) ]
remark #13397: vector function was not vectorized [ test46.cc(7,24) ]
test46.cc(7): (col. 24) warning #13401: vector function was emulated
===========================================================================
test46.cc(7): (col. 24) warning #13397: vector function was not vectorized
Begin optimization report for: foo..xM2vv.J(int *, int)
Report from: Vector optimizations [vec]
remark #15527: function was not vectorized: function call to omp_init_lock cannot be vectorized [ test46.cc(4,3) ]
remark #13397: vector function was not vectorized [ test46.cc(7,24) ]
test46.cc(7): (col. 24) warning #13401: vector function was emulated