numexpr icon indicating copy to clipboard operation
numexpr copied to clipboard

Wrong separator for MKL libraries in setup.py?

Open alexvorobiev opened this issue 3 years ago • 2 comments

This line https://github.com/pydata/numexpr/blob/b5271857db3ff3921ea1796da3d48ed56e5402f6/setup.py#L75 uses os.pathsep as a separator for MKL libraries. In my setup in the site.cfg I see

libraries=lapack,lapacke,blas,cblas

so the separator is a comma and the build fails. Once I patched setup.py to use commas instead of os.pathsep the build succeeded.

alexvorobiev avatar May 17 '22 18:05 alexvorobiev

Without knowing what operating system you are using I can't provide useful feedback.

robbmcleod avatar Jun 24 '22 04:06 robbmcleod

I am on Linux, so the path separator is a colon which is a wrong thing to use in the list of the libraries to give to the compiler. It interprets it as part of the libraries' names, so it thinks that the list is actually one long library name.

alexvorobiev avatar Jun 26 '22 20:06 alexvorobiev

It seems that Numexpr has nothing to do with blas, cblas, and lapack. Actually we link to mkl because we want to utilize the VML library. In other words, we could leave that option to be mkl_rt, and that's enough. (not very sure)

And as we can see in the site.cfg.example, the comment reads: Please note that the valid os.pathsep is ; on Windows and : on Linux. If the user follow the instructions, then it won't be a big problem.

27rabbitlt avatar Nov 17 '22 09:11 27rabbitlt

libraries should be comma-separated. But the linker is being invoked as if the comma-separated list is one file. This parsing diverges from numpy, which seems like a bug.

de11n avatar Jul 28 '23 18:07 de11n