[SciPy-dev] Absoft & Scipy
pearu at scipy.org
Thu Feb 3 13:58:57 CST 2005
On Thu, 3 Feb 2005, Stephen Walton wrote:
> Pearu Peterson wrote:
>> Check Absoft compiler
>> manual if it provides options that forces external names to be appended
>> with exactly *one* underscore, and try to modify
>> scipy_distutils/absoftfcompiler.py accordingly.
> Sigh. I found the problem but am not sure of a workaround. I've created an
> /opt/absoft/default.opt file locally which forces Absoft to use the '-g77'
> switch on all compiles for maximum compatibility with binaries from that
> compiler. This means that it does the double underscore append. Without
> -g77 and with -YEXT_SFX=_ on the Absoft command line, one gets a single
> underscore as desired. With both, one gets three underscores!
> From my point of view, the simplest solution would be for f2py to respect
> g77's defaults rather than override them, even though in this case I agree
> g77's default is stupid. But there's a better reason than personal
> preference: If I install fftw from the Fedora RPMs, they were compiled with
> g77 and therefore have the double underscores on external names with embedded
> underscores. I need to minimize the time I spend doing admin tasks (see my
> recent conversation with Fernando) and would rather not have to add fftw to
> the list of things I have to compile myself with special switches to keep
> scipy working.
Right now I don't have a solution to this chicken&egg problem: using
'-g77' in /opt/absoft/default.opt is upto a sysadmin or whoever maintains
absoft compiler installation while f2py has used for a long time
the exactly-single underscore convention in order to support also other
compilers than g77. And if '-g77' would not be used in
/opt/absoft/default.opt, scipy should build fine with this convention.
I am not sure which party of absoft compiler users is larger, those who
use -g77 or those who do not.
Anyway, recent f2py from CVS supports now -DUNDERSCORE_G77 that will cause
extra underscore appended to those names that contain an underscore.
So, to build scipy with the absoft fortran compiler that uses -g77 by
default, get f2py from CVS, install it, and use the following command
python setup.py build_ext -DUNDERSCORE_G77 build
Note that if any of the fortran libraries used by scipy is not compiled
with -g77, you have the same problem but inversed. Then one should not
use -DUNDERSCORE_G77. Right now scipy_distutils/system_info.py cannot
test this automatically.
More information about the Scipy-dev