[SciPy-user] forcing compiler other than g77 on HPUX

pearu at scipy.org pearu at scipy.org
Tue May 7 19:20:51 EDT 2002


On Tue, 7 May 2002, Tim Carlson wrote:

> It is an issue of scipy not being able to find the HP compiler and my
> attempt to make scipy use the HP compiler.
> 
> I forced build_flib.py to use the compiler by setting the match in the
> get_version routine
> 
> self.version = "v2.4"

I'll add HP compiler class (as you send before + doing version stuff
properly) tomorrow. It's rather late here ..

> With that little hack and setting the compiler flags to "-O3 +pic=long"
> I got most it going until I ran into linalg/src/calc_lwork.f which
> complained about some of the types that were being compared in a
> few of the MAX function calls. Apparently comparing a REAL and an INTEGER
> is a bad thing with f90 on HPUX. I applied some changes there which you
> probably don't want to see.

But could you point out which lines are broken? Because calc_lwork.f is
mostly copy-paste of LAPACK routines and they compiled fine as you said
before.

> -----
> Python 2.2.1 (#1, May  6 2002, 15:20:34)
> [GCC 3.0.4] on hp-ux11
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from scipy import *
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File
> "/msrc/apps/python-2.2/lib/python2.2/site-packages/scipy/__init__.py", line 42, in ?
>     import special, io, linalg, stats, fftpack
>   File
> "/msrc/apps/python-2.2/lib/python2.2/site-packages/scipy/special/__init__.py", line 323, in ?
>     from special import *
>   File
> "/msrc/apps/python-2.2/lib/python2.2/site-packages/scipy/special/special.py", line 10, in ?
>     import specfun
> ImportError: dynamic module does not define init function (initspecfun)
> -----
> 
> Running an nm on that shared object shows me that the function is indeed defined.
> 
> nm /msrc/apps/python-2.2/lib/python2.2/site-packages/scipy/special/specfun.sl | grep initspecfun
> 00012590 T initspecfun
> 000124d0 T initspecfun
> 
> And I can load other shared objects into this python, so I don't think the
> problem lies entirely with HPUX's implementation of shared objects.

Strange indeed. Can you import other extension modules that scipy created?
Like linalg/*.sl, optimize/*.sl, signal/*.sl etc.
Are they all failing or just few of them?

Pearu




More information about the SciPy-User mailing list