8000 BLD: fix `_umath_linalg` dependencies (#24584) · numpy/numpy@a115ed3 · GitHub
[go: up one dir, main page]

Skip to content

Commit a115ed3

Browse files
steppirgommers
andauthored
BLD: fix _umath_linalg dependencies (#24584)
Closes gh-24512, where `linalg.eigvalsh` was observed to be non-thread safe. This was due to the non-thread safe `lapack_lite` being called instead of the installed BLAS/LAPACK. Co-authored-by: Ralf Gommers <ralf.gommers@gmail.com>
1 parent b43384e commit a115ed3

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

numpy/linalg/meson.build

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
1+
# Note that `python_xerbla.c` was excluded on Windows in setup.py;
2+
# unclear why and it seems needed, so unconditionally used here.
13
lapack_lite_sources = [
2-
'lapack_lite/f2c.c',
3-
'lapack_lite/f2c_c_lapack.c',
4-
'lapack_lite/f2c_d_lapack.c',
5-
'lapack_lite/f2c_s_lapack.c',
6-
'lapack_lite/f2c_z_lapack.c',
7-
'lapack_lite/f2c_blas.c',
8-
'lapack_lite/f2c_config.c',
9-
'lapack_lite/f2c_lapack.c',
104
'lapack_lite/python_xerbla.c',
115
]
12-
13-
# TODO: ILP64 support
14-
15-
lapack_lite_module_src = ['lapack_litemodule.c']
166
if not have_lapack
17-
lapack_lite_module_src += lapack_lite_sources
7+
lapack_lite_sources += [
8+
'lapack_lite/f2c.c',
9+
'lapack_lite/f2c_c_lapack.c',
10+
'lapack_lite/f2c_d_lapack.c',
11+
'lapack_lite/f2c_s_lapack.c',
12+
'lapack_lite/f2c_z_lapack.c',
13+
'lapack_lite/f2c_blas.c',
14+
'lapack_lite/f2c_config.c',
15+
'lapack_lite/f2c_lapack.c',
16+
]
1817
endif
1918

2019
py.extension_module('lapack_lite',
21-
lapack_lite_module_src,
20+
[
21+
'lapack_litemodule.c',
22+
lapack_lite_sources,
23+
],
2224
dependencies: [np_core_dep, blas_dep, lapack_dep],
2325
install: true,
2426
subdir: 'numpy/linalg',
2527
)
2628

27-
_umath_linalg_src = ['umath_linalg.cpp'] + lapack_lite_sources
28-
2929
py.extension_module('_umath_linalg',
30-
_umath_linalg_src,
31-
dependencies: np_core_dep,
30+
[
31+
'umath_linalg.cpp',
32+
lapack_lite_sources,
33+
],
34+
dependencies: [np_core_dep, blas_dep, lapack_dep],
3235
link_with: npymath_lib,
3336
install: true,
3437
subdir: 'numpy/linalg',

0 commit comments

Comments
 (0)
0