Compile parallel sbas code - gmtsar/gmtsar GitHub Wiki

Parallel sbas code with OpenMP

  1. go to your GMTSAR/gmtsar directory, in which you'll find a piece of code named sbas_parallel.c
  2. you need to install a gcc compiler that has available -fopenmp option, e.g.
brew install gcc

and you'll find gcc-10 in your Cellar/gcc/$version/bin

  1. figure out the dependencies of sbas code, when you run make install in GMTSAR/gmtsar, e.g. for my laptop, to compile the code, I need to use
/usr/local/Cellar/gcc/10.2.0/bin/gcc-10 -fopenmp -w sbas_parallel.c -I/usr/local/include/gmt -I/usr/local/GMTSAR/gmtsar -I/usr/local/include -L/usr/local/GMTSAR/gmtsar -lgmtsar -L/usr/local/lib -lgmt -framework Accelerate -lm -o sbas_parallel

Put the compiled sbas_parallel code to GMTSAR/bin

  1. to run the sbas_parallel code, one need to export/setenv the number of threads to be used, e.g.
setenv OMP_NUM_THREADS 10
sbas_parallel intf_test.tab scene_test.tab 86 86 533 492 -range 875000 -incidence 40 -wavelength 0.0554658
  1. The code only paralleled the part that computes time-series.
⚠️ **GitHub.com Fallback** ⚠️