omp simd safelen available only with !dir$ spelling

omp simd safelen available only with !dir$ spelling

I've been using !dir$ omp simd safelen since ifort made it available.  The 14.0 compiler documentation says the directive should be available with the standard spelling !$omp simd safelen() (when either -openmp or -openmp-simd is set).

Another possible issue is that !dir$ omp simd safelen doesn't suppress the use of an implicit temporary array and memcpy, as the icc counterpart #pragma omp simd safelen() (or CEAN notation) do.  The memcpy can double execution time and fill buffer usage compared with icc.

The intent of the standard is fairly clear that setting a large safelen value, such as safelen(32) which is sufficient for optimization on MIC, should not prevent optimization e.g. for SSE where a smaller value (8) would be sufficient.  This seems to be one of the reasons for replacing the Intel legacy vectorlength which explicitly required choosing a different value for each architecture (and language).  However, Intel compilers don't yet interpret it this way.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Tim, if you have a sample program that shows these problems, I'll be glad to escalate it to the developers.

Retired 12/31/2016

6000030342 problem report submitted. 

Complaint: Why are we no longer permitted to copy/paste screen messages into problem reports, and required to use Windows only for reports now?  Well, I'm signed up to retire.

Tim, you're internal to Intel and the interface is different - it seems to require IE for now. Customers don't see that.

Retired 12/31/2016

The upshot is that !$omp simd enforces the restriction to early style DO loops but doesn't properly report the error when this is violated.  It does appear preferable (more standard, better performance) to !dir$ omp simd when the restriction is acceptable.

Leave a Comment

Please sign in to add a comment. Not a member? Join today