Skip to content

Commit

Permalink
Merge pull request #132 from ACCESS-Cloud-Based-InSAR/resource-compet…
Browse files Browse the repository at this point in the history
…ition

Add option to control OpenMP threads
  • Loading branch information
cmarshak authored Aug 8, 2023
2 parents 5e9e433 + 47a64ae commit 121e6c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.4]

### Added
* `++omp-num-threads` parameter to the `main()` entrypoint to limit the number of threads used by ISCE2 during
multiprocessing.

### Fixed
* For Solid Earth Tide computation, use azimuth timing to calculate solid earth tide in `science/grids/imagingGeometry` reference frame using ISCE2 rdr2geo.
* Include topsapp_iono template.
Expand Down
11 changes: 11 additions & 0 deletions isce2_topsapp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,19 @@ def main():
default="gunw_slc",
help="Select the HyP3 entrypoint to use",
)
parser.add_argument(
"++omp-num-threads",
type=int,
help=("The number of OpenMP threads to use for parallel processing in ISCE2 routines; "
"when running locally, this topsapp will utilize all resources, which is not recommended; "
"suggest to set this option to 8 - 16 so other processes on server/workstation can running.")
)

args, unknowns = parser.parse_known_args()

if args.omp_num_threads:
os.environ["OMP_NUM_THREADS"] = str(args.omp_num_threads)

sys.argv = [args.process, *unknowns]
# FIXME: this gets better in python 3.10
# (process_entry_point,) = entry_points(group='console_scripts', name=args.process)
Expand Down

0 comments on commit 121e6c5

Please sign in to comment.