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

Re: 950602: ncattput: NC_new_array: Not enough space



>Organization: BMRC
>Keywords: 199506020618.AA12340 netCDF ncapt

Hi Asri,

> We  will really appreciate some help on this one.
> After several dozens calls to ncapt in our program such as the following:
> 
>        ...
>        iattl = jmt * lseg
>        print*,' calling ncapt no. 66'
>        call ncapt(ncid,NCGLOBAL,'ist',NCFLOAT,iattl,ist,iret)
>        ...
> 
> We got the following message:
> 
>        ncattput: NC_new_array: Not enough space
> 
> We do not understand what that is suppose to mean. Please help.

It means that a call to malloc(3) to allocate memory failed.  The ncattput()
function called the NC_new_array() function in several places to allocate
memory.

The failure of malloc might occur either because you don't have enough swap
space configured on your system, some previous call to malloc has (perhaps
inadvertently) allocated all remaining memory, the size you are specifying
for the attribute size is very large and there is not enough memory to hold
a copy of it, or your program is operating in an environment without much
memory (perhaps because of memory used by other processes on the system).  I
would advise first checking the value of iattl above, to make sure it isn't
huge because of something else having been inadvertently overwritten by an
errant pointer.

--Russ

______________________________________________________________________________

Russ Rew                                           UCAR Unidata Program
address@hidden                              http://www.unidata.ucar.edu