Karim Belabas on Thu, 16 Jun 2005 13:47:46 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Pari and Intel x86 compiler?


* Bill Allombert [2005-06-16 12:11]:
> On Thu, Jun 16, 2005 at 09:51:36AM +0200, Ralf Stephan wrote:
> > Hello,
> > is the use of Intel's compiler on Linux supported?
> > 
> > http://www.intel.com/software/products/noncom/
> > 
> > Are there experiences, i.e. would there be a speed difference?
> 
> We do not have experience with this compiler, but PARI has been
> strongly optimised for GCC so unless intel compiler support 
> the GCC extensions we use and Configure is tweaked to activate them
> for intel compiler, it is likely to be significantly slower.
> Specifically,  the inline asm kernel rely on the "Extended Asm" and the
> "Statement Exprs" GNU C extensions.
> 
> Of course, you are welcome to try and report the results!

I've just tried the standard bench on my machine (PIV, 1.6MHz):

--- with gcc-3.3.2 

\\ inline ASM kernel
* Testing objets        for gp-sta..TIME=0  
* Testing analyz        for gp-sta..TIME=80 
* Testing number        for gp-sta..TIME=60 
* Testing polyser       for gp-sta..TIME=10 
* Testing linear        for gp-sta..TIME=20 
* Testing elliptic      for gp-sta..TIME=60 
* Testing sumiter       for gp-sta..TIME=50 
* Testing graph         for gp-sta..TIME=20 
* Testing program       for gp-sta..TIME=100
* Testing trans         for gp-sta..TIME=240
* Testing nfields       for gp-sta..TIME=480
+++ Total bench for gp-sta is 736

\\ no ASM kernel whatsoever (--kernel=none)
* Testing objets        for gp-sta..TIME=10 
* Testing analyz        for gp-sta..TIME=90 
* Testing number        for gp-sta..TIME=160
* Testing polyser       for gp-sta..TIME=20 
* Testing linear        for gp-sta..TIME=40 
* Testing elliptic      for gp-sta..TIME=80 
* Testing sumiter       for gp-sta..TIME=60 
* Testing graph         for gp-sta..TIME=40 
* Testing program       for gp-sta..TIME=190
* Testing trans         for gp-sta..TIME=420
* Testing nfields       for gp-sta..TIME=590
+++ Total bench for gp-sta is 1228

--- with Intel's icc-8.1

\\ non-inlined ASM kernel (standard Configure run + remove -rpath option)
* Testing objets        for gp-sta..TIME=0
* Testing analyz        for gp-sta..TIME=100
* Testing number        for gp-sta..TIME=90
* Testing polyser       for gp-sta..TIME=20
* Testing linear        for gp-sta..TIME=40
* Testing elliptic      for gp-sta..TIME=70
* Testing sumiter       for gp-sta..TIME=70
* Testing graph         for gp-sta..TIME=30
* Testing program       for gp-sta..BUG [130]
* Testing trans         for gp-sta..TIME=320
* Testing nfields       for gp-sta..TIME=580
+++ [BUG] Total bench for gp-sta is 986  \\ install doesn't work

\\ no ASM kernel whatsoever (--kernel=none)
* Testing objets        for gp-sta..TIME=10
* Testing analyz        for gp-sta..TIME=110
* Testing number        for gp-sta..TIME=170
* Testing polyser       for gp-sta..TIME=30
* Testing linear        for gp-sta..TIME=40
* Testing elliptic      for gp-sta..TIME=80
* Testing sumiter       for gp-sta..TIME=70
* Testing graph         for gp-sta..TIME=40
* Testing program       for gp-sta..BUG [160]
* Testing trans         for gp-sta..TIME=450
* Testing nfields       for gp-sta..TIME=610
+++ [BUG] Total bench for gp-sta is 1272

>From a glance at

  http://www.intel.com/software/products/compilers/techtopics/LinuxCompilersCompatibility.htm

it looks like the GNU C extensions we need for the kernel are supported.
But enabling by hand the inline asm kernel (specifically, defining
ASMINLINE), I hit a compiler bug:

/opt/intel_cc_80/bin/icc  -c -O2 -m486  -DBOTH_GNUPLOT_AND_X11  -I. -I../src/headers -o mp.o mp.c
icc: error: Fatal error in /opt/intel_cc_80/bin/mcpcom, terminated by segmentation violation

So I would advise sticking with gcc for now.

    Karim.
-- 
Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dep. de Mathematiques, Bat. 425   Fax: (+33) (0)1 69 15 60 19
Universite Paris-Sud              http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France)            http://pari.math.u-bordeaux.fr/  [PARI/GP]