You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using scipy's weave to speed up some numerically-intensive routines. I have a problem importing an extension created through weave.
Specifically, while weave successfully imports (and runs) the module it has compiled I cannot import the module outside of weave. Importing from a python prompt results in "undefined symbol" error. The exact error message is pasted below.
I can fix the error by passing an extra library to the linker at compile time (in this case gslcblas as the libraries arguments to weave.inline() ). However I wonder how weave is able to import the module without problems? I think this is related to a bigger performance issue I care about.
The python version I use in both cases is the same (the environment, as far as I can tell, is also exactly the same).
Thanks!
Importing the module from a Python prompt fails:
$ python2.7
import sc_e6d71e9b4074eed34d1cb1112482ee6212
Traceback (most recent call last):
File "", line 1, in
ImportError: /usr/lib64/libgsl.so.0: undefined symbol: cblas_ctrmv
Compilation log:
<weave: compiling>
running build_ext
running build_src
build_src
building extension "sc_e6d71e9b4074eed34d1cb1112482ee6213" sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'sc_e6d71e9b4074eed34d1cb1112482ee6213' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
compile options: '-I/usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave -I/usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave/scxx -I/usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
extra options: '-march=native -fopenmp -O3 -lpthread'
g++: .cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.cpp
In file included from /usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from /usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from .cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.cpp:22:
/usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
g++: /usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp
g++ -pthread -shared /tmp/scipy-lcharlin-TBGEf5/python27_intermediate/compiler_fd2a2fbe93416fc0ff84072f09de2daf/.cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.o /tmp/scipy-lcharlin-TBGEf5/python27_intermediate/compiler_fd2a2fbe93416fc0ff84072f09de2daf/usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave/scxx/weave_imp.o -L/usr/lib64 -lgomp -lgsl -lpython2.7 -o .cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.so
The text was updated successfully, but these errors were encountered:
I've been using scipy's weave to speed up some numerically-intensive routines. I have a problem importing an extension created through weave.
Specifically, while weave successfully imports (and runs) the module it has compiled I cannot import the module outside of weave. Importing from a python prompt results in "undefined symbol" error. The exact error message is pasted below.
I can fix the error by passing an extra library to the linker at compile time (in this case
gslcblas
as the libraries arguments to weave.inline() ). However I wonder how weave is able to import the module without problems? I think this is related to a bigger performance issue I care about.The python version I use in both cases is the same (the environment, as far as I can tell, is also exactly the same).
Thanks!
Importing the module from a Python prompt fails:
$ python2.7
Compilation log:
<weave: compiling>
running build_ext
running build_src
build_src
building extension "sc_e6d71e9b4074eed34d1cb1112482ee6213" sources
build_src: building npy-pkg config files
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'sc_e6d71e9b4074eed34d1cb1112482ee6213' extension
compiling C++ sources
C compiler: g++ -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC
compile options: '-I/usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave -I/usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave/scxx -I/usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
extra options: '-march=native -fopenmp -O3 -lpthread'
g++: .cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.cpp
In file included from /usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1761:0,
from /usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from .cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.cpp:22:
/usr/local/python/2.7/numpy-mkl/1.8.1/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
g++: /usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave/scxx/weave_imp.cpp
g++ -pthread -shared /tmp/scipy-lcharlin-TBGEf5/python27_intermediate/compiler_fd2a2fbe93416fc0ff84072f09de2daf/.cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.o /tmp/scipy-lcharlin-TBGEf5/python27_intermediate/compiler_fd2a2fbe93416fc0ff84072f09de2daf/usr/local/python/2.7/scipy-mkl/0.14.0/lib64/python2.7/site-packages/scipy/weave/scxx/weave_imp.o -L/usr/lib64 -lgomp -lgsl -lpython2.7 -o .cache/scipy/python27_compiled/sc_e6d71e9b4074eed34d1cb1112482ee6213.so
The text was updated successfully, but these errors were encountered: