does not have enough free memory (RAM+swap)

Help
xueming
2013-08-08
2013-10-17
  • xueming
    xueming
    2013-08-08

    I have tried to extract some variables by nco-4.0.6 (nco-4.0.6.win32.cygwin.gz) from cygwin. My PC has 8G memory, and  688055808 bytes= 688055808/1024/1024/1024=0.64GB, but I still get some error message as follow. (The size of file np8_avg_0010.nc is 222.2GB, the size of file np8_avg_2000-1.nc will be about 7GB)

    $ ncks -a -d ocean_time,358,365 np8_avg_0010.nc np8_avg_2000-1.nc
    ncks: ERROR nco_malloc() unable to allocate 688055808 bytes
    ncks: INFO NCO has reported a malloc() failure. malloc() failures usually indicate that your machine does not have enough free memory (RAM+swap) to perform the requested operation. As such, malloc() failures result from the physical limitations imposed by your hardware. Read http://nco.sf.net/nco.html#mmr for a description of NCO memory usage. There are two workarounds in this scenario. One is to process your data in smaller chunks. The other is to use a machine with more free memory.

    Aborted (core dumped)

     
  • Charlie Zender
    Charlie Zender
    2013-08-08

    Your machine has 8 GB RAM. It does not follow that an 0.64 GB request for contiguous RAM, i.e., a malloc(), will succeed. In your case it fails. Unfortunate, yes. Try closing all unnecessary programs first. Not easy with Windows. The error message explains your other options.
    cz