[MITgcm-support] Error reading dx file with pathscale

Martin Losch Martin.Losch at awi.de
Wed Oct 22 14:48:51 EDT 2008


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.
>
> Thanks for your help,
>
> David
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support




More information about the MITgcm-support mailing list