[SciPy-user] f2py "Segmentation fault"-revisited, please help

Kimberly Artita kartita@gmail....
Thu Oct 30 23:52:20 CDT 2008


Can someone please tell me why I keep getting a segmentation fault?

my fortran script (gfortran_test.f90):
subroutine readin_test

    implicit none

    character(len=4) :: title (60)
    character (len=13) :: bigsub, sbsout, rchout, rsvout, lwqout, wtrout
    open (2,file="gfortran.txt", delim='none')
    print *, "title"
    read (2,5100) title
    print *, title
    read (2,5000) bigsub, sbsout, rchout, rsvout, lwqout, wtrout

    print *, "bigsub, sbsout, rchout, rsvout, lwqout, wtrout"
    print *, bigsub, sbsout, rchout, rsvout, lwqout, wtrout

    5100 format (20a4)
    5000 format (6a)

end subroutine readin_test

my python script (gfortran_test.py):
import gfortran_test


my text file (gfortran.txt):
General Input/Output section (file.cio):           Thu Mar 13 17:32:19 2008
AVSWAT2000 - SWAT interface MDL

   basins.bsb   basins.sbs   basins.rch   basins.rsv   basins.lqo

using this version of gfortran: i686-pc-linux-gnu-4.1.2 with either
numpy-1.0.4-r2 or numpy-1.2.0

I can compile gfortran_test.f90 as a standalone program and it works!

BUT, when I call it as a subroutine from python using f2py, it fails!
I type: f2py --fcompiler=gfortran -c -m gfortran_test gfortran_test.f90


Kimberly S. Artita
PhD Intern, CDM
Graduate Student, Engineering Science
Southern Illinois University Carbondale
Carbondale, Illinois 62901-6603
e-mail: kartita@gmail.com, kartita@siu.edu
web: http://civil.engr.siu.edu/GraduateStudents/artita/index.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20081030/896c115a/attachment.html 

More information about the SciPy-user mailing list