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

Re: 971124: compiling netcdf on VPP 300



> > >Date: Mon, 24 Nov 1997 11:21:41 +0000 (GMT)
> > >From: P M Oliver <address@hidden>
> > >Organization: DCI Systems & User Support Group, RAL
> > >To: Steve Emmerson <address@hidden>
> > >Subject: Re: 971121: compiling netcdf on VPP 300
> > >Keywords: 199711141550.IAA06528
 ...
> Yep, very odd here. With the print statements  it worked here. This
> leadme to believe that the optimisation was going wrong (-O) so I took it
> out and added debugging. All worked until nf_test -c in which it core
> dumped with a floating exeception. I traced this back and it falls over
> in ncx_put_int_double in ncx.c
>
> ix_int xx = (ix_int)(*ip);
>
> This is getting tricky!
>
> Cheers
>
> Pete

Pete:

What is going on here is that we are attempting to assign a
double in *ip whose value is to large to be represented in an
int, to the the int xx. We do this to test the error return in
the next line.

It turns out that generating a SIGFPE is valid thing for a
C implementation to do in this circumstance. So, we disable
SIGFPE in the mainline program, nf_test.F line 258.
        call ignorefpe(1)

ignorefpe() is defined in fortlib.c at line 52.

Apparently ignorefpe() is not doing is's job on your system.

This is bug in the test, not in the library, so you may want to just
not worry about it and move on. If you want to try to just eliminate this
problem, you can try tweaking the appropriate return values of
internal_min() and internal_max() in util.F. I probabaly wouldn't
bother, it will just take you down the garden path. This is poorly
designed test.

-glenn