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

Re: 971117: compiling netcdf on VPP 300



> > I suggest manually modifying the file libsrc/ncx.h: change the line
> >
> >     #define X_FLOAT_MAX     3.40282347e+38f
> >
> > to
> >
> >     #define X_FLOAT_MAX     3.402823466e+38f
> >
> > or even
> >
> >     #define X_FLOAT_MAX     3.40282346e+38f
> >
> > and excute the command "make" in the libsrc/ directory.  Does the
> > warning dissapear?
> >
>
>
> Yep , but I had to be a bit more forceful ie force FLT_MAX
> 3.40282346e+38f else it kept using the one in /usr/include/float.h set to
> 3.40282347e+38f

So, you are saying that a code sequence like

#include <float.h>

float flt_max = FLT_MAX;

results in a compiler error? Sounds like Fujitsu needs to do some
work on their include files. It is interesting to me that supercomputer
vendors seem to have a hard time with stuff like this. The NEC SX-4
C preprocessor has some glaring errors. This isn't rocket science, and
there are companies which will sell these guys verification suites at
reasonable cost. As users of supercomputers, we need to include these
tests in the acceptance process, or better, require the vendor show
some certification that they are standards conforming, rather than just
taking the vendors word for it and tripping on it later.



> > > *** Testing ncvarputg ...       *** test_ncvarputg: ncvarputg should fail
> > > for non-positive stride
> >
> > Interesting!  Would you please go into the libsrc directory, execute
> > the following test program, and send me the output:
> >
> >     #include <stddef.h>
> >     #include "ncx.h"
> >
> >     void
> >     main()
> >     {
> >     ptrdiff_t   stride = -1;
> >
> >     puts((unsigned long)stride >= X_INT_MAX
> >             ? "(unsigned long)(ptrdiff_t)-1 >= X_INT_MAX"
> >             : "(unsigned long)(ptrdiff_t)-1 < X_INT_MAX");
> >     }
> >
> > It should print the first string.
> >
>
>
> Yep, OK here
>
> (unsigned long)(ptrdiff_t)-1 >= X_INT_MAX
>
>
> > > *** Testing ncvargetg ...       *** test_ncvargetg: ncvargetg should fail
> > > for non-positive stride
> The tests still fail
>
> Thanks
>
> Pete


At the top of src/libsrc/v2i.c, change line 9
from
#if SIZEOF_LONG == SIZEOF_SIZE_T
to
#if 0
and give that a try.

-glenn