Code Comments
Programming Forum and web based access to our favorite programming groups.On Nov 22, 2:44 am, andy271...@gmail.com wrote: > Not completely sure why it works one way and not the > other in your case, but as I understand the intel > fortran compiler, the -convert bigendian compiler flag > does nothing more than decorate your compile flag list > unless you also have the environment variable set: > > setenv F_UFMTENDIAN big > > at run time. > > This is a rather annoying feature of ifort, if it is still > the case. It is not now and it has never been the case. There are multiple ways to set the convert mode in ifort, and they all have an effect. - convert big_endian is the same as specifying CONVERT='BIG_ENDIAN' on all units that are opened (explicitly or implicitly) in the source(s) compiled with that option. The F_UFMTENDIAN environment variable is a way to change the behavior when you run the program, overriding what was set at compile-time. There are also environment variables to set this behavior on a per-unit basis. Steve
Post Follow-up to this messageandy271828@gmail.com wrote: > On Nov 22, 7:14 am, Steve Lionel <steve.lio...@intel.com> wrote: > > I stand corrected. > > I recall however, at some point early in my use of intel fortran, that > I had difficulties with this, and specifically that -convert > big_endian > was not enough to get me going. Setting the env variable was as I > recall. > > Since then I have always set both, and not had problems. Perhaps my > early > problems were due to some other origin. I cannot now recall, and > certainly > am willing to take you at your word on this matter. Maybe for some reason there was a default init file somewhere that set F_UFM TENDIAN to "little" in your shell? It should be easy enough to double check with a "ech o $F_UFMTENDIAN" on the command line. I had a colleague recently have a proble m with ifort (v9.1 I think) -convert big_endian on a linux box to read unformated sequent ial files generated on a big-endian IBM. g95 -fendian-big worked fine, but the ifort c ompile always generated seg faults reading the file. The debug values that were printed to screen were the byte-swapped versions of the correct ones. It completely bamboozled me u ntil your post caused a glimmer of hope to appear through the crack in the old dome. (I for warded it to him to test). For the record, I *always* use big-endian "format" files (since the IBM comp iler doesn't have a switch to read little-endian ones) and when I had an ifort license (f or an intel mac), I never had any problems with the "-convert big-endian" switch (or any other part of ifort for that matter). The (third party) license manager was another story. .. :o) Anyway.... cheers, paulv
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.