[SciPy-User] f2py fortran95 won't compile]

Agile Aspect agile.aspect@gmail....
Fri Dec 11 17:21:53 CST 2009


On Fri, Dec 11, 2009 at 3:15 PM, Agile Aspect <agile.aspect@gmail.com>wrote:

>
> --
>
>        Enjoy global warming while it lasts.
>
>
> Hello,
> I've been putting a lot of time and googling into trying to get f2py to
> work. I do large matrix operations in python using scipy and numpy. There's
> a few small functions I need to speed up and want to use fortran or c to do
> this.
> Right now I write code that needs days to run. I'm hoping that I can really
> speed this up. I've also bought books to help but to no avail yet. I've
> found python to be incredibly good for what I do, but have had a lot of
> trouble extending it.
> Eventually I thought I would ask for help.
> On my new computer running snow leopard I was able to install the fortran
> 95 compiler. I installed the gcc compilers from the xcode developer tools.
> Going into bash and typing f2p gives returns a long message ending in..
>
> Version:     2
> numpy Version: 1.3.0
> Requires:    Python 2.3 or higher.
> License:     NumPy license (see LICENSE.txt in the NumPy source code)
> Copyright 1999 - 2005 Pearu Peterson all rights reserved.
> http://cens.ioc.ee/projects/f2py2e/
>
> If I run f2py -c --help-fcompiler
>
> I get a lot of output, one line of which says that the GNU Fortran 95
> compiler is there. So I proceeded to make hello.f as indicated in the scipy
> documentation. I saved it in my documents directory.
>
> Going back to bash, I cd into the documents directory and run
> f2py -c -m hello hello.f
>
> This gives me a long output that ends with the error:
>
> building extension "hello" sources
> f2py options: []
> f2py:>
> /var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghA/src.macosx-10.3-fat-2.5/hellomodule.c
> creating /var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghA
> creating
> /var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghA/src.macosx-10.3-fat-2.5
> Reading fortran codes...
> Reading file 'hello.f' (format:fix,strict)
> Post-processing...
> Post-processing (stage 2)...
> Building modules...
> error: f2py target file
> '/var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghA/src.macosx-10.3-fat-2.5/hellomodule.c'
> not generated
>
> I've been stuck trying to get up and running with extending python for
> months now and I'm really hoping someone can help me along. Once I can get
> this working, I'll start trying to send in numpy arrays and get numpy arrays
> back.
> I really appreciate your kind assistance. Cheers!
> joe
>
>
>    ------------------------------
>
> *Yahoo! Canada Toolbar :* Search from anywhere on the web and bookmark
> your favourite sites. Download it now! <http://ca.toolbar.yahoo.com/>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
In the following, try loosing the 'hello'

    f2py -c -m hello hello.f

so it reads

    f2py -c -m hello.f


-- 
     Enjoy global warming while it lasts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20091211/6fda4f5a/attachment.html 


More information about the SciPy-User mailing list