[f2py] F2PY, Mac Intel, gfortran/ifort fixes?
Robert Kern
robert.kern at gmail.com
Tue Mar 27 20:16:14 EEST 2007
Louis Wicker wrote:
> James:
>
> first, you can fix your library problem by adding a library load to the
> f2py command. For example, taking the hello.f example from the f2py web
> page, the command
>
> f2py -c -m hello hello.f --fcompiler=gfortran
>
> would be
>
> f2py -c -m hello hello.f --fcompiler=gfortran
> -L/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config
> -lpython2.5
This is not correct. You need --fcompiler=gnu95 and the link flags should be
taken care of by distutils.
> this also works (is needed for python2.4 in a similar fashion). Not
> sure why this is not being done - may be a change starting with python2.4
>
> If you wanted to use the Intel compiler, the
> ../distutils/fcompiler/intel.py file would need to be edited to change
> the loader line at the
>
> # 'linker_so' : [fc_exe,"-shared"], # original line
> 'linker_so' : [fc_exe,"-O0","-bundle"], # edited line
>
> the -O0 is needed to keep the ipa from running, I could never figure how
> to shut it off.
>
> Be aware that Intel will be shipping both a 32 bit and a 64 bit compiler
> with version 10 for the Mac (and probably all the other platforms). I
> have beta tested the Mac 64 bit compiler (and its really nice, 20%+
> faster than the 32 bit). Also, Absoft is shipping their v10 compiler
> for the Intel Mac, it is 64 bit as well. Right now, I have only 32 bit
> versions working with Python 2.5, I have yet to try and hack the 64 bit
> version of any compiler (and I only have the Intel).
You would have to build a 64-bit Python yourself. All of the binaries I am aware
of are 32-bit.
--
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
More information about the f2py-users
mailing list