[f2py] f2py on mac os 10.5.8 - standard examples don't work

jaspeR <[email protected]> Tue, 23 Nov 2010 01:34:00 +0000 (UTC)
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
hi people.

i tried running f2py to compile some of the standard examples, but failed at the
follwing:

the code i want to compile is anothertest.f90:

module mod
  integer i
  integer :: x(4)
  real, dimension(2,3) :: a
  real, allocatable, dimension(:,:) :: b
contains
  subroutine foo
    integer k
    print*, "i=",i
    print*, "x=[",x,"]"
    print*, "a=["
    print*, "[",a(1,1),",",a(1,2),",",a(1,3),"]"
    print*, "[",a(2,1),",",a(2,2),",",a(2,3),"]"
    print*, "]"
    print*, "Setting a(1,2)=a(1,2)+3"
    a(1,2) = a(1,2)+3
  end subroutine foo
end module mod

i invoke f2py:

f2py --f90exec=/usr/local/bin/gfortran -m out -c anothertest.f90 


and the error message i get is:

/var/folders/rA/rA1fXz9FEdi43hSUjkqtpE+++TI/-Tmp-/tmp3i2QLY/
src.macosx-10.5-i386-2.6/out-f2pywrappers2.f90:6.27:

      use mod, only: d => b
                          1
Fatal Error: Can't open module file 'mod.mod' for reading at (1): No such file
or directory


any idea what's going on? thanks,

jaspeR