byteswap ifort question
Arlindo da Silva
arlindo.dasilva at GMAIL.COM
Thu Jul 16 09:27:46 EDT 2009
On Wed, Jul 15, 2009 at 6:18 PM, JEFFREY S GALL <jsg229 at psu.edu> wrote:
> When I compile a FORTRAN program using ifort, I need to add the
> command 'OPTIONS byteswapped'
Do not use "OPTIONS byteswapped", this construct is deprecated. Instead,
explicitly state the endianess of of your data
OPTIONS little_endian
(if you are using ifort, good chance you have a little endian machine.)
Although you can tell the compiler to automatically convert your data to big
endian as Ryo suggests,
$ ifort -convert big_endian yourprog.f90
this is not recommended unless you expect to use your data on a big-endian
machine (these are becoming more of a rarity these days.) If you do this
big-endian conversion, every time you use your data on a little endian
machine (such as i686, x86_64 platforms, including Linux, Windows, Mac OS
X/Intel) GrADS will be doing a byte swap for each byte it reads - kind of
inefficient.
Arlindo
--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090716/131cf47e/attachment.html
More information about the gradsusr
mailing list