Go to main content
Oracle® Developer Studio 12.5: Fortran User's Guide

Exit Print View

Updated: June 2016
 
 

Fortran Directives Summary

This appendix summarizes the directives recognized by f95 Fortran compiler:

  • General Fortran Directives

  • Sun Parallelization Directives

  • Cray Parallelization Directives

  • OpenMP Fortran 95 Directives, Library Routines, and Environment

C.1 General Fortran Directives

General directives accepted by f95 are described in Directives.

Table 32  Summary of General Fortran Directives
Format
!$PRAGMA keyword ( a [ , a ] … ) [ , keyword ( a [ , a ] … ) ] ,…
!$PRAGMA SUN keyword ( a [ , a ] … ) [ , keyword ( a [ , a ] … ) ] ,…
Comment-indicator in column 1 may be c, C, !, or *. (We use ! in these examples. f95 free-format must use !.)
C Directive
!$PRAGMA C(list)
Declares a list of names of external functions as C language routines.
IGNORE_TKR Directive
!$PRAGMA IGNORE_TKR {name {, name} ...}
The compiler ignores the type, kind, and rank of the specified dummy argument names appearing in a generic procedure interface when resolving a specific call.
UNROLL Directive
!$PRAGMA SUN UNROLL=n
Advises the compiler that the following loop can be unrolled to a length n.
WEAK Directive
!$PRAGMA WEAK(name[=name2])
Declares name to be a weak symbol, or an alias for name2.
OPT Directive
!$PRAGMA SUN OPT=n
Set optimization level for a subprogram to n.
PIPELOOP Directive
!$PRAGMA SUN PIPELOOP[=n]
Assert dependency in loop between iterations n apart.
PREFETCH Directives
!$PRAGMA SUN_PREFETCH_READ_ONCE (name)
!$PRAGMA SUN_PREFETCH_READ_MANY (name)
!$PRAGMA SUN_PREFETCH_WRITE_ONCE (name)
!$PRAGMA SUN_PREFETCH_WRITE_MANY (name)
Request compiler generate prefetch instructions for references to name. (Requires -xprefetch option, which is enabled by default. Prefetch directives can be disabled by compiling with —xprefetch=no. Target architecture must also support prefetch instructions, and the compiler optimization level must be set greater than —xO2.)
ASSUME Directives
!$PRAGMA [BEGIN} ASSUME (expression [,probability])
!$PRAGMA END ASSUME
Make assertions about conditions at certain points in the program that the compiler can assume are true.