insarlab / MiaplPy

MIAmi Phase Linking in PYthon
Other
85 stars 20 forks source link

snaphu unwrapping not working in tile mode #59

Open falkamelung opened 1 year ago

falkamelung commented 1 year ago

When I run snaphu in tile mode it never finishes. For a relatively large file is runs for 40 minutes and then restarts. To solve the problem I switch off tiling by setting in defaults/miaplpyApp_auto.cfg:

miaplpy.unwrap.snaphu.tileNumPixels       = 1000000000

That works but unwrapping is painfully slow.

Here a number of observed suspicious inconsistencies that might help to debug: miaplpyApp.py produces this command including --num_tiles 3:

unwrap_ifgram.py --ifg /scratch/05861/tg851601/EifelSenDT139/miaplpy_44_201410_202307/inverted/interferograms_single_reference/20190627_20141015/filt_fine.int --coherence /scratch/05861/tg851601/EifelSenDT139/miaplpy_44_201410_202307/inverted/tempCoh_average --unwrapped_ifg /scratch/05861/tg851601/EifelSenDT139/miaplpy_44_201410_202307/inverted/interferograms_single_reference/20190627_20141015/filt_fine.unw --max_discontinuity 1.2 --init_method MCF --length 3602 --width 10149 --height 703006.0668887326 --num_tiles 3 --earth_radius 6373617.816423893  --wavelength 0.05546576 -m /scratch/05861/tg851601/EifelSenDT139/miaplpy_44_201410_202307/inverted/mask_unwrap

However, the snaphu command produced has --tile 2 1 and --nproc 3:

snaphu -f /scratch/05861/tg851601/EifelSenDT139/miaplpy_44_201410_202307/inverted/interferograms_single_reference/20190627_20141015/config_all -d /scratch/05861/tg851601/EifelSenDT139/miaplpy_44_201410_202307/inverted/interferograms_single_reference/20190627_20141015/filt_fine.int 10149 -o /scratch/05861/tg851601/EifelSenDT139/miaplpy_44_201410_202307/inverted/interferograms_single_reference/20190627_20141015/filt_fine.unw --tile 2 1 500 500 --nproc 3

However, the top command shows four snaphu processes.

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                  
231390 tg851601  20   0 7668336   7.3g    632 R 100.0  3.9  10:32.37 snaphu                   
231393 tg851601  20   0 7668336   7.3g    632 R 100.0  3.9  10:29.44 snaphu
231415 tg851601  20   0 7668336   7.3g    632 R 100.0  3.9  10:13.76 snaphu                   
231419 tg851601  20   0 7668336   7.3g    632 R 100.0  3.9  10:10.45 snaphu                   
229930 tg851601  20   0  130760   3396   1608 R   1.0  0.0   0:05.84 top
mirzaees commented 1 year ago

Hi @falkamelung, SNAPHU performance depends on lots of factors including decorrelation and size of the interferogram. There is no unique solution as far as I tried that works for all interferogram. however the parameters are optional and you may change in the template and config file to work for your case study.

the top command as I see in your note above, might show two different runs one starting at 10 and 13 min, the other starting at 29, 32 min. --tile 2 1 means 2*1 = 2 processors are used although specified 3