[f2py] f2py -- getting Intel 8.0 to work with f2py with fib1.f90 example

Vitaly Marin integrated.m at gmail.com
Mon Feb 4 02:20:32 EET 2008


I was able to run the fib1.f example. I am able to use the fib1.so
module from python but the values in the array have not changed they
are zeros when they are returned from the Fortran code. Is this
something to do with the fact that I used intel compiler and not gnu?

>>> a1=Numeric.zeros(8,'d')
>>> fib1.fib(a1,8)
>>> print a1

my return result:
[ 0.  0.  0.  0.  0.  0.  0.  0.]

expected result
[ 0.  1.  1.  2.  3.  5.  0.  0.]

I would very much appreciate a hint how to get this working. I have
used a generic signature file automatically generated:
======================================
!    -*- f90 -*-
! Note: the context of this file is case sensitive.
python module fib1 ! in
    interface  ! in :fib1
        subroutine fib(a,n) ! in :fib1:fib1.f90
            real*8 dimension(n) :: a
            integer optional,check(len(a)>=n),depend(a) :: n=len(a)
        end subroutine fib
    end interface
end python module fib1

! This file was auto-generated with f2py (version:2_4422).
! See http://cens.ioc.ee/projects/f2py2e/

========================================
Thank you,

Vitaly



More information about the f2py-users mailing list