Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26754 Discussions

Fortran 2008 does not allow this statement or directive

jingang_l_
Beginner
78 Views

:

module test_align

  implicit none

  real(8) ::a(5)
  !DIR$ ATTRIBUTES ALIGN:64 :: a

end module test_align

 

[compiling option]:

ifort -module include -fpp -std08 -assume byterecl -traceback -O3 -xMIC-AVX512 -qopt-report=5 -qopt-report-file=stdout -o -c ./test.o

 

[output]:

Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.2.174 Build 20170213

 

Compiler options: -I/soft/compilers/intel/compilers_and_libraries_2017.2.174/linux/mpi/intel64/include -I/soft/compilers/intel/compilers_and_libraries_2017.2.174/linux/mpi/intel64/include -module include -fpp -std08 -assume byterecl -traceback -O3 -xMIC-AVX512 -qopt-report=5 -qopt-report-file=stdout -c -o ./test.o

test.F90(6): warning #7025: This directive is not standard F2008.

!DIR$ ATTRIBUTES ALIGN:64 :: a

------^

 

    Report from: Interprocedural optimizations [ipo]

 

  WHOLE PROGRAM (SAFE) [EITHER METHOD]: false

  WHOLE PROGRAM (SEEN) [TABLE METHOD]: false

  WHOLE PROGRAM (READ) [OBJECT READER METHOD]: false

 

....

 

 

[question]:

 

I'm not sure whether the variable is aligned? What's the standard way to align data in F2008?

0 Kudos
1 Reply
Steve_Lionel
Black Belt Retired Employee
78 Views

There is no standard way to align data in Fortran. If you want to do that, you have to use directives, and therefore if you ask for standards warnings you'll get them for directives.

Reply