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

20000713: Run time array bounds error in netCDF3.5_beta: AIX 3 4



Paul,

>Date: Thu, 13 Jul 2000 13:24:28 -0400
>From: Paul van Delst <address@hidden>
>Organization: CIMSS @ NOAA/NCEP
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20000713: Run time array bounds error in netCDF3.5_beta: AIX 3 4
>Keywords: 200007121558.e6CFwPT11383

In the above message, you wrote:

> Hmm, I'm confused. I'm seeing (at least what I think is) the same error
> whether I use the netCDF library on an SGI (Origin) or an IBM. The
> difference is that the SGI issues a warning rather than halting
> execution when everything is compiled with "-C" (the SGI compiler docs
> say that execution *should* halt, but it doesn't. This is a drag).
> 
> So I guess I don't understand what you mean when you say the bug(s?) (in
> util.F?) would not cause the current release (the 3.5 beta?) to be
> incorrect. During "regular" use of the netCDF library I get warnings so
> somewhere something is screwy. 

The things that cause the array-bounds checking "errors" are like the
following

    function func(index, ...)
    integer index(1)
    ...
    do 999 i = 1, 5
        ... index(i) ...
999 continue

This occurs in places where it is known, a priori, that index(1) through
index(5) are valid.  So, while technically incorrect, the code will
function correctly nevertheless.

The solution to your problem of seeing the messages is to build the
netCDF library without using the "-C" option.

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>