Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29238 Discussions

omp simd safelen available only with !dir$ spelling

TimP
Honored Contributor III
419 Views

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.

0 Kudos
4 Replies
Steven_L_Intel1
Employee
419 Views

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

0 Kudos
TimP
Honored Contributor III
419 Views

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.

0 Kudos
Steven_L_Intel1
Employee
419 Views

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

0 Kudos
TimP
Honored Contributor III
419 Views

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.

0 Kudos
Reply