[SciPy-user] BLAS and srotgm

Donna calhoun@amath.washington....
Tue Sep 11 12:08:47 CDT 2007


> 
> Dear SciPy Users :
> 
> I just got SciPy installed, finally.  (Many thanks to the user who posted 
> a while ago that the "-shared" flag was needed to build _fftpack.so).
> 
> But now, when I try to import the blas module, I get the following error :
> 
> ----------------------------------------------------------------------------
> Python 2.5 (r25:51908, Sep 10 2007, 00:42:23)
> [GCC 3.4.0] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import scipy.linalg.blas
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File
"/usr/local/Python-2.5-with_tk/lib/python2.5/site-packages/scipy/linalg/
__init__.py",

> line 8, in <module>
>      from basic import *
>    File
"/usr/local/Python-2.5-with_tk/lib/python2.5/site-packages/scipy/linalg/
basic.py", 
> line 227, in <module>
>      import decomp
>    File
"/usr/local/Python-2.5-with_tk/lib/python2.5/site-packages/scipy/linalg/
decomp.py", 
> line 21, in <module>
>      from blas import get_blas_funcs
>    File
"/usr/local/Python-2.5-with_tk/lib/python2.5/site-packages/scipy/linalg/
blas.py", 
> line 14, in <module>
>      from scipy.linalg import fblas
> ImportError: 
> /usr/local/Python-2.5-with_tk/lib/python2.5/site-packages/scipy/linalg/
fblas.so: 
> undefined symbol: srotmg_
> ----------------------------------------------------------------------------

I think I fixed this problem.  In fact, despite my best efforts to make sure
the scipy build found the latest libblas file, it had in fact found an old one. 
Maybe the "-lblas" was in the wrong place in the g77 command that built
fblas.so?  In the end, re-issuing just that command, slightly modifed so 
there could be no mistake as to which libblas is was to find, seemed to fix
my fblas.so.  So now  I can import blas.  

I had thought that all I needed to do was edit site.cfg to indicate where
the blas libraries were.  But somehow, it still looked elsewhere..

I hope this helps anyone else who is a newbie at this and who runs into the 
same problem. 

Donna




> 
> I build libblas and liblapack from the latest version of lapack (3.1.1). 
> The file srotmg.f is under BLAS/SRC and appears to be in the library :
> 
> --------------------------------------------------------------
> [calhoun <at> localhost lapack-3.1.1]# nm libblas.a | grep srotmg
> srotmg.o:
> 00000000 T srotmg_
> --------------------------------------------------------------
> 
> (note that libblas.a and liblapack.a are symbolic links to the libraries
> blas_LINUX.a and lapack_LINUX.a built by the lapack build/install).
> 
> The '00000000' is a bit suspicous, however.
> 
> However, fblas.so (under scipy/linalg) has :
> 
> ---------------------------------------------------------
> [calhoun <at> localhost linalg]# nm fblas.so | grep srotmg
> 0016f4a0 d doc_f2py_rout_fblas_srotmg
> 0005a4b0 t f2py_rout_fblas_srotmg
>           U srotmg_
> ----------------------------------------------------------
> 
> which I guess means 'srotmg' is undefined.  Looking at a build log of 
> scipy, the blas/lapack I specified in site.cfg were all found.
> 
> So the question is, why can't python find srotmg?
> 
> Thank you for any help,
> 
> Donna
> 






More information about the SciPy-user mailing list