Re: f2py and Fortran90 gfortran_filename error
- From: "Tyler" <hayes.tyler@xxxxxxxxx>
- Date: 28 Feb 2007 05:44:57 -0800
On Feb 28, 12:40 am, Robert Kern <robert.k...@xxxxxxxxx> wrote:
Tyler wrote:
Hello All:
Since my last post I have attempted to use the f2py program which
comes with numpy.
It's better to ask these questions on numpy-discussion, instead. There are more
f2py users per capita there.
http://www.scipy.org/Mailing_Lists
I am able to create a <module_name>.so file fine;
however, when I import it into Python, I receive the following
message:
Traceback (most recent call last):import matsolve2
File "<stdin>", line 1, in ?
ImportError: ./matsolve2.so: undefined symbol: _gfortran_filename
The steps I used to create the matsolve2.so file are as follows:
(1) Created a Fortran90 program matsolve.f90
Note: The program compiles fine and prints the proper output for the
simple matrix specified. I have also attached below the file
matsolve.f90 if it helps at all.
(2) f2py matsolve.f90 -m matsolve2 -h matsolve2.pyf
(3) f2py -c matsolve2.pyf --f90exec=/usr/bin/gfortran matsolve.f90
Note: I had to specify the f90 path as f2py did not automatically find
it.
You want to specify the *kind* of Fortran compiler such that f2py knows what
compile/link flags to use. Only use the --f90exec option to inform f2py that the
actual executable is named something odd or is in an unexpected place, like
/opt/gfortran/bin/gfortran-4.3, for example. The correct option to use is
--fcompiler=gnu95
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
Hi Robert:
Thanks for the advice and I'll try posting to the mailing list you
mentioned. For what it's worth, the option, --fcompiler=gnu95 yileds
the following error in the second calling of f2py:
error: don't know how to compile Fortran code on platform 'posix' with
'gnu95' compiler. Supported compilers are:
compaq,absoft,intel,gnu,sun,f,vast,ibm,lahey,intelv,intele,pg,compaqv,mips,hpux,intelev,nag)
Cheers,
t.
.
- References:
- f2py and Fortran90 gfortran_filename error
- From: Tyler
- Re: f2py and Fortran90 gfortran_filename error
- From: Robert Kern
- f2py and Fortran90 gfortran_filename error
- Prev by Date: cPickle EOF Error
- Next by Date: Re: f2py and Fortran90 gfortran_filename error
- Previous by thread: Re: f2py and Fortran90 gfortran_filename error
- Next by thread: Re: f2py and Fortran90 gfortran_filename error
- Index(es):
Relevant Pages
|