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

assume_aligned not recognised by compiler

Amlesh_K_
Beginner
945 Views

Hi all,

I am getting the following remark while compiling.

remark #7867: This directive is misplaced or not supported on this platform.
!dir$ assume_aligned pnm : 64

Here pnm is an array of dimensions (16,27)

Intel compiler is latest.

Please suggest what is wrong and what to do?

Thanks.

0 Kudos
6 Replies
Lorri_M_Intel
Employee
945 Views

By "latest", do you mean V16.0 ?

The "assume_aligned" directive is only allowed to reference dummy arguments.

What is the declaration for your array pnm?

If this is a local array or one declared in a module, and you want to force/enforce a certain alignment, you can use

!dir$ align : 64 :: pnm

                --Lorri

0 Kudos
Amlesh_K_
Beginner
945 Views

Hi Lorry,

Actually I have V 15.2.

The array is like this -

real(kind=8), intent(in) :: pnm(16,27)   ,ie, an intent(in) variable. Its been sent from some other module.

 

0 Kudos
TimP
Honored Contributor III
945 Views

!dir$ assume_aligned must be placed in the executable code, close above the first loop or assignment where you want it visible.  I haven't seen it used on other than a single subscripted variable.

0 Kudos
Martyn_C_Intel
Employee
945 Views

Tim is correct. The documentation doesn't explain that, so I have filed an issue for it to be updated. The same applies also to the ASSUME directive.

Placing the directives in between the declaration and executable sections is also OK.

0 Kudos
Amlesh_K_
Beginner
945 Views

Okay. I'll check with the suggestions.

Thanks.

0 Kudos
Amlesh_K_
Beginner
945 Views

Its working. Thanks.

0 Kudos
Reply