Error in running mt_prep_snap in Linux

I am using 25 images.

They look fine to me:

By the way, I am using Ubuntu WSL so I cannot understand if the problem is linked to some troubles in Ubuntu.
I am new in SNAP and Linux world.


the problem is that the error message is not very specific. There can be many reasons why the processing does not start as suggested but it’s hard to guess the correct one.

I see you have created a subset from your interferograms. Did you clip the stack of images to the same extent? Both stacsk used for the export must have the same dimensions .

Yeah I got it.
It is very difficult to get what is the reason of the error.

I did debursting -> subsetting --> interferogram formation
So the subset stack image has the same dimension of the subset interferogram one.


so we can exclude that as an error source.

How do the interfergrams look like? Have you opened them and checked if they contain valid data?

This is my first time with SAR images.
They look fine to me.

yes, that’s ok for PS InSAR.
I don’t see an error here.

And also the PSI export does not give me problem.

There are all the folders to start the mt_prep_snap command

and the Stamps_config should be ok

in case you are still in this trouble.

several tips you may check:

  1. use csh other than bash. The mt_prep_snap seems not working in bash but go smooth in csh.
  2. check if the segmentation error were casued by calamp.c. If it is, then you have to downgrade you gcc and g++ compiler. I did this in fedora 30 with default gcc version 9.2x, the calamp.c program intends to use 4.3.x version. However, I managed to recompile it using gcc-7.4.0 version and that get rid of the segmentation fault.
  3. feed mt_prep_snap’s second parameter(data folder) with absolute path, do not use relative path.

I digged these out after 2 weeks of struggling and it seems everthing goes ok so far. I am waiting for the finish of stamps process in matlab:)


these are good hints, thank you for sharing.

do you remember how did you solve your problem, because i have the same and i can not find any solution. if you can to give some advises I will be grateful. Thank you.

maybe you can report on the suggestions first.
Have you tried using tcsh and launching the StaMPS_Config.tcsh instead?

Dear all,
I tried to work with tcsh but something goes wrong, sometime i can source StaMPS_CONFIG.tcsh but sometimes i got errors , really I don’t know where comes de mistakes. you can see it in the following picture. Thank you for helping me.

before you can call the StaMPS_CONFIC.tcsh you have to switch to the tcsh console by simply typing tcsh
The commands inside then will be interpreted correctly.

For StaMPS to work properly, you also need triangle.

I did it and I got the same problem.

it is strange that snaphu is found but the StaMPS scripts not. Are they located in this folder?

The MATLABPATH definiton is strange and somehow differs from the one I expected

Please download StaMPS from here and re-configure the installation and the paths in this file:

Dear all,
I installed Stamps from de site (, i worked with tcsh but something goes wrong. sometimes tcsh works without fault but sometimes appear a message " MATLABPATH: Undefined variable." well you can see it bellow. mt_prep_snap ran now but i got the same message Segmentation fault (core dumped), the memory of my system is 32Go. Please if you can give some advises where can I look for the solution.

can you please nagivate one directory upwards (cd …) and then execute the command without the ./ before the path leading to the folder exported from SNAP?

I did it and i see the same errors, I tried also to work in my extern disk but the same thing.

really I dont’ know where is the fault, I did the change you gave me yesterday but the problem is still remain . yesterday I processed my data in snap one more time i did a new export from snap to stamps but the same problem.
i hope that you can see what i can not see. thank you a lot.