logo       

[f2py] F2PY, Mac Intel, gfortran/ifort fixes?: msg#00004

python.f2py.user

Subject: [f2py] F2PY, Mac Intel, gfortran/ifort fixes?

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
|
| 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."
|
----------------------------------------------------------------------------




_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//w@xxxxxxxxxxxxxxxx
http://cens.ioc.ee/mailman/listinfo/f2py-users
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise