[SciPy-user] f2py with i686 vs x86_64 arch...

fred fredmfp at gmail.com
Mon May 21 12:37:13 EDT 2007


Hi,

I got a (strange ?) problem using f2py on x86_64 arch (linux box)

The short code attached works fine on i686 arch, but gives bad results 
on x86_64
(each are debian etch).

1) On i686 arch
gcc -Wall funcs.c -c -o funcs.o
f2py -c foo.f funcs.o -m foo
[pts/4]:~/tmp/{10}/> ipython
Python 2.4.4 (#2, Apr  5 2007, 20:11:18)
Type "copyright", "credits" or "license" for more information.

IPython 0.7.2 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import foo

In [2]: print foo.foo(2)
 0  2.  4.
 1  2.  8.
None

2) On x86_64 arch
gcc -Wall -fPIC funcs.c -c -o funcs.o
f2py -c foo.f funcs.o -m foo
[pts/8]:~/tmp/{62}/> ipython
Python 2.4.4 (#2, Apr  5 2007, 18:43:10)
Type "copyright", "credits" or "license" for more information.

IPython 0.7.2 -- An enhanced Interactive Python.
?       -> Introduction to IPython's features.
%magic  -> Information about IPython's 'magic' % functions.
help    -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import foo

In [2]: print foo.foo(2)
 0  2.  0.
 1  2.  0.
None

Any suggestion ?

Thanks in advance.


Cheers,

-- 
http://scipy.org/FredericPetit

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo.f
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20070521/a19f3e63/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: funcs.c
Type: text/x-csrc
Size: 308 bytes
Desc: not available
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20070521/a19f3e63/attachment.c>


More information about the SciPy-User mailing list