Skip to content

Commit 313eea8

Browse files
author
Dani Pinyol
committed
fix: honour JULIA_NUM_THREADS
1 parent 8f7baa5 commit 313eea8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pysrc/juliacall/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ def args_from_config(config):
173173
CONFIG['opt_optimize'] = choice('optimize', ['0', '1', '2', '3'])[0]
174174
CONFIG['opt_procs'] = int_option('procs', accept_auto=True)[0]
175175
CONFIG['opt_sysimage'] = sysimg = path_option('sysimage', check_exists=True)[0]
176-
CONFIG['opt_threads'] = option('threads', default='1')[0]
176+
env_threads=os.getenv('JULIA_NUM_THREADS','1')
177+
CONFIG['opt_threads'] = option('threads', default=env_threads)[0]
177178
CONFIG['opt_warn_overwrite'] = choice('warn_overwrite', ['yes', 'no'])[0]
178179
CONFIG['opt_handle_signals'] = choice('handle_signals', ['yes', 'no'])[0]
179180
CONFIG['opt_startup_file'] = choice('startup_file', ['yes', 'no'])[0]

0 commit comments

Comments
 (0)