DinhHoTongMinh / TomoSAR

Open-source TomoSAR package for PSDSInSAR and ComSAR algorithms
Apache License 2.0
120 stars 36 forks source link

Segmentation core dump when running mt_prep_snap #3

Closed bjmarfito closed 2 years ago

bjmarfito commented 2 years ago

Hi @DinhHoTongMinh, I have just stacked Sentinel-1 SLC images using Snap. However, I encountered the error "segmentation fault (core dumped)" while running the mt_prep_snap to be able to generate files that can be ingested into TomoSAR. Could you help me fix this issue?

Below are the details of the error.

(base)bjmarfito@ubuntu:/media/bjmarfito/BJM_WD_Blk/Taal_TS/snap2stamps/INSAR_20190102$ mt_prep_snap 20190102 '/media/bjmarfito/BJM_WD_Blk/Taal_TS/snap2stamps/INSAR_20190102' 0.25
mt_prep_snap Andy Hooper, August 2017

Amplitude Dispersion Threshold: 0.25
Processing 1 patch(es) in range and 1 in azimuth

opening /media/bjmarfito/BJM_WD_Blk/Taal_TS/snap2stamps/INSAR_20190102/rslc/20190102.rslc...
Segmentation fault (core dumped)
19218
4725
mt_extract_cands Andy Hooper, Jan 2007

Patch: PATCH_1
selpsc_patch /media/bjmarfito/BJM_WD_Blk/Taal_TS/snap2stamps/INSAR_20190102/selpsc.in patch.in pscands.1.ij pscands.1.da mean_amp.flt f 1 
file name for zero amplitude PS: pscands.1.ij0
dispersion threshold = 0.25
width = 19218
number of amplitude files = 0
Segmentation fault (core dumped)

psclonlat /media/bjmarfito/BJM_WD_Blk/Taal_TS/snap2stamps/INSAR_20190102/psclonlat.in pscands.1.ij pscands.1.ll
opening pscands.1.ij...
Error opening file pscands.1.ij

pscdem /media/bjmarfito/BJM_WD_Blk/Taal_TS/snap2stamps/INSAR_20190102/pscdem.in pscands.1.ij pscands.1.hgt
opening pscands.1.ij...
pscdem: Error opening file pscands.1.ij

pscphase /media/bjmarfito/BJM_WD_Blk/Taal_TS/snap2stamps/INSAR_20190102/pscphase.in pscands.1.ij pscands.1.ph
opening pscands.1.ij...
Error opening file pscands.1.ij
DinhHoTongMinh commented 2 years ago

Hi @bjmarfito, This is due to a compiled error. It can be solved by Installing g++-7 and gcc-7 (just incase, to make sure both are present) Changing the compiler from CC = g++ to CC = g++-7 in the StaMPS_master/src/Makefile cd StaMPS_master/src make make install

After stamps_export, please run TomoSAR. You then can run 'mt_prep_snap_psds' or 'mt_prep_snap_comp'. Please have a look in 'https://github.com/DinhHoTongMinh/TomoSAR/blob/main/PSDS_ComSAR_README.md'

bjmarfito commented 2 years ago

It worked as you have suggested. Thank you @DinhHoTongMinh!