[SciPy-user] f2py and ifort flags...

David M. Cooke cookedm at physics.mcmaster.ca
Fri May 25 09:59:46 EDT 2007


On Fri, May 25, 2007 at 09:43:53AM +0200, Pearu Peterson wrote:
> 
> 
> fred wrote:
> > Pearu Peterson a écrit :
> > 
> > Hi Pearu,
> >> --f90flags are used in compilation of fortran codes, not when
> >> linking.
> > Ok for this point.
> >>  For linking libraries use `-lname` and `-Lpath`
> >> in f2py command line. But note that numpy/distutils/fcompiler/intel.py
> >> should take care of linking intel compiler libraries. If it does not
> >> work for your compiler, try to fix intel.py and send us your changes.
> >>   
> > Ok, so how intel.py could guess that I want to add some args such as
> > -limf -Wl,--rpath -Wl,/usr/local/share/intel/fc/9.1.045/lib ?
> > I don't know.
> > In others words, how can I set these args that f2py can understand and 
> > take in account ?
> 
> At the moment this is not possible via f2py command line.
> 
> > For the fix, I got one.
> > But I guess you won't like it: I have hardcoded it, so it fits only my 
> > own needs.
> > This look like this, line 61 of intel.py:
> > 
> > opt.append('-limf -Wl,--rpath -Wl,/usr/local/share/intel/fc/9.1.045/lib')

I've merged in my distutils-rework branch into numpy, which should let you
specify this either with the LDFLAGS environment variable, or put this in
your setup.cfg or ~/.pydistutils.cfg:

[config_fc]
ldflags=-limf -Wl,--rpath -Wl,/usr/local/share/intel/fc/9.1.045/lib


-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca



More information about the SciPy-User mailing list