Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Derived Type I/O in Sequence Order

garylscott1
Beginner
406 Views
What are the rules most likely to produce derived type I/O in the sequence defined in the type specification. If Idefine all items as a multiple of 4 bytes and specify sequence is that sufficient? I'm asking specifically for IVF v11. I've not experienced any anomalous behavior to date, just concerned with my approach to I/O on some future version of IVF on Wintel, not so much another compiler/system. I'm not concerned with memory storage sequence, only I/O sequence. I must be able to specify the order of the file content. I'd prefer not to have to write item by item. I'm using stream output (no formatting) of the derived type. Sorry I know this is a repeat question.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
406 Views
If you say SEQUENCE, the compiler is not allowed to reorder the fields, though it could introduce padding. For Intel Fortran, SEQUENCE and 4-byte elements will do what you want.
0 Kudos
Reply