[SciPy-dev] Re: Slicot library and scipy
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Tue Sep 28 15:05:00 EDT 2004
On Tue, 28 Sep 2004 10:52:17 -0600
Travis Oliphant <oliphant at ee.byu.edu> wrote:
>Nils Wagner wrote:
>
>>Dear Travis,
>>
>>As you encouraged me to learn f2py I would like to ask
>>you,
>>if you can help me with an interface for continuous and
>>discrete Lyapunov
>>equations as a starting point. Once I know how to manage
>>it in general,
>>I would be glad to submit more slicot routines to scipy.
>
>
>It looks like your problems are related to making sure
>SB03MD has the libraries it needs to run. It looks like
>it needs a dummy SELECT function for DGEES (it actually
>never calls it but the interface requires it).
>
>You also need to be sure that SB03MY and SB03MX and
>MB01RD are compiled and linked along with SB03MD (it
>calls them).
>I'm attaching a modified .pyf file that you could use and
>a util.f file with the SELECT function defined.
>You need to compile like this (assuming you have a
>libslicot.a placed in <path-to-slicot>)
>
>f2py -L<path-to-slicot> -lslicot -L<path-to-atlas>
>-llapack -lf77blas -latlas -c slicot.pyf utils.f
>
>This is the better way to do it and will allow you to
>grow slicot.pyf until you've made available all of the
>routines.
>You can start the process of wrapping all of the slicot
>library by letting f2py construct the basic .pyf file by
>going to the slicot src directory and doing
>
>f2py -h slicot.pyf -m slicot *.f
>
>This will give you a basic, raw interface to all of the
>slicot routines. You will then want to edit the
>slicot.pyf file (like I did here for sb03md) to make the
>routine more useful --- hide some variables, show that
>some are input and some are output variables --- and so
>forth.
>
>You will find along the way that f2py will fail to parse
>some of the SLICOT fortran routines. Just don't include
>them in the list of routines to make an interface for. I
>needed to move IB03AD.f and IB03BD.f out of the way
>before running the command to get it to complete. The
>resulting slicot.pyf file is huge and contains a very raw
>interface to the entire slicot library (minus those two
>routines --- I'm submitting a bug report to Pearu now).
>The slicot.pyf file can be compiled with f2py as before.
> If you want to write a setup.py file you can (but that
>is another story).
>
>
>>
>>I am quite sure that many scipy users are interested in
>>features
>>provided by
>>the slicot library.
>>
>>What do you think ?
>>
>
>SLICOT would be a nice addition to SciPy.
>
>But...
>
>I noticed that the SLICOT folks don't want people
>distributing SLICOT with their library, so it looks like
>only the interface could be distributed with SciPy and
>you would have to go and download the SLICOT tools from
>them, which is too bad unless some kind of agreement and
>separate license for SciPy could be obtained --- it looks
>like they mainly want credit, so in SciPy we could put in
>the help for the tools that if you use them you must
>credit them in a paper.
>
>At any rate, perhaps the interface could be distributed
>and then a check made at compile time (by default off) to
>see if the library is already there then the interface
>could be built.
>-Travis
>
>
>
>>I look forward to heraring from you.
>>
>>Cheers,
>> Nils
Travis,
Thank you very much for your detailed hints !
I will ask the developers of slicot for a possible
integration of slicot in scipy and get back to
you as soon as possible.
Cheers,
Nils
>>
>>
>>
>
Dr.-Ing. Nils Wagner
Universität Stuttgart
Institut A für Mechanik
Pfaffenwaldring 9
D-70550 Stuttgart
Phone: +49 (0)711 685 6262
Fax: +49 (0)711 685 6282
E-mail: nwagner at mecha.uni-stuttgart.de
More information about the SciPy-Dev
mailing list