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

[netCDFJava #IAZ-886449]: [netCDF-Java #RQL-102327] Java heap space: out of memory



Enes,

From the looks of your code, you're creating "depth" as a double array (which 
mean 8 bytes for each value). With your dimensions (lat = 46391, lon=29912), 
that means the entire size of the array you're trying to allocate is:

total = 46391 * 29912 * 8 = 11101180736

or 10.3 GB. You may be able to squeeze it in by using FLOAT instead of DOUBLE; 
that would cut your memory usage in half. I'm not sure if an approximately 
5.1GB array would leave you enough room for other things to stay under the 6GB 
heap limit.

Ryan

> Full Name: Enes Köse
> Email Address: address@hidden
> Organization: dotNes
> Package Version: 4.6.4
> Operating System: Windows 7 x64
> Hardware: Eclipse Luna, Java jdk7
> Description of problem:
> 
> Hi,
> 
> I am using netcdf to make a grid of lat/lon points with their
> corresponding depth value. The grid I try to make is quite large
> (46.391x29.912) but not impossible for netcdf to handle, me thinks.
> 
> Using version netcdf3c64 OR 4, I keep getting the problem of Java heap
> space (out of memory error) error.
> 
> My eclipse is configured with a maximum heap space of 6GB so,
> unsufficient memory could not be it, rather perhaps a memory leak within
> NetcdfFileWriter that is causing this?
> 
> Thanks in advance for helping me out.
> 
> Have a nice one!
> 
> 

Ticket Details
===================
Ticket ID: IAZ-886449
Department: Support netCDF Java
Priority: Normal
Status: Closed