SEGFAULT from importing _minpack.so (was Re: [SciPy-user] install

gvermeul at polycnrs-gre.fr gvermeul at polycnrs-gre.fr
Thu May 23 18:11:42 EDT 2002


> 
> On Thu, 23 May 2002, Gerard Vermeulen wrote:
> 
> > > > So, it looks like if there is something wrong with
> > > > calling Fortran from C in this module.
> > > >
> > > > If there is nothing wrong with the compiler/linker flags
> > > > produced by setup.py, there is something wrong with
> > > > Mandrake's gcc/g77-2.96.
> > >
> > > If you do
> > >
> > >   f2py -c -m fun minpack/chkder.f minpack/dpmpar.f
> > >   python -c 'import fun'
> > >
> > > what happens? SEGFAULT? Nothing?
> > >
> > SEGFAULT
> 
> This is very interesting. If you can succesfully import large number of
> extension modules that wrap various Fortran functions but only this
> function, chkder, is causing import failures, and when looking the chkder
> code I cannot see anything special in it, then I would like to suggest it
> is a compiler bug. But on the other hand, I am not an expert on compilers
> and it could be easily something else, something so obvious that we
> cannot see it. I am starting to be very curious what is going on here.
> 
> So, if you are willing to continue this bug tracking (I can easily
> understand if you are not, then may be updating a compiler would be a
> way to proceed), then the next step would be playing around
> with minpack/chkder.f. Again, I would suggest commenting out various part
> of it (the code itself is rather small) and run
> 
>   f2py -c -m fun minpack/chkder.f minpack/dpmpar.f
>   python -c 'import fun'
> 
> until you can import succesfully.
>
Tried to play with this stuff on Mandrake-8.1 and everything worked.
Then, I discovered that Mandrake-8.2 g77 comes with two libraries:
libg2c.a and libg2c-pic.a. Guess this might win a femtosecond
or a nanobyte (my supposition is that there is a libg2c WITHOUT
an a libg2c WITH position independent code -- but I should take
a look in their gcc-2.96 RPM package to be sure -- and where do
you report gcc-2.96 bugs?).

So, I modified build_flib.py to replace the g77 library "g2c" by
"g2c-pic" and now I can happily do "from scipy import *".

But running "scipy.test()" dies with

.zswap:n=3
....... ** On entry to DGESDD parameter number 12 had an illegal value
[packer at venus packer]$

This did not happen with the Red Hat compiled SciPy that I untarred
(this SciPy is probably linked against a rather vanilla Atlas, isn't it?)

Anyhow, I plan to reinstall a gcc/g77-2.95.3 to rebuild the ATLAS
libraries and to get rid of the libg2c-pic.a idiosyncrasy and will
hopefully solve the DGESDD problem at the same time :-)

I will let you know. And Pearu, thanks a lot for your help and
patience.

Gerard.
PS: how fundamental is Atlas to SciPy? Installing ATLAS is a big
obstacle for most users. Could it be possible to make ATLAS optional?
I have still a few old machines (150-300 MHz) and hate the prospect
of installing Atlas on
those.

---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/





More information about the SciPy-User mailing list