Download Intel Fortran Compiler for Linux* Systems User's Guide
Transcript
Intel® Fortran Compiler for Linux* Systems User’s Guide Vol II All data items whose starting address is on a natural boundary are naturally aligned. Data not aligned on a natural boundary is called unaligned data. Although the Intel® Fortran Compiler naturally aligns individual data items when it can, certain Fortran statements can cause data items to become unaligned. You can use the command-line option -align to ensure naturally aligned data, but you should check and consider reordering data declarations of data items within common blocks, derived-type structures, and record structures as follows: • • Carefully specify the order and sizes of data declarations to ensure naturally aligned data. Start with the largest size numeric items first, followed by smaller size numeric items, and then non-numeric (character) data. The following statements can cause unaligned data: • Common blocks (COMMON statement) The order of variables in the COMMON statement determines their storage order. Unless you are sure that the data items in the common block will be naturally aligned, specify either the -align commons or align dcommons option, depending on the largest data size used. See Alignment Options. • Derived-type (user-defined) data Derived-type data items are declared after a TYPE statement. If your data includes derived-type data structures, you should use the align records option, unless you are sure that the data items in the derived-type structures will be naturally aligned. If you omit the SEQUENCE statement, the -align records option (default) ensures all data items are naturally aligned. If you specify the SEQUENCE statement, the -align records option is prevented from adding necessary padding to avoid unaligned data (data items are packed) unless you specify the -align sequence option. When you use SEQUENCE , you should specify data declaration order so that all data items are naturally aligned. • Record structures (RECORD and STRUCTURE statements) Intel Fortran record structures usually contain multiple data items. The order of variables in the STRUCTURE statement determines their storage 14