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

big endian

duparcmeur
Beginner
524 Views

Hi,

I try to read and convert a file to big endian using fortran on windows. I use this command:

"open(fgrid,file=grid,form='unformatted',status='old', convert='big_endian')"

I got no messages when I compiled but when I ran the code I got:

"forrtl: severe (39): error during read, unit 2."

I don't know what the problem is. If someone can help it will greatly appriciate.

Duparcmeur

0 Kudos
1 Reply
Steven_L_Intel1
Employee
524 Views
The code you have assumes that the file was written by a Fortran application that follows the common layout for unformatted files of 32-bit length, data, 32-bit length. If the file was written using some other system, then it will not be understood.

You say you are trying to convert a file to big-endian, but the code you have suggests you are trying to convert from big-endian. Which is it?
0 Kudos
Reply