[SciPy-dev] Progress with Intel Fortran Compiler support

Jeff Layton jeffrey.b.layton at lmco.com
Mon Oct 21 05:21:18 CDT 2002

Pearu Peterson wrote:

> Hi,
> It took a whole weekend to get Scipy working with the Intel compiler.
> Now all scipy tests pass (except test_shapiro) also with ifc.
> However, few functions from special.cephes still cause python to
> crash (see test methods starting with _check).
> I'll get back to it later when special  module has more tests that
> actually test the correctness cephes functions results. Currently when
> cephes functions (built with gcc) return results then I am not always
> sure that they are correct, in same cases I have even been unable to call
> these functions without getting domain errors (see test methods starting
> with __check).
> Anyway, guide lines how to build scipy with ifc can be found in
> INSTALL.txt. Unfortunately, the building process is not as straightforward
> as one would wish:
> 1) there is binary incompability between ifc and g77 generated codes so
> that ATLAS and LAPACK libraries *must* be compiled with ifc.
> 2) in some cases ifc optimization is too good so that LAPACK
> functions ?lamch fail for that; see INSTALL.txt for a workaround.


   I thought I would chip in with my sugestions for ATLAS and LAPACK
since I've built and tested those with ifc/icc (version 6). I would suggest
building ATLAS with icc (the Intel C compiler). You can build it with gcc
and link it to ifc code, but it makes life easier to use icc. I'm not sure of the
speed difference between icc and gcc on ATLAS (one person said icc
was slower, one said it was faster). Here are the ootions I used with icc

-O3 -unroll -align -tpp6 -axK -Xa

Typically I modify the makefile that ATLAS creates to make sure it
is correct.
   As for LAPACK, you have to use a couple of options to make sure the
precision is correct. In particular, '-mp -pc64 -fp_port'. There is a speed
lose compared to not using the flags, but I'd rather have correct answers
today :) The flags I used for ifc are :

-O2 -tpp6 -prefetch -align -unroll -Vaxlib -mp -pc64 -fp_port -xK -axK

BTW, these flags are for an Athlon or a PIII. Also, don't forget to use
the '-Vaxlib' flag during linking.
   Finally, after you build the LAPACK library it was recommended to
me to go back and recompile xerbla.f, slamch.f, and dlamch.f using no
optimization ('-O0'). Then relink the libs (I erase the final libs, recompile
these 3 routines, and then run 'make libs' again).
   So far this process allows ATLAS to pass all of the tests and for
LAPACK to pass all the tests as well.
   Thanks for all of your hard work this weekend!


> Finally, Intel Fortran Compiler 5.0 is not supported because scipy build
> fails with internal compiler error when debugging flags are enabled.
> Regards,
>         Pearu
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-dev


Jeff Layton
Senior Engineer
Lockheed-Martin Aeronautical Company - Marietta
Aerodynamics & CFD

"Is it possible to overclock a cattle prod?" - Irv Mullins

This email may contain confidential information. If you have received this
email in error, please delete it immediately, and inform me of the mistake by
return email. Any form of reproduction, or further dissemination of this
email is strictly prohibited. Also, please note that opinions expressed in
this email are those of the author, and are not necessarily those of the
Lockheed-Martin Corporation.

More information about the Scipy-dev mailing list