[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fortran Binary files AMD64 x i686



On Tue, Oct 11, 2005 at 04:28:50PM +0200, Enrico Zini wrote:
> On Tue, Oct 11, 2005 at 10:31:54AM -0300, Marcelo Vitola wrote:
> 
> >  I have some problems with a FORTRAN binary file creates in amd64 (kernel
> > 2.6.8-11-amd64-k8, g77 version 3.3.5) when I try to read it in a Pentium IV
> > (kernel 2.6.8-2-686, g77 version 3.3.5). Someone knows if is this
> > normal? There is some  way to solve this problem?
> 
> Yes, it is normal.
> 
> If you are talking about program binaries, then while AMD64 can emulate
> a Pentium 4, the Pentium 4 cannot run code built for AMD64.  To solve
> this problem you have to create those binary files using the same
> architecture that you use for reading them.
> 
> If you are talking about data files rather than program files, you have
> the extra option of changing the program to save the data in a way
> (such as HDF or ASCII) that is independent from the architecture.
Or defining the data format to be big endian or little endian, or
including in the file format an indication of which end is first.

Then do conditional byteswapping to read the data in the right order.

-- 
Clear skies,
Justin



Reply to: