[f2py] F2PY, Mac Intel, gfortran/ifort fixes?
Louis Wicker
Louis.Wicker at noaa.gov
Tue Mar 27 19:29:52 EEST 2007
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 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).
Also, I believe this same type of fix will work with g95.
Hope this helps.
Lou Wicker
------------------------------------------------------------------------
----
| Dr. Louis J. Wicker
| NSSL/WRDD
| National Weather Center
| 120 David L. Boren Boulevard, Norman, OK 73072-7323
|
| E-mail: Louis.Wicker at noaa.gov
| HTTP: www.nssl.noaa.gov/~lwicker
| Phone: (405) 325-6340
| Fax: (405) 325-6780
|
| "Programming is not just creating strings of instructions
| for a computer to execute. It's also 'literary' in that you
| are trying to communicate a program structure to
| other humans reading the code." - Paul Rubin
|
|"Real efficiency comes from elegant solutions, not optimized programs.
| Optimization is always just a few correctness-preserving
transformations
| away." - Jonathan Sobel
------------------------------------------------------------------------
----
|
| "The contents of this message are mine personally and
| do not reflect any position of the Government or NOAA."
|
------------------------------------------------------------------------
----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cens.ioc.ee/pipermail/f2py-users/attachments/20070327/5609fa4a/attachment.htm
More information about the f2py-users
mailing list