Technical data

Access of Misaligned Data
27
Access of Misaligned Data
The Fortran compiler allows misalignment of data if specied by the use of
special options.
As discussed in the previous section, the architecture of the IRIS-4D series
assumes a particular alignment of data. ANSI standard Fortran 77 cannot
violate the rules governing this alignment. Common extensions to the
dialect, particularly small integer types, allowing intermixing of character
and non-character data in COMMON and EQUIVALENCE statements and
mismatching the types of formal and actual parameters across a subroutine
interface, provide many opportunities for misalignment to occur.
Code using the extensions that compiled and executed correctly on other
systems with less stringent alignment requirements may fail during
compilation or execution on the IRIS-4D. This section describes a set of
options to the Fortran compilation system that allow the compilation and
execution of programs whose data may be misaligned. Be forewarned that
the execution of programs that use these options will be signicantly slower
than the execution of a program with aligned data.
This section describes the two methods that can be used to create an
executable object le that accesses misaligned data.
Accessing Small Amounts of Misaligned Data
Use the rst method if the number of instances of misaligned data access is
small or to provide information on the occurrence of such accesses so that
misalignment problems can be corrected at the source level.
This method catches and corrects bus errors due to misaligned accesses. This
ties the extent of program degradation to the frequency of these accesses.
This method also includes capabilities for producing a report of these
accesses to enable their correction.