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

byte alignment with Fortran allocate

scott_palmtag
Beginner
907 Views

We are investigating some instabilities with the MLK BLAS library and we found some documentation that

said arrays should be aligned on 16-bye boundaries.

It also said that arrays allocated with MALLOC are aligned on 8-byte boundaries.

Are single precision arrays allocated with Fortran ALLOCATE statements aligned on 8-byte or 16-byte boundaries?

Do we need to specify a special compiler flag to get 16-bye alignment?

Thanks,

0 Kudos
3 Replies
Steven_L_Intel1
Employee
907 Views

You can use !DEC$ ATTRIBUTES ALIGN to specify that an allocatable variable should have a particular alignment.

0 Kudos
scott_palmtag
Beginner
907 Views

You can use !DEC$ ATTRIBUTES ALIGN to specify that an allocatable variable should have a particular alignment.


I guess my question is do I have to use this, or are they already 16-byte aligned?

We have over 1000 arrays that are allocated.

Thanks,

0 Kudos
Jugoslav_Dujic
Valued Contributor II
907 Views

I guess my question is do I have to use this, or are they already 16-byte aligned?

We have over 1000 arrays that are allocated.

Thanks,

Yes, I'm afraid you have to. Some find/replace with regular expression and/or keyboard macros could automate the task :-).

We had an extensive discussion on the feature recently here:

http://software.intel.com/en-us/forums/showthread.php?t=59480

0 Kudos
Reply