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

Unaligned access with v8-compiled app using v9 libs

jonathan_z
Beginner
250 Views
My application gets an unaligned access error when I attempt to run with v9 compilers. Curiously, no error occurs if I compile v8 / run v8, compile v9 / run v9, or compile v9 / run v8. v8 = ifort -V Version 8.1 Build 20041021 Package ID: 1_fc_pu_8.1.021 uname -a Linux inode5 2.4.21-20.EL #1 SMP Wed Aug 18 20:30:22 EDT 2004 ia64 ia64 ia64 GNU/Linux v9 = Version 9.0 Buld 20060223 Package ID: 1_fc_c_9.0.033 uname -a Linux grid4 2.6.9-42.EL #1 SMP Wed Jul 21 23:25:09 EDT 2006 ia64 ia64 ia64 GNU/Linux The offending code is noted below: character*37 NOTESMSG(21) character*37 NOTES(100) character*2 str integer i,j ... write (str, 270) j NOTES(i) = NOTESMSG(3) NOTES(i)(8:9) = str <- unaligned error here 270 format(i2) The portion of the code is quite old and this construct is used extensively. This error has never occurred before with other versions of OS/compiler. Also, the error happens to some of the assignments but not all of them. Is it an issue with a char*2 being considered a 2-byte element? Thoughts?
0 Kudos
1 Reply
jonathan_z
Beginner
250 Views
Sorry for the message formatting -- I am forced to use the DefaultTextEditor, since none of the other editors seem to be working for me. Suggestions to fix the psot editor appreciated as well.
0 Kudos
Reply