[SciPy-User] f2py fortran95 won't compile

Joe Barfett joebarfett at yahoo.ca
Thu Dec 10 20:39:15 EST 2009


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:     2numpy Version: 1.3.0Requires:    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" sourcesf2py options: []f2py:> /var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghA/src.macosx-10.3-fat-2.5/hellomodule.ccreating /var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghAcreating /var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghA/src.macosx-10.3-fat-2.5Reading 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20091210/f21af1bd/attachment.html>


More information about the SciPy-User mailing list