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

960523: NetCDF under MachTen unix



Craig,

>Date: Thu, 23 May 1996 16:44:09 -0400 
>From: "Dr. Craig A. Mattocks" <address@hidden>
>Organization: NOAA/AOML
>To: Steve Emmerson <address@hidden>
>Subject: Re: 960521: NetCDF under MachTen unix 
>Keywords: 199605151821.AA27851

In the above message you wrote:

> This is the response I received from Tenon:
> 
> > We have added this problem to our bug report and will fix it in an
> > upcoming release. For a work-around until then you can get the source
> > online and include the .o files in your build. Sorry for the hassle.
> 
> The source does *not* exist on their server, so asked where it was.
> Here's the reply:
> 
> > This pointer was intended to be to the sources on the rest of the net.
> > There are supposedly sources for BSD that compile on machten.
> 
> Okay, so I searched and found the freeBSD web site, then discovered
> an e-mail message with a similar complaint which offered a solution:
> 
> > I'm using this code I got from pvm2.4.1:
> 
> xdr_float.c:
> 
> int
> xdr_float(xdrp, fp)
>         XDR *xdrp;
>         float *fp;
> {
>         return xdr_long(xdrp, (long*)fp);
> }
> 
> xdr_double.c:
> 
> int
> xdr_double(xdrp, dp)
>         XDR *xdrp;
>         double *dp;
> {
>                 return xdr_long(xdrp, (long*)dp + 1)
>                                 && xdr_long(xdrp, (long*)dp);
> }
> 
> Now my question is:  How do these functions differ from the
> ones included in the netcdf-2.4.2/src/xdr directory?

The above functions differ from the ones in the xdr/ subdirectory
because they assume the following:

    1.  The system is big-endian.
    
    2.  The system uses IEEE floating-point arithmetic.

    3.  C `long's are 32 bits.

    4.  C `float's are 32 bits.

    5.  C `double's are 64 bits.

The above functions will work if and only if all of the above
assumptions are valid.  The XDR functions in the xdr/ subdirectory will
work on any system.

> Do you think I should just follow Tenon's advice (compile/link/ar
> these functions)?

It depends on whether or not the above assumptions are valid (i.e. "I
don't know").

I'd probably use the XDR routines in the xdr/ subdirectory -- at least as a
first try.  This means that you would have to do the following:

    1.  Go to the top-level netCDF source directory.

    2.  Undo the modifications to the `configure' script (remove the `exit'
        that you added).

    3.  Re-execute the configure script.

    4.  Re-execute the command `make'.

As I recall, the `make' failed in the ncdump/ subdirectory while
executing the command `gcc -c -O -I../libsrc  dumplib.c'.  If this
happens again, then go into that subdirectory and try to execute the
command manually.  Tell me what happens.

> I'm getting lost and confused at this point, so forgive the
> *dumb* questions.
> 
> Thanks, in advance, for the advice and "hand-holding"!

No problem.

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