Skip to content

Commit e99aa4d

Browse files
set NUMBA_THREADING_LAYER to 'workqueue' (#59)
* dont set 'omp' threading on darwin, add issue * rename func * remove issue tag * change numba threading layer to 'workque'
1 parent 26ba681 commit e99aa4d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hooks/check_badges.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
import nbformat
1111

1212

13-
def header_text(repo_name, version):
13+
def _header_cell_text(repo_name, version):
1414
if version is None:
1515
version = ""
1616
return f"""import os, sys
17-
os.environ['NUMBA_THREADING_LAYER'] = 'omp' # PySDM and PyMPDATA are incompatible with TBB threads
17+
os.environ['NUMBA_THREADING_LAYER'] = 'workqueue' # PySDM & PyMPDATA don't work with TBB; OpenMP has extra dependencies on macOS
1818
if 'google.colab' in sys.modules:
1919
!pip --quiet install open-atmos-jupyter-utils
2020
from open_atmos_jupyter_utils import pip_install_on_colab
@@ -38,7 +38,7 @@ def check_colab_header(notebook_path, repo_name, fix, version):
3838
nb = nbformat.read(notebook_path, as_version=nbformat.NO_CONVERT)
3939

4040
header_index = None
41-
correct_header = header_text(repo_name, version)
41+
correct_header = _header_cell_text(repo_name, version)
4242
modified = False
4343

4444
if not fix:

test_files/template.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"outputs": [],
3030
"source": [
3131
"import os, sys\n",
32-
"os.environ['NUMBA_THREADING_LAYER'] = 'omp' # PySDM and PyMPDATA are incompatible with TBB threads\n",
32+
"os.environ['NUMBA_THREADING_LAYER'] = 'workqueue' # PySDM & PyMPDATA don't work with TBB; OpenMP has extra dependencies on macOS\n",
3333
"if 'google.colab' in sys.modules:\n",
3434
" !pip --quiet install open-atmos-jupyter-utils\n",
3535
" from open_atmos_jupyter_utils import pip_install_on_colab\n",

0 commit comments

Comments
 (0)