[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binary portability between VMS and Ultrix



>Date: Mon, 28 Mar 94 14:33 GMT
>From: address@hidden
>To: SUPPORT <address@hidden>
>Subject: Binary portability between VMS and Ultrix

In the above message you wrote:

>       I have encountered some problem with netCDF. The first is a binary
>       portability problem. I have built the netCDF-2.3.2 libraries both under
>       Ultrix and under VMS. On both systems they stand their self-tests
>       and work fine and consistently. But if I copy a binary netCDF file from
>       Ultrix to VMS or vice versa I end up with data garbage. I use
>       ftp in binary mode for these copying operations. I then ncdumped the
>       copied data to ASCII, in order to inspect them. I found that the first
>       60-100 items of each dataset in the file got their correct values,
>       the following ones were either 0 or not correlated to the values I 
>       supposed them to be. As I have large datasets (2-5MB) I suspect 
>       a size problem, somewhere.  Do you have any idea, what has gone wrong?
>       Or an idea what to look for in this case?

We've encountered this problem (i.e. UNIX/VMS file incompatibility)
before.  It appears to be due to the peculiarities of the VMS FTP server
rather than the netCDF package.  VMS netCDF files must have `stream_lf'
record format (rather than, for example, fixed length 512 byte records).
Any netCDF file that doesn't have this record format won't be accessed
correctly by the netCDF package.

Unfortunately, VMS FTP servers have a bad habit of creating files with
fixed-length, 512-byte records -- even when used in binary transfrer mode.
You might play around with your VMS FTP server to see if you can create
files with the proper record format.

To convince yourself that this is the case, try FTP'ing a valid netCDF
file from the VMS platform, and then back to it.  Then compare the
original and copy.  I suspect they'll differ.

>       The second item I want to report is that I have tried to port the 
>       netCDF library to OpenVMS on a Alpha machine. I used the DEC-
>       supplied XDR library for that. In itself the library works. There
>       is a minor problem in one of the self test where nectCDF gets 
>       5.737..e-39 instead of zero. But once again, binary portabilty doesn't
>       work. netCDF files produced on the Alpha are not even accepted as
>       netCDF files under both Ultrix or VMS. This is just an experience 
>       report I want to make known to you. But perhaps you have an idea about
>       that, too.

I suspect that this is also due to the FTP server on the Alpha -- though
I can't be certain because we have no experience with Open VMS on an
Alpha.

You might try conducting the above, round-trip-FTP test on the Alpha.

If the problem still appears to be the netCDF library, then please let me
know.

--------
Steve Emmerson   <address@hidden>