Skip to content

Commit 8b46eca

Browse files
committed
MIN Limit number of threads
A few different sources for this list of environment variables, for example: https://stackoverflow.com/questions/30791550/limit-number-of-threads-in-numpy ContinuumIO/anaconda-issues#133 /closes #140
1 parent 901acdb commit 8b46eca

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Unreleased
55
* SemiBin: Print version number in logs
66
* SemiBin: Better method to save the model which is more compatible with
77
newer versions of PyTorch
8+
* SemiBin: Respect the number of threads requested better (#140)
89

910
Version 2.1.0 Mar 6 2024 by BigDataBiology
1011
* SemiBin: Support running SemiBin with strobealign-aemb

SemiBin/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def expect_file_list(fs):
9898
os.environ['NUMEXPR_NUM_THREADS'] = str(args.num_process)
9999
os.environ['NUMEXPR_MAX_THREADS'] = str(args.num_process)
100100
os.environ['OMP_NUM_THREADS'] = str(args.num_process)
101+
os.environ['OPENBLAS_NUM_THREADS'] = str(args.num_process)
102+
os.environ['MKL_NUM_THREADS'] = str(args.num_process)
103+
os.environ['VECLIB_MAXIMUM_THREADS'] = str(args.num_process)
101104

102105
if args.cmd in ['train', 'train_semi']:
103106
args.cmd = 'train_semi'

0 commit comments

Comments
 (0)