ACCESS-Cloud-Based-InSAR / DockerizedTopsApp

Apache License 2.0
21 stars 2 forks source link

Add option to set optimum number of threads to `main()` entrypoint #106

Closed jhkennedy closed 1 year ago

jhkennedy commented 1 year ago

ISCE2 uses OpenMP threads for parallelization which can be controlled via an OMP_NUM_THREADS environment variable.

Setting this variable is important to:

When manually running the DockerizedTopsApp container, OMP_NUM_THREADS can be provided as an environment variable. For HyP3 processing jobs, we'd prefer to expose this as an option for better transparency. We've done this already for our other plugins -- ASFHyP3/hyp3-gamma#428 can provide a good template for doing it here.

Notably, we we set the environment variable in main() before we load any of the processing entrypoints to ensure it gets picked up appropriately.