[SciPy-user] how to import umfpack?

Robin robince@gmail....
Mon Feb 11 14:02:22 CST 2008


So I've tried to play around with rebuilding UMFPACK and scipy, but
haven't had any luck.

In UFconfig.mk this is my BLAS and LAPACK settings:
BLAS = -L/usr/lib/gcc/x86_64-linux-gnu/4.2.1
-L/home/robince/scipy_build/lib -llapack -lf77blas -lcblas -latlas
-lgfortran
LAPACK = -L/usr/lib/gcc/x86_64-linux-gnu/4.2.1
-L/home/robince/scipy_build/lib -llapack -lf77blas -lcblas -latlas
-lgfortran

Also CFLAGS = -O3 -fPIC -m64 -fexceptions

This is the only way I have been able to get UMFPACK to build,
anything I tried to change (about linking with gfortran) caused build
errors).

For Lapack I added -fPIC and -m64 to all the FLAGS and otherwise used
the make.inc.gfortran values.

For ATLAS I used the following configure command:
../configure -b 64 -Fa alg -fPIC
--with-netlib-lapack=/home/robince/scipy_build/lapack-3.1.1/lapack_LINUX.a

For scipy:
python setup.py build
and from the config output it is picking up gfortran, ATLAS, UMFPACK, AMD ok.
Build completed without errors.

Any ideas where I'm going wrong that is causing this problem with
gfortran symbols when import umfpack? The only thing I can think is
that it is to do with libgfortran being in a funny place
(/usr/lib/gcc/x86_64-linux-gnu/4.2.1), but as I mentioned earlier
LD_LIBRARY_PATH doesn't seem to make any difference.

Here is ldd -r on __umfpack.so if it can through any light. ldd
doesn't report any dependency from __umfpack.so on libgfortran anyway
- how should that get there? (at which stage). I have to admit I'm
reaching the limits of my knowledge in terms of building/shared
libraries (as I always seem to when trying to build numpy/scipy!)

robince@bob64:/usr/lib/python2.5/site-packages/scipy/splinalg/dsolve/umfpack$
ldd -r  __umfpack.so
undefined symbol: PyObject_GenericGetAttr       (./__umfpack.so)
undefined symbol: PyExc_ImportError     (./__umfpack.so)
undefined symbol: PyExc_ValueError      (./__umfpack.so)
undefined symbol: PyInstance_Type       (./__umfpack.so)
undefined symbol: PyExc_SystemError     (./__umfpack.so)
undefined symbol: PyList_Type   (./__umfpack.so)
undefined symbol: PyExc_TypeError       (./__umfpack.so)
undefined symbol: PyInt_Type    (./__umfpack.so)
undefined symbol: _PyWeakref_CallableProxyType  (./__umfpack.so)
undefined symbol: PyExc_SyntaxError     (./__umfpack.so)
undefined symbol: PyExc_ZeroDivisionError       (./__umfpack.so)
undefined symbol: PyExc_IndexError      (./__umfpack.so)
undefined symbol: PyExc_MemoryError     (./__umfpack.so)
undefined symbol: PyTuple_Type  (./__umfpack.so)
undefined symbol: PyExc_RuntimeError    (./__umfpack.so)
undefined symbol: PyType_Type   (./__umfpack.so)
undefined symbol: PyExc_IOError (./__umfpack.so)
undefined symbol: PyLong_Type   (./__umfpack.so)
undefined symbol: _Py_NoneStruct        (./__umfpack.so)
undefined symbol: PyExc_OverflowError   (./__umfpack.so)
undefined symbol: PyExc_AttributeError  (./__umfpack.so)
undefined symbol: _PyWeakref_ProxyType  (./__umfpack.so)
undefined symbol: PyCObject_Type        (./__umfpack.so)
undefined symbol: PyModule_AddObject    (./__umfpack.so)
undefined symbol: PyDict_SetItemString  (./__umfpack.so)
undefined symbol: PyString_AsString     (./__umfpack.so)
undefined symbol: PyArg_UnpackTuple     (./__umfpack.so)
undefined symbol: sqrt  (./__umfpack.so)
undefined symbol: _gfortran_st_write_done       (./__umfpack.so)
undefined symbol: Py_InitModule4_64     (./__umfpack.so)
undefined symbol: PyLong_FromVoidPtr    (./__umfpack.so)
undefined symbol: _gfortran_transfer_integer    (./__umfpack.so)
undefined symbol: PyCObject_FromVoidPtr (./__umfpack.so)
undefined symbol: PyBool_FromLong       (./__umfpack.so)
undefined symbol: ceil  (./__umfpack.so)
undefined symbol: _PyObject_GetDictPtr  (./__umfpack.so)
undefined symbol: PyObject_CallFunctionObjArgs  (./__umfpack.so)
undefined symbol: PyObject_IsTrue       (./__umfpack.so)
undefined symbol: PyString_FromStringAndSize    (./__umfpack.so)
undefined symbol: PyLong_AsLong (./__umfpack.so)
undefined symbol: PyCObject_Import      (./__umfpack.so)
undefined symbol: PyErr_Format  (./__umfpack.so)
undefined symbol: PyFloat_FromDouble    (./__umfpack.so)
undefined symbol: PyArg_ParseTuple      (./__umfpack.so)
undefined symbol: PyObject_GetAttr      (./__umfpack.so)
undefined symbol: PyErr_Occurred        (./__umfpack.so)
undefined symbol: _gfortran_stop_numeric        (./__umfpack.so)
undefined symbol: _PyInstance_Lookup    (./__umfpack.so)
undefined symbol: _gfortran_st_write    (./__umfpack.so)
undefined symbol: PySequence_Concat     (./__umfpack.so)
undefined symbol: PyString_FromString   (./__umfpack.so)
undefined symbol: PyString_FromFormat   (./__umfpack.so)
undefined symbol: PyInt_FromLong        (./__umfpack.so)
undefined symbol: PyModule_GetDict      (./__umfpack.so)
undefined symbol: PyDict_GetItem        (./__umfpack.so)
undefined symbol: PyInt_AsLong  (./__umfpack.so)
undefined symbol: PyCObject_AsVoidPtr   (./__umfpack.so)
undefined symbol: PyType_IsSubtype      (./__umfpack.so)
undefined symbol: PyObject_Init (./__umfpack.so)
undefined symbol: PyObject_Malloc       (./__umfpack.so)
undefined symbol: PyObject_GetAttrString        (./__umfpack.so)
undefined symbol: PyList_Append (./__umfpack.so)
undefined symbol: PyObject_Call (./__umfpack.so)
undefined symbol: PyErr_Print   (./__umfpack.so)
undefined symbol: PyString_ConcatAndDel (./__umfpack.so)
undefined symbol: PyObject_Free (./__umfpack.so)
undefined symbol: PyImport_ImportModule (./__umfpack.so)
undefined symbol: PyErr_Clear   (./__umfpack.so)
undefined symbol: PyTuple_New   (./__umfpack.so)
undefined symbol: PyTuple_SetItem       (./__umfpack.so)
undefined symbol: PyErr_SetString       (./__umfpack.so)
undefined symbol: _gfortran_transfer_character  (./__umfpack.so)
undefined symbol: PyList_SetItem        (./__umfpack.so)
undefined symbol: PyInstance_NewRaw     (./__umfpack.so)
undefined symbol: PyList_New    (./__umfpack.so)
undefined symbol: PyString_Format       (./__umfpack.so)
undefined symbol: PyDict_SetItem        (./__umfpack.so)
undefined symbol: PyDict_New    (./__umfpack.so)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00002b23f84ed000)
        libc.so.6 => /lib/libc.so.6 (0x00002b23f8708000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

Thanks again,

Robin


More information about the SciPy-user mailing list