[f2py] SOLVED: segfaults

David Fokkema <[email protected]>
Newsgroups gmane.comp.python.f2py.user
Message-ID <1233308260.6634.21.camel@fomalhaut>
Hi list,

I have no more segfaults when running the fortran routines. It turns out
that I have to create enough space for some data arrays, whereas they
are only declared as:

integer          foo(1)
double precision bar(0:1)

in the fortran source. Is this technically allowed? Through some magic I
didn't follow through they are filled with values at much larger
indices. Since the f2py conversion routines wouldn't allow me to pass
larger arrays than size 1 and 2 respectively, I changed the declarations
to:

integer		 foo(*)
double precision bar(0:*)

and now everything works. Thanks again for this great piece of software!
I wouldn't want to think about writing my whole project in fortran or
writing out intermediary files or something like that.

David

PS: the might-be bugs in my test.f script from my last mail still stand.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.