You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while using the loadGridData function, I get following error:
[2023-03-30 13:53:33] Retrieving data subset ...
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemoryError: Java heap space
Calls: loadGridData ... array -> -> .jrcall -> .jcall -> .jcheck
I tried same code on two different machines, windows and linux, with different files.
On linux, I tried to read nc file of size 4.8GB (25 years of daily data) on a machine that has java heap size assigned to 27.8GB, and it gave me above error.
Then I tried same code with smaller files (~700MB) on a windows machine that has java heap size assigned to 13GB, and it can read only one file. If I try to read two files in a row, I get same error above. (if I use gc() between the files, it reads files with no issues)
It seems that loadGridData requires java heap space size rougly 10 times higher than the file size it is reading, which makes it quite hard to use with bigger files.
Given I am doing quantile mapping, the results will differ whether I do it on whole period or just on part of the period, so I am wondering is there any solution for this~ Thanks in advance!
The text was updated successfully, but these errors were encountered:
My memory was set to 27.8GB. I finally solved the issue by talking to system admin and adjusting java heap size to 100GB on the linux system - options(java.parameters = "-Xmx60g") still gave me same error, 80Gb or 100GB works!! I don't understand why it needs SO much memory, but for some reason it does :/
Hello,
while using the loadGridData function, I get following error:
[2023-03-30 13:53:33] Retrieving data subset ...
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemoryError: Java heap space
Calls: loadGridData ... array -> -> .jrcall -> .jcall -> .jcheck
I tried same code on two different machines, windows and linux, with different files.
On linux, I tried to read nc file of size 4.8GB (25 years of daily data) on a machine that has java heap size assigned to 27.8GB, and it gave me above error.
Then I tried same code with smaller files (~700MB) on a windows machine that has java heap size assigned to 13GB, and it can read only one file. If I try to read two files in a row, I get same error above. (if I use gc() between the files, it reads files with no issues)
It seems that loadGridData requires java heap space size rougly 10 times higher than the file size it is reading, which makes it quite hard to use with bigger files.
Given I am doing quantile mapping, the results will differ whether I do it on whole period or just on part of the period, so I am wondering is there any solution for this~ Thanks in advance!
The text was updated successfully, but these errors were encountered: