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

Allocatable arrays alignment

Gus
Beginner
396 Views
Is there a way to ensure that *allocatable* arrays are aligned at 16-byte boundaries?

Please, note, I mean *allocatable* arrays, not only static ones.
I.e., when memory is allocated for them at runtime, it should be aligned accordingly.

Does
-align rec16byte
do it for allocatable arrays, or only for static arrays?

I found this other related flags, but it is not clear to me if they do what I want:
-msse[2,3]
-x[W,O,P,..]

I am using a Linux 64-bit machine, and the compiler is ifort 10.1.017.

Thank you,
Gus

0 Kudos
1 Reply
Steven_L_Intel1
Employee
396 Views
Yes, when you specify minimum alignment it also applies to allocatable arrays. There is also an ATTRIBUTES ALIGN you can specify on a per-variable basis.
0 Kudos
Reply