Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
20 Views

Fortran 2008 does not allow this statement or directive

:

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
Highlighted
Black Belt Retired Employee
20 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.

0 Kudos