[SciPy-dev] Progress with Intel Fortran Compiler support
pearu at cens.ioc.ee
Mon Oct 21 07:42:25 CDT 2002
On Mon, 21 Oct 2002, Jeff Layton wrote:
> 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).
Your suggestions are welcome!
> 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.
Hmm, actually what comes to using ATLAS in Scipy, I saw no downside of
using gcc, in fact, I didn't even need to bother with this matter (I
haven't installed icc either).
> 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).
Yes, both persons might be right: ATLAS is basically developed with gcc
and optimized for that. On the other hand, icc, at least in principle,
should be faster on intel processors as they know better...
So, I would not recommend either of them until seeing some benchmark
> Here are the ootions I used with icc on ATLAS:
> -O3 -unroll -align -tpp6 -axK -Xa
> Typically I modify the makefile that ATLAS creates to make sure it
> is correct.
I think, -align is set default. -O3 -unroll are good. Other options are
CPU specific, hence users choice.
> As for LAPACK, you have to use a couple of options to make sure the
> precision is correct. In particular, '-mp -pc64 -fp_port'.
-pc64 is default. Though, to get identical results with gcc, one should
use -pc80 when it matters.
I guess using these flags depends on applications. So, I would let users
to deside about these flags. Sofar, I haven't seen any anomalies if these
flags are missing.
> 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.
Hmm, is '-Vaxlib' really necessary? Linkage works fine here without
-Vaxlib when using ifc 6 and gcc 3.1.1. ifc -help says:
-Vaxlib link with portability library
I guess it doesn't matter when building locally. I don't think that we
should distribute scipy binaries compiled with Intel compilers, at
least not in near future. Also there might be some legal matters with
respect distributing Intel binaries.
> 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').
Recompiling these files (didn't know that about xerbla.f before) with -O0
is absolutely required.
> 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!
Thanks for your notes! I'll update INSTALL.txt accordingly.
More information about the Scipy-dev