Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

DIrective "vector nontemporal" in Fortran

Rafael_Silva
Beginner
1,415 Views

Hello guys,

I'm using "vector aligned" and "vector nontemporal" directives on my fortran code. When I was using just "vector aligned" the code was running fine, but once used also "vector nontemporal" it started to crash. I'm using -xAVX, and the directive inside the code are like that:

!DIR$ vector always aligned
!DIR$ vector nontemporal (sxx)

Where sxx is an 3D array. Is there some requirement about "nontemporal" stuff? The arrays are 64 bytes aligned, and the code was working without "nontemporal" stuff. I'm using a Intel(R) Xeon(R) CPU E3-1230 @ 3.20GHz, but I've tested on an E5-2690 also and got the same error.

0 Kudos
1 Reply
TimP
Honored Contributor III
1,415 Views

previously asked and answered: remove aligned to allow  peeling in case there may be occasional misalignment.  If you want to avoid peeling but handle misalignment, try VECTOR UNALIGNED, but that may not work with NONTEMPORAL.

In effect, VECTOR ALIGNED doesn't require a fault in the case of unaligned access, but VECTOR ALIGNED NONTEMPORAL does.

Current compilers have a default -opt-streaming-stores auto  which allows the compiler to guess when nontemporal may be appropriate.

-opt-streaming-stores always would use them wherever possible, without evaluating whether it will hurt performance.

0 Kudos
Reply