V9 os SNAP gpt stops after a few runs

Hi there,
I have installed the latest snap version to launch S2 batch processes.
It used to work perfectly fine with V8.
now my batches freeze after a few iterations. It seems java just stop.

have you got any idea?

Best

Christophe

Hi,
Is there any error/warn displayed in the log? (e.g. out of memory, out of space, etc)

I have checked, it is not a memory issue. The 2 CPUs of my machine varies between 75% and 100% then it drops to almost 0 and there is no sign of java activity.
There is no error message
A few warnings though but nothing important as I remember
INFO: org.esa.snap.core.gpf.operators.tooladapter.ToolAdapterIO: Initializing external tool adapters
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Incompatible GDAL 3.5.0 found on system. Internal GDAL 3.2.1 from distribution will be used.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: GDAL 3.0.4 found on system. JNI driver will be used.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 3.0.4 set to be used by SNAP.
INFO: org.esa.snap.core.util.EngineVersionCheckActivator: Please check regularly for new updates for the best SNAP experience.
INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Installed GDAL 3.0.4 set to be used by SNAP.
Executing processing graph
INFO: org.esa.s2tbx.dataio.s2.ortho.S2OrthoProductReaderPlugIn: Building product reader - EPSG:32619
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [metadata_level] does not exist
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [bandid] does not exist
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [bandid] does not exist
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [bandid] does not exist
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [bandid] does not exist
WARNING: org.esa.snap.core.metadata.GenericXmlMetadata: Metadata: the path to element [bandid] does not exist
INFO: org.hsqldb.persist.Logger: dataFileCache open start
WARNING: org.esa.s2tbx.dataio.s2.ortho.metadata.S2OrthoMetadata: Warning: missing file /mount/data_3/prod_data/gbov/EO/UoS/S2L2/BART/2022/S2A_MSIL2A_20220203T153601_N0400_R111_T19TCJ_20220203T203717.SAFE/GRANULE/L2A_T19TCJ_A034571_20220203T153723/QI_DATA/L2A_T19TCJ_20220203T153601_DDV_20m.jp2

WARNING: org.esa.s2tbx.dataio.s2.ortho.metadata.S2OrthoMetadata: Warning: no image files found for band quality_dense_dark_vegetation

18%36%54%…64%…

Which operators are used in this graph ?
Maybe there’s one problematic …

I am subampling to 20m subsetting to a 5x5km ROI.

here is an example:

1.0

Read


/mount/data_3/prod_data/gbov/EO/UoS/S2L2//BART/2022/S2A_MSIL2A_20220206T154431_N0400_R011_T19TCJ_20220206T202105.SAFE/MTD_MSIL2A.xml



Resample







20
Nearest
Mean
FlagMedianOr


true



Subset





0,0,0,0

POLYGON((-71.3186 44.0864,-71.256 44.0864,-71.256 44.0414,-71.3186 44.0414,-71.3186 44.0864))

1
1
false

true



Write




/mount/internal/work-st/projects/jrc-066/1553-gbov/component1/data/EO/CP1yr3/vegsub/S2L2//BART/2022/S2A_MSIL2A_20220206T154431_N0400_R011_T19TCJ_20220206T202105_resampled_subset.dim
BEAM-DIMAP

















Ouuupps!
the copy past did not work out.
can I attach a file somehow?

Try to use this for the graph xml:

<graph id="Graph">
  <version>1.0</version>
  <node id="Read">
    <operator>Read</operator>
    <sources/>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <file>/mount/data_3/prod_data/gbov/EO/UoS/S2L2//BART/2022/S2A_MSIL2A_20220206T154431_N0400_R011_T19TCJ_20220206T202105.SAFE/MTD_MSIL2A.xml</file>
    </parameters>
  </node>
  <node id="Resample">
    <operator>Resample</operator>
    <sources>
      <sourceProduct refid="Read"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <referenceBand/>
      <targetWidth/>
      <targetHeight/>
      <targetResolution>20</targetResolution>
      <upsampling>Nearest</upsampling>
      <downsampling>Mean</downsampling>
      <flagDownsampling>FlagMedianOr</flagDownsampling>
      <resamplingPreset/>
      <bandResamplings/>
      <resampleOnPyramidLevels>true</resampleOnPyramidLevels>
    </parameters>
  </node>
  <node id="Subset">
    <operator>Subset</operator>
    <sources>
      <sourceProduct refid="Resample"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <sourceBands/>
      <region>0,0,0,0</region>
      <referenceBand/>
      <geoRegion>POLYGON((-71.3186 44.0864,-71.256 44.0864,-71.256 44.0414,-71.3186 44.0414,-71.3186 44.0864))
</geoRegion>
      <subSamplingX>1</subSamplingX>
      <subSamplingY>1</subSamplingY>
      <fullSwath>false</fullSwath>
      <tiePointGridNames/>
      <copyMetadata>true</copyMetadata>
    </parameters>
  </node>
  <node id="Write">
    <operator>Write</operator>
    <sources>
      <sourceProduct refid="Subset"/>
    </sources>
    <parameters class="com.bc.ceres.binding.dom.XppDomElement">
      <file>/mount/internal/work-st/projects/jrc-066/1553-gbov/component1/data/EO/CP1yr3/vegsub/S2L2//BART/2022/S2A_MSIL2A_20220206T154431_N0400_R011_T19TCJ_20220206T202105_resampled_subset.dim</file>
      <formatName>BEAM-DIMAP</formatName>
    </parameters>
  </node>
  <applicationData id="Presentation">
    <Description/>
    <node id="Read">
            <displayPosition x="37.0" y="134.0"/>
    </node>
    <node id="Resample">
      <displayPosition x="163.0" y="145.0"/>
    </node>
    <node id="Subset">
      <displayPosition x="315.0" y="156.0"/>
    </node>
    <node id="Write">
            <displayPosition x="455.0" y="135.0"/>
    </node>
  </applicationData>
</graph>

I used the same as for v8.
could that be the problem?

No, it should not be any problem.

It’s quite a simple graph at first sight.
Same graph, if you run it with gpt from command line, several times (to simulate somehow the issue), does it work?

the test in command line get stuck at 64% then it goes to the end “done”
and it get stuck for good.

important point:
is v9 valid to process the latest S2 processing baseline?

Hello Christophe,

I just ran your graph with one S2 L2A product from 2022 (June, but I guess it doesn’t matter) and it completed in a few seconds:


I have SNAP 9 with 9.0.4 update. But I wrote the result locally on my drive. Are you mounting a NFS share and try to write there?

To answer to your last question: yes, v9 should work with the latest processing baseline (N0400).

1 Like

a few seconds is indeed what it takes usually.
I have the snap version 9.0.0 , downloaded and installed yesterday.
don’t know what to say about gdal. I can not remembre the installer asking about anything particular about gdal

I got the installer from this page:

Never mind my previous comment, the GDAL version is ok but it has nothing to do with what you are trying. Are you using Windows or Linux?

Linux.
and even more strange, if I run the same graph through the GUI, it works fine.
… but not practical as I have several thousand or data to provess.

One band is physically missing?

That was the same in the past. I don’t think this could be the problem and it works on your side and on my side through the GUI

This means the processing is finished, just the gpt process itself is hanged somehow. This issue happened at one update during SNAP 8, solved after in a minor update. Maybe something remained on your PC, try to clean all SNAP cache.
Close SNAP and try to clean everything from the above locations
C:\Users\[username]\.snap
C:\Users\[username]\AppData\Roaming\SNAP or C:\Users\[username]\AppData\Local\SNAP
C:\Users\[username]\AppData\Local\Temp\snap-[username]
Please be aware that this will also clean the installed updates from 9.0.0 until now, and you need to install the updates again.