I tried to mosaic daily images to get a yearly average map over a large area, and received the following error:
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
SEVERE: org.esa.s2tbx.dataio.gdal.activator.GDALDistributionInstaller: The environment variable LD_LIBRARY_PATH is not set. It must contain the current folder '.'.
Executing processing graph
INFO: org.hsqldb.persist.Logger: dataFileCache open start
done.
java.lang.OutOfMemoryError: Java heap space
at org.esa.snap.core.datamodel.ProductData$Byte.<init>(ProductData.java:1073)
at org.esa.snap.core.datamodel.ProductData$ASCII.<init>(ProductData.java:2806)
at org.esa.snap.core.datamodel.ProductData$ASCII.createDeepClone(ProductData.java:2871)
at org.esa.snap.core.datamodel.MetadataAttribute.createDeepClone(MetadataAttribute.java:76)
at org.esa.snap.core.datamodel.MetadataElement.createDeepClone(MetadataElement.java:633)
at org.esa.snap.core.datamodel.MetadataElement.createDeepClone(MetadataElement.java:637)
at org.esa.snap.core.util.ProductUtils.copyMetadata(ProductUtils.java:1643)
at org.esa.snap.core.util.ProductUtils.copyMetadata(ProductUtils.java:1611)
at org.esa.snap.core.gpf.common.reproject.ReprojectionOp.initialize(ReprojectionOp.java:267)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:486)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:273)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:387)
at org.esa.snap.core.gpf.GPF.createProductNS(GPF.java:318)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:293)
at org.esa.snap.core.gpf.GPF.createProduct(GPF.java:272)
at org.esa.snap.core.gpf.common.MosaicOp.createReprojectedProducts(MosaicOp.java:377)
at org.esa.snap.core.gpf.common.MosaicOp.initialize(MosaicOp.java:145)
at org.esa.snap.core.gpf.internal.OperatorContext.initializeOperator(OperatorContext.java:486)
at org.esa.snap.core.gpf.internal.OperatorContext.getTargetProduct(OperatorContext.java:273)
at org.esa.snap.core.gpf.Operator.getTargetProduct(Operator.java:387)
at org.esa.snap.core.gpf.graph.NodeContext.initTargetProduct(NodeContext.java:77)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:195)
at org.esa.snap.core.gpf.graph.GraphContext.initNodeContext(GraphContext.java:178)
at org.esa.snap.core.gpf.graph.GraphContext.initOutput(GraphContext.java:162)
at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:91)
at org.esa.snap.core.gpf.graph.GraphContext.<init>(GraphContext.java:64)
at org.esa.snap.core.gpf.graph.GraphProcessor.executeGraph(GraphProcessor.java:128)
at org.esa.snap.core.gpf.main.DefaultCommandLineContext.executeGraph(DefaultCommandLineContext.java:86)
at org.esa.snap.core.gpf.main.CommandLineTool.executeGraph(CommandLineTool.java:534)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraph(CommandLineTool.java:388)
at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:287)
at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:188)
Error: Java heap space
My gpt setting according to : gpt --diag
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
SNAP Release version 6.0
SNAP home: /home/user/Programs/snap/bin//..
SNAP debug: null
SNAP log level: null
Java home: /home/user/Programs/snap/jre
Java version: 1.8.0_102
Processors: 56
Max memory: 18.7 GB
Cache size: 1024.0 MB
Tile parallelism: 56
Tile size: 512 x 512 pixels
To configure your gpt memory usage:
Edit snap/bin/gpt.vmoptions
To configure your gpt cache size and parallelism:
Edit .snap/etc/snap.properties or gpt -c ${cachesize-in-GB}G -q ${parallelism}
the computer configuration is:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 56
CPU family: 6
Total Memory: 32G
Swap memory: 15G
I have tried the following strategies according to previous posts in this forum, but not work.
-
edit the snap/etc/snap.conf, as this post suggested.
default_options=
, modified-J-Xmx21G
to-J-Xmx10G
or-J-Xmx25G
; the computer has 32G of physical memory. 21G may be ideal as 70% according to this post -
add performance setting during the running:
gpt -c 1G -q 30 -x ............
, combined or separately, according to this same post.
Any suggestions?