Skip to content

Commit

Permalink
Fix OMP warnings in UMAP tests
Browse files Browse the repository at this point in the history
Explicitly sets the threading layer for Numba to a simple implementation
that should always be available. UMAP uses Numba internally and, on some
systems, the Numba threading layer can get set to an OpenMP (OMP)
backend. Since Numba internally calls OMP with a function that is
deprecated, OMP emits a deprecation warning. This warning is especially
useless since we force UMAP to run with a single CPU. The main effect of
this warning was to break our functional tests.

For more details, see this Numba issue comment on GitHub:
numba/numba#5275 (comment)
  • Loading branch information
huddlej committed Jun 3, 2024
1 parent f5e4eae commit 051f8c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/pathogen-embed-umap-with-distances.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Always use the simplest Numba threading layer, to avoid lower-level OMP warnings.

$ export NUMBA_THREADING_LAYER=workqueue

Get a distance matrix from a H3N2 HA alignment.

$ pathogen-distance \
Expand Down
4 changes: 4 additions & 0 deletions tests/pathogen-embed-umap.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Always use the simplest Numba threading layer, to avoid lower-level OMP warnings.

$ export NUMBA_THREADING_LAYER=workqueue

Run pathogen-embed with UMAP on a H3N2 HA alignment.

$ pathogen-embed \
Expand Down

0 comments on commit 051f8c1

Please sign in to comment.