Skip to content

Reduce overload during parallelization #150

Open
Andreas-Piter wants to merge 8 commits into
mainfrom
dev/parallelization
Open

Reduce overload during parallelization #150
Andreas-Piter wants to merge 8 commits into
mainfrom
dev/parallelization

Conversation

@Andreas-Piter

Copy link
Copy Markdown
Member

Description

Many steps of SARvey are parallelized either explicitly using multiprocessing or with native-threading of external libraries such as scipy or numpy. While the number of cores for parallel processing with multiprocessing can be adjusted in the configuration file, the number of cores for native parallelization, i.e.

  • OMP_NUM_THREADS
  • OPENBLAS_NUM_THREADS
  • MKL_NUM_THREADS
  • NUMEXPR_NUM_THREADS

had to be set outside in the environment. Now, the number of cores for native threads are set inside SARvey to the given number of cores from the config, but only if it was not set before in the environment variables. Thereby, the user has full control.

To reduce computational overhead, the number of cores is explicitly adjusted to the number of tasks done in parallel.
However, computational overhead might still happen for processing steps in which multiprocessing and native threads are used in parallel. Optimal balance between these two are is still to be determined by experiments.


Type of change

  • Documentation update
  • Improvement

Checklist

  • Make test.
  • Make lint.
  • Remove obsolete print statements.
  • Update History.rst.
  • Update the documentation.
  • Update the dependencies for installation.

@Andreas-Piter Andreas-Piter self-assigned this Mar 20, 2026
…native thread default to 1. Fix bug in densification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant