VMS Help
FORTRAN, /ALIGNMENT

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  /[NO]ALIGNMENT=p               D=/ALIGN=(COMM=(PACK,NOMULTI),RECO=PACK)

  Controls whether the Compaq Fortran 77 compiler naturally aligns fields
  in records or data items in common blocks, or whether the compiler
  packs those fields and data items together on arbitrary byte
  boundaries.

  For performance reasons, Compaq Fortran 77 always aligns local data items
  on natural boundaries.  However, EQUIVALENCE, COMMON, RECORD, and
  STRUCTURE data declaration statements can force misaligned data.
  Use the /ALIGNMENT qualifier to control the alignment of fields
  associated with COMMON and RECORD statements.

  The /ALIGNMENT qualifier is especially useful for applications which
  are to be compiled on both VAX and Alpha systems, as performance on
  Alpha systems greatly benefits from properly aligned data.  Note that
  Compaq Fortran 77 on Alpha systems defaults to /ALIGN=RECORDS=NATURAL,
  whereas the VAX default is /ALIGN=RECORDS=PACKED.

                                 NOTE

          Misaligned data can increase the time it takes to
          execute a program, depending on the number of misaligned
          fields   encountered.  Specifying /ALIGNMENT=ALL (same
          as   /ALIGNMENT=NATURAL minimizes misaligned data.
          Vector code requires aligned data.  For more information
          on alignment and data sizes, see your user manual.

  To obtain compiler messages when misaligned data is encountered,
  use the /WARNING=ALIGNMENT qualifier.

  Parameter "p" is a specifier with one of the following forms:

     [class =] rule
     (class = rule,...)
     ALL
     NONE

  class
  Is one of the following keywords:

    COMMONS     (for common blocks)
    RECORDS     (for records)
    STRUCTURES  (in FORTRAN, a synonym for RECORDS)

  rule
  Is one of the following keywords:

  PACKED
    Packs fields in records or data items in common blocks on
    arbitrary byte boundaries.

  NATURAL
    Naturally aligns fields in records and data items in common
    blocks on up to 64-bit boundaries (inconsistent with the
    FORTRAN-77 standard).

    If you specify NATURAL, the compiler will naturally align all
    data in a common block, including INTEGER*8, REAL*8, and all
    COMPLEX data.

  STANDARD
    Naturally aligns data items in common blocks on up to 32-bit
    boundaries (consistent with the FORTRAN-77 standard).

    The compiler will not naturally align REAL*8, and
    COMPLEX*16 data declarations.  Such data declarations should be
    planned so they fall on natural boundaries.  Specifying
    /ALIGNMENT=COMMONS=STANDARD alone means that the default for
    record structures is used.

    Note that this keyword only applies to common blocks; therefore,
    you can specify /ALIGNMENT=COMMONS=STANDARD, but you cannot
    specify /ALIGNMENT=STANDARD.

  [NO]MULTILANGUAGE
    Controls whether the compiler pads the size of COMMON Program
    sections (psects) to a multiple of the psect alignment (as specified
    by a CDEC$ PSECT ALIGN= directive or the default of quadword
    alignment.)

    If /ALIGNMENT=COMMON=MULTILANGUAGE is specified, the compiler
    rounds up the size of the COMMON psect to a multiple of the
    psect alignment, with a maximum of octaword (16 byte) alignment.

    The default is /ALIGNMENT=COMMON=NOMULTILANGUAGE which does not
    round up the size of the COMMON psect.

    This keyword is provided for compatibility with Compaq Fortran 77 for
    OpenVMS Alpha Systems; it is generally not useful on VAX systems.

    Note that this keyword only applies to common blocks; therefore,
    you can specify /ALIGNMENT=COMMONS=[NO]MULTILANGUAGE, but you
    cannot specify /ALIGNMENT=[NO]MULTILANGUAGE.

  ALL
  Is equivalent to /ALIGNMENT, /ALIGNMENT=NATURAL, and
  /ALIGNMENT=(COMMONS=(NATURAL,NOMULTILANGUAGE),RECORDS=NATURAL).

  NONE
  Is equivalent to /NOALIGNMENT, /ALIGNMENT=PACKED, and
  /ALIGNMENT=(COMMONS=(PACKED,NOMULTILANGUAGE),RECORDS=PACKED).

  If you do not specify /ALIGNMENT, the default is
  /ALIGNMENT=(COMMONS=(PACKED,NOMULTILANGUAGE),RECORDS=PACKED).
  Note that this is different from the Compaq Fortran 77 for Alpha Systems
  default which is RECORDS=NATURAL.

  If you specify /ALIGNMENT=class=rule, the rule only applies to that
  class, the other class gets aligned according to the default; for
  example:

  1. /ALIGNMENT=COMMONS=STANDARD

     In this case, RECORDS=PACKED by default.

  2. /ALIGNMENT=RECORDS=NATURAL

     In this case, COMMONS=PACKED by default.

  To request aligned data in a record structure, specify
  /ALIGNMENT=RECORDS=NATURAL, or consider placing source data
  declarations for the record so that the data is naturally aligned
  without the need for padding.

  To request aligned data in common blocks, specify
  /ALIGNMENT=COMMONS=STANDARD (for data items up to 32 bits in
  length) or /ALIGNMENT=COMMONS=NATURAL (for data items up to 64 bits
  in length), or place source data declarations within the common
  block carefully so that each data field is naturally aligned.

  The /ALIGNMENT and /WARN=ALIGNMENT qualifiers can be used together
  in the same command line.

  You can override the alignment specified on the command line by
  using a CDEC$ OPTIONS directive, as described in your language
  reference manual.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.