[Insight-developers] Optimization problems with gcc3

Hans J. Johnson hans-johnson at uiowa.edu
Mon, 19 Jan 2004 12:44:52 -0600


Hello All,

I just wanted to let everyone know of some testing I've done in trying
to get the tesla.uiowa Linux-gcc-3.2-opt to test without errors.  It
looks like the -O3 optimizations for the gcc compiler are causing the
test to fail.  I'm not 100% sure this is a compiler bug, but I've
changed my nightly build compile flags anyway. 


FAILS1---"-DNDEBUG -O3                                                     -funroll-loops -fno-omit-frame-pointer -fstrict-aliasing  -ftemplate-depth-50"
FAILS2---"-DNDEBUG -O2 -frename-registers -finline-functions  -funroll-loops -fno-omit-frame-pointer -fstrict-aliasing  -ftemplate-depth-50"
FAILS3---"-DNDEBUG -O2                          -finline-functions  -funroll-loops -fno-omit-frame-pointer -fstrict-aliasing  -ftemplate-depth-50"
SUCCESS--"-DNDEBUG -O2 -frename-registers                           -funroll-loops -fno-omit-frame-pointer -fstrict-aliasing  -ftemplate-depth-50"

NOTE:  "-O3"  ==  "-O2 -frename-registers -finline-functions"


=====Output from Success===========    ============Output from FAILED3========
0   -0.321485   [3.97061, 0.484012]        0   -0.321485   [3.97061, 0.484012]
1   -0.360223   [7.45659, -1.4776]         1   -0.360223   [7.45659, -1.4776]
2   -0.361493   [6.82751, 0.42089]         2   -0.312199   [6.86882, 0.434084]
3   -0.373211   [7.82578, 0.479614]        3   -0.365193   [7.86822, 0.468775]
4   -0.382745   [8.77673, 0.170261]        4   -0.345765   [8.80597, 0.121454]
5   -0.383594   [9.76414, 0.328419]        5   -0.358856   [9.74668, 0.460672]
6   -0.391406   [10.7634, 0.28909]         6   -0.344188   [10.7464, 0.483857]
7   -0.396325   [11.7548, 0.158644]        7   -0.383695   [11.7294, 0.299962]
8   -0.395927   [12.3374, 0.971434]        8   -0.38631   [12.0244, 1.25544]
9   -0.400565   [11.8154, 1.82437]         9   -0.3651   [11.7557, 0.833794]
10   -0.405265   [11.9641, 2.81324]        10   -0.39056   [11.8499, 1.06538]
11   -0.412902   [12.5275, 3.63948]        11   -0.365319   [12.0709, 1.18225]
12   -0.425711   [13.0856, 4.46919]        12   -0.377377   [11.9752, 1.10175]
13   -0.402132   [13.9658, 4.94392]        13   -0.378953   [12.0329, 1.12581]
14   -0.430453   [13.6788, 5.35335]        14   -0.330904   [12.09, 1.15136]
15   -0.441748   [13.212, 5.17408]         15   -0.314393   [12.0804, 1.1216]
16   -0.437343   [13.1785, 5.42182]        16   -0.380332   [12.05, 1.11429]
17   -0.443244   [13.1794, 5.67182]        17   -0.391133   [12.0602, 1.12616]
18   -0.447031   [13.1572, 5.92083]        18   -0.2877   [12.0756, 1.12899]
19   -0.445267   [13.0639, 6.15278]        19   -0.347698   [12.0868, 1.11811]
20   -0.44797   [13.025, 6.39973]          20   -0.387801   [12.0795, 1.11522]
21   -0.45237   [13.1422, 6.35621]         Result =
22   -0.453201   [13.1234, 6.41582]         Translation X = 12.0795
23   -0.453964   [13.1084, 6.4765]          Translation Y = 1.11522
24   -0.442526   [13.1389, 6.46956]         Iterations    = 22
25   -0.454963   [13.1482, 6.49939]         Metric value  = -0.336555
26   -0.455464   [13.147, 6.48381]          Stop Condition  = 2
27   -0.442931   [13.1517, 6.49007]
Result =
 Translation X = 13.1517
 Translation Y = 6.49007
 Iterations    = 29
 Metric value  = -0.454962
 Stop Condition  = 2
==================================    ===========================================


Regards,
Hans