[MITgcm-support] Error reading dx file with pathscale

Constantinos Evangelinos ce107 at ocean.mit.edu
Wed Oct 22 16:50:50 EDT 2008

On Wednesday 22 October 2008 02:48:51 pm Martin Losch wrote:
> Hi David,
> I have no idea, what's going on. To me it sounds like a compiler bug,
> or maybe the flag needs to be specified for both compile and link
> step or for only one of them ...? On little endian systems that I
> have encountered so far, either the _BYTESWAP flag or the appropriate
> compiler flag  worked. When you go to the depths of the MDSIO pkg
> (mdsio_read_field.F, actually I suggest looking at
> mdsio_read_field.f, that should be simpler to look at after all the
> different options have been thrown out), you could explore, what is
> actually happening there (and probably in mdsio_seg4/8torl/s.F)
> Martin
> On 22 Oct 2008, at 19:08, David Hebert wrote:
> > I manually set the -D_BYTESWAPIO flag and compiled without compiler
> > byteswapping flags and the code ran fine. This suggest there is an
> > issue with compiler -convert big_endian and/or -byteswapio flags.
> >
> > However...
> >
> > I wrote a little fortran code that, using compiler -convert
> > big_endian, reads dx.bin outputs results. Remarkably, that works fine.
> >
> > The question now... is there a reason why compiling with the above
> > flags, but not specifying a define BYTESWAPIO, would cause an
> > error? Is the code somehow swapping to little endian then back
> > based on other compiler checks? Not sure where to go with this one.

We've had issues with the -convert big_endian flag on the open64 compiler 
under Linux which shares a very large part of its codebase with Pathscale.  
Obviously the flag works on toy problems otherwise they would have it 
disabled (or noted as buggy). We need to submit a bug request for this to 
Pathscale - it appears that Pathscale 2.5 under Linux however works fine 
according to the daily tests but it could be that under the O/S on the XT it 

Dr. Constantinos Evangelinos
Department of Earth, Atmospheric and Planetary Sciences
Massachusetts Institute of Technology

More information about the MITgcm-support mailing list