Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Rick Gorton <rick.gorton@api-networks.com>
To: "'axp-list@redhat.com'" <axp-list@redhat.com>
Subject: RE: lam_mpi change fortran compiler to pgi
Date: Fri, 15 Dec 2000 10:53:58 -0500	[thread overview]
Message-ID: <051DFF3BBA73D3119A5800A0C95BD0219BEA9E@barracuda.alpha-processor.com> (raw)

Too many misconceptions to let go by:

Building all the software to be big endian is insufficient,
I believe.  There may be hardware assumptions make by systems
designers as well (motherboard hard-wired to be little-endian)

But that's _completely_ irrelevant in this particular case.
If you have big-endian data you want to use on a little-endian
machine, you do NOT have to do byte swapping on every single
access, unless you are actually trying to run a big-endian
program (for example, binary translated SPARC or mips executables)
Even then, there is a theoretical trick (called "the Martin maneuver"
after the guy who thought it up) to avoid a bunch of swapping.

All you really have to do is to swap the data at file I/O time
if you want to preserve the endian-ness of the data.
Some compilers (the compaq fortran compiler) have switches which
will make this behavior happen transparently.  The switch for
that compiler is '-convert big_endian', and it has other conversion
switches for cray data as well.

If the problem is that there are big-endian assumptions in the
source code, then those would need to be corrected as well.
(C code knowing to access byte 3 instead of byte 0 of an int, etc)


	Regards,

		Rick




             reply	other threads:[~2000-12-15 15:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-15 15:53 Rick Gorton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-12-15 14:43 lam_mpi change fortran compiler to pgi Hoover, Tony
2000-12-14 22:58 Joe Collard
2000-12-15 12:57 ` MCGWIER ROBERT
2000-12-15 15:59 ` Todd Henderson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox