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

Re: netcdf 2.4 on vax (milton)



> 'make test' of netcdf 2.4 (using gcc) fails
> on vax ultrix (milton)
>
>
>  ...
> making `test' in directory /export/local/vax.u4_3/netcdf/src/nctest
>  ...
>
> *** Testing ncvardef ...        *** test_ncvardef: unwritten double not
FILL_DOUBLE
> *** test_ncvardef: unwritten double not FILL_DOUBLE
> FAILED! ***
   ...

This is isolated to be a compiler problem.
The encodeing from the string 9.9692099683868690e+36 (FILL_DOUBLE)
to the actual floating point value is not being done correctly.
The version of gcc is 2.3.3. This problem goes away if vcc is used.
However, if vcc is used, 'ncgen' gets a compiler warning and
dumps core on running.

There is a workaround for the gcc problem.
Add the following lines to netcdf.h after the definition of FILL_DOUBLE.

#ifdef vax
/*
 * Workaround for problems with vax strtod() or
 * whatever is used by the compiler
 */
#undef FILL_DOUBLE
extern double ldexp(double, int); /* math.h */
#define FILL_DOUBLE     (ldexp(1.875, 122))
#endif

It may be worthwhile to build the current version of gcc on milton.

> making `test' in directory /export/local/vax.u4_3/netcdf/src/fortran
>
> ./fortc -L . -O ultrix ftest.src > ftest.f
> f77 -c  ftest.f
> ftest.f:
>    MAIN ftest:
> Error on line 158 of netcdf.inc: Execution error: unclassifiable statement

This problem is still open.
I'm moving on...

-glenn