Convergence problems with Intel's 8.0 C++ compiler

Felix E. Klee felix.klee.gmp at gmx.net
Wed Feb 25 02:15:12 CET 2004


Hi,

recently, I installed Intel's C++ compiler in version 8.0 on my
Slackware 9.1 LINUX system and discovered that one of my numerical
simulations, TRASIM, suddenly has massive convergence problems (it
didn't have them with icc 7.?  and g++ 3.?). So, I went to do some
debugging which resulted in the very simple attached code (also attached
is a documented Makefile, adapted to my system). The output of the
program on my system is as follows (what you see are mostly vectors of
limbs).

When compiled with gcc 3.2.3:
  zero: ()
  c: (0,3435974656,3435973836)
  x: (0,0,687865856,4123168604,1889786920,2748779069)
  re(z1): (0,0,687865856,4123168604,1889786920,2748779069)
  im(z1): ()
  re(z2): (3463461627,3697107848,1803027270,2728163226,1896659235,1759218604)
  im(z2): ()
  re(z2) = 0.4096

When compiled with icc 8.0:
  zero: ()
  c: (0,3435974656,3435973836)
  x: (0,0,687865856,4123168604,1889786920,2748779069)
  re(z1): (687865856,4123168604,1889786920,2748779069)
  im(z1): ()
  re(z2): (1803027270,2728163226,1896659235,1759218604)
  im(z2): ()
  re(z2) = 0.4096

Note the difference in the number of limbs in re(z1) and re(z2). I
assume that the binary built with gcc produces a higher precision
re(z2), but I haven't checked that yet. Anyway, something is fishy
here. Could someone please explain
1. the (possible) reason for the difference in the output,
2. which compiler causes a higher precision of re(z2), and
3. how to circumvent the problem (i.e. I want TRASIM to converge without
   problems when compiled with icc 8.0)?

Please let me know if you need more information.

BTW, I had some additional trouble with the Intel compiler: Code such as
"cout << real(z2)" gives an error of type "undefined reference to
std::ostream::write(char const*, int)". But I haven't investigated that
any further.

Felix

PS: To contact me off list don't reply but send mail to "felix.klee" at
the domain "inka.de". Otherwise your email to me might get automatically
deleted!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 449 bytes
Desc: not available
Url : /list-archives/gmp-discuss/attachments/20040225/47e5e2f7/Makefile.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: application/octet-stream
Size: 1388 bytes
Desc: not available
Url : /list-archives/gmp-discuss/attachments/20040225/47e5e2f7/main.obj


More information about the gmp-discuss mailing list