[MITgcm-support] Re: More problems

Paola Cessi pcessi at ucsd.edu
Tue Nov 9 12:01:09 EST 2004


The -D_BYTESWAPIO option worked! THANKS!!!! paola

On Mon, 8 Nov 2004, Patrick Heimbach wrote:

> Paola,
>
> looking at your earlier mail, I see that you are ommitting
> conversion to big endian, i.e. you only have (corrected)
>   DEFINES=' -DWORDLENGTH=1'
> whereas we usually(always?) set
>   DEFINES=' -DWORDLENGTH=1 -D_BYTESWAPIO'
> to convert to big endian (and remain platform independent)
> when running the model.
>
> So I think what's happening is that rdmds.m assumes
> big endian (default), but you've generated little endian output.
> You can change this by setting ieee='l' in rdmds.m
> to look at little endian output.
>
> The cleaner way though is to stick to the conventions
> and do everything in big endian,
> i.e.
> o produce big endian input (for which your open
>  statement below contains the correct 'b' parameter),
> o run big endian (using -D_BYTESWAPIO)
> o happily look at big endian output.
> That all works well on the altix.
>
> -Patrick
>
> PS:
> I think that ifort 8.X now also has a compiler option
> '-convert big_endian' which would allow you to ommit
> the CPP option -D_BYTESWAPIO
>
>
>
> Quoting Paola Cessi <pcessi at ucsd.edu>:
>
>> Hi Patrick - sorry to bug you more, but I don't seem to be able to read
>> the output files (.data and .meta).
>>
>> Since ORNL does not have matlab I transfer the files to another 64 bits
>> (little endian) machine (an AMD Opteron running LinuxRH8) that has matlab
>> and then read them  using rdmds.m. Is there something I need to do with
>> rdmds in order to read them properly?
>>
>> Also, when generating the input files with gendata.m are these the correct
>> format options for the Intel Fortran 8 on an ALtix (which is 64 bits -
>> little endian)?
>>
>> fid=fopen('Qnet.circle','w','b'); fwrite(fid,Q,'real*8'); fclose(fid);
>>
>> paola
>>
>>
>
>
> --------------------------------------------------------
> Patrick Heimbach   Massachusetts Institute of Technology
> FON: +1/617/253-5259                  EAPS, Room 54-1518
> FAX: +1/617/253-4464             77 Massachusetts Avenue
> mailto:heimbach at mit.edu               Cambridge MA 02139
> http://www.mit.edu/~heimbach/                        USA
>
>



More information about the MITgcm-support mailing list