Skip to content

Commit

Permalink
Merge pull request #8 from maronuu/section/multi-threading
Browse files Browse the repository at this point in the history
Fix multi-threading
  • Loading branch information
matsui528 authored Nov 2, 2023
2 parents bad5561 + 7d1e973 commit 078bdb4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,15 @@ To always use the maximum number of threads, set them as follows. This is useful
```bash
// set number of threads (depends on your CPU environment)
export MKL_NUM_THREADS=8
export OMP_NUM_THREADS=8
// disable dynamic thread adjustment for openmp
export OMP_DYNAMIC=FALSE
// disable dynamic thread adjustment for mkl
export MKL_DYNAMIC=FALSE
// set max level of nested parallelism
// `export OMP_NESTED=TRUE` is deprecated, so we use:
export OMP_MAX_ACTIVE_LEVEL=32 (large enough)
// `export OMP_NESTED=TRUE` is deprecated, so we use `OMP_MAX_ACTIVE_LEVEL` instead
// set it to large enough value
export OMP_MAX_ACTIVE_LEVEL=32
```

You can also specify the number of threads from within the program as follows:
Expand Down

0 comments on commit 078bdb4

Please sign in to comment.