The arrays passed to FMS must be aligned on natural boundaries, which are:
In order to achieve maximum performance on memory resident problems, FMS maps directly onto the data dimensioned in your program. FMS accomplishes this by reaching into the address space of your program using arrays located in FMS.
The figure above shows a line representing increasing address space. At the lower end of address space is your program containing data to be referenced by FMS. At a higher point in memory is FMS. By using negative subscripts in an array, FMS may directly address your data.
In order for FMS to address data in your program, your data must begin on an address boundary that is an integer multiple of the word length. For example, if you are processing 64-bit data on a byte-addressable machine, your data must begin on an address that is divisible by 8.
You may control the address alignment of your data by using a common block. When addresses are generated for your program during linking, your computer may be directed to locate the common block on a specified address boundary. The supplement for your particular computer contains instructions on how to align common blocks during linking.
The order that you place data in a common block is also important. If possible, place integers, reals and complex data in separate common blocks as shown:
COMMON/IDATA/IARRAY INTEGER IARRAY COMMON/RDATA/RARRAY REAL*8 RARRAY COMMON/CDATA/CARRAY COMPLEX*16 CARRAY
If you must mix data types within a common block, the longest word data types should be first. For example, all complex data must be at the beginning of the common block, followed by real data then integer data.
COMMON/DATA/CARRAY,RARRAY,IARRAY COMPLEX*16 CARRAY REAL*8 RARRAY INTEGER IARRAY
This will prevent an odd number of short words from destroying the alignment of longer word data.
FMS automatically checks the alignment of your data on each appropriate subroutine call. If an error is found, fatal error condition, DATA DOES NOT START ON AN APPROPRIATE ADDRESS, is printed along with the array address information.