Rate This Document
Findability
Accuracy
Completeness
Readability

Differences in Fortran Directives

Fortran directives are used to provide additional information to the compiler and to control specific blocks of code. Different compilers support specific Fortran directives. Table 1 describes the differences between the directives.

Table 1 Differences between the directives

Directive

Description

GNU Compiler

BiSheng Compiler

Intel Compiler

!$omp

Supports the omp parallel programming syntax.

Y

Y

Y

!$mem prefetch

Data prefetch instruction.

N

Y

N

!$omp simd

Instructs the compiler to convert the loop to SIMD.

N

Y

Y

!dir$ vector always

Forces the compiler to perform loop vectorization.

N

Y

Y

!dir$ novector

Instructs the compiler not to perform loop vectorization.

N

Y

Y

!dir$ inline

Instructs the compiler to inline a function.

N

Y

Y

!dir$ noinline

Instructs the compiler not to inline a function.

N

Y

Y

!dir$ unroll

Instructs the compiler to perform a loop unrolling operation.

N

Y

Y

!dir$ nounroll

Instructs the compiler to prevent loop unrolling operations.

N

Y

Y

!DEC/dir$ IF

Macro definition.

N

N

Y

!DIR$ ATTRIBUTES

Instructs the compiler to perform operations on variable attributes.

N

N

Y

!DIR$ PREFETCH

Data prefetch instruction.

N

N

Y

More specifications

The GNU Fortran Compiler

Fortran Directives

Fortran Compiler OneAPI Development Guide and Reference