[SciPy-User] f2py fortran95 won't compile]
Fri Dec 11 17:21:53 CST 2009
On Fri, Dec 11, 2009 at 3:15 PM, Agile Aspect <email@example.com>wrote:
> Enjoy global warming while it lasts.
> 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
> 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.
> 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: 
> creating /var/folders/1I/1IOFcx8xHPWOBxtsQ1BZgE+++TI/-Tmp-/tmpWX5ghA
> Reading fortran codes...
> Reading file 'hello.f' (format:fix,strict)
> Post-processing (stage 2)...
> Building modules...
> error: f2py target file
> 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
> I really appreciate your kind assistance. Cheers!
> *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
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...
More information about the SciPy-User