Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

big Endian conversion for mixed C++/F77

trs27
Beginner
774 Views
Hi,
I have a legacy program that was written in SGI Origin(Big Endian machine) using mixed C++ and F77 that I am trying to port to a LINUX machine (based on Intel Xeon) using Intel Compiler 7.0. One F77function should perform i/o operation using binary file. This particular function is called by a C++ function. If you like the C++ function acts as outer shell.
My question is how todo the big Endian to little Endian conversion?
I have managed todo the conversionusing PGI compiler with -byteswapio flag in both C++ and F77 compiler. However when I tried to use Intel Compiler 7.0 with environmental set up F_UFMTENDIAN=big, the conversion does not work. (It works if the outer shell is also a F77 routine rather than C or C++.)
Being a legacy program,it hasgot a lot of binary data from the SGI machine already, so I am not interested on working in little Endian. The ease of maintanence also means that I am not very keen on adding conversion routines.
Given this constraint, does it mean that I have to go to Intel compiler 8.0 since it seems to have a compiler flag to do the conversion?
Thanks
0 Kudos
1 Reply
Steven_L_Intel1
Employee
774 Views
I would recommend 8.0 (be sure to download a current version fron Premier Support), but you may also want to try 7.1. I know that the support for big-endian changed somewhat over the course of 7.x, in particular regarding when and how the compiler checked the environment variable.
0 Kudos
Reply