[MINC-development] -O3 breaks N3

Vladimir S. FONOV vladimir.fonov at gmail.com
Thu Apr 19 10:59:05 EDT 2012


Hello,


I managed to track problem further. First, it turns out that on new
build  volume_stats -nocache produced very different results then
default (and consistent with old build). So, I disabled caching.

On top of that, I discovered that the output of sharpen_hist changed
significantly.

If i give the following command line:

sharpen_hist -blur -fwhm .2 -noise 0.01 -range 762.440430 1646.982788
hist.txt hist.sharp.txt

the output is very different for two  versions (and none of them makes
any sense whatsoever).

See attached file hist.txt, hist_old.sharp.txt and hist_new.shart.txt

the graph showing the histogram is here:
http://www.bic.mni.mcgill.ca/~vfonov/temp/histograms.png




On Wed, Apr 18, 2012 at 11:58 PM, Claude LEPAGE
<claude at bic.mni.mcgill.ca> wrote:
> Hi,
>
> I think the damping of 1.0e-7 might be a little bit too
> aggressive and not enough damping can cause the matrix
> system to be ill-conditioned. While it works in most cases,
> a value of 1.0e-6 will give similar results and will be
> more robust numerically. Can you try that?
>
> Claude
>
>> Hello Everybody,
>>
>> Turns out that N3 is broken with -O2. Actually , compiling
>> http://packages.bic.mni.mcgill.ca/tgz/N3-1.12.0.tar.gz
>> using standard ./configure & make
>>
>> produces a code which seem to work, but essentially corrects nothing at
>> least when applied to icmb 00100 t1w scan :
>> (
>> /data/ipl/user01/rotor/icbm_recovery/shell-pipe-analy-circa2006/native/mni_icbm_00100.001.t1.mnc.gz
>> on the bic system)
>>
>> it produces an imp file :
>>
>> MNI Field File
>> %Wed Apr 18 18:40:53 2012>>> /opt/minc2/bin/nu_estimate_np_and_em
>> -parzen -log -sharpen 0.1 0.01 -iterations 100 -stop 0.0001 -shrink 4
>> -auto_mask -nonotify -b_spline 1.0e-7 -distance 200 -quiet -execute
>> -clobber -nokeeptmp -tmpdir /tmp/nu_correct_7795/
>> mni_icbm_00100.001.t1.mnc auto_mni_icbm_00100.001.t1.nuc.imp
>> Version = 0.9.0;
>> Field_Type = B_Spline;
>> Distance = 200;
>> Domain =
>>       -81.519097598907     89.3619937534825
>>       -95.84404     164.15596
>>       -155.813426545559     107.579156148442;
>> Coefficients =
>>      6.93367797718816e-310
>>      6.93367797718816e-310
>>                          0
>>                          0
>>                          0
>> ...(all zeroes)
>>                          0;
>>
>> When compiled on ubuntu 11.04 , gcc version 4.5.2
>>
>> Interestingly, the same tool compiled on Debian 5, gcc version 4.3.4
>> works as expected.
>>
>>
>>
>>
>> On 12-04-15 07:41 AM, Andrew Janke wrote:
>> > Absolutely...
>> >
>> > Claude, remember also the bug we fixed in EBTKS's spline
>> > implementation a long time back that was causing crashed on some files
>> > with certain magic dimensions. I can't think of how this might break
>> > anything (we added an episilon IIRC) but it was a change we had to
>> > make.
>> >
>> > I for one am keen to keep N3 as it is and I don't see it being a
>> > problem to force -02 behaviour during the compile. I have used N4 but
>> > often revert to N3, probably because it's a beast I know.
>>
>>
>> --
>> Best regards,
>>
>> Vladimir S. FONOV ~ vladimir <dot> fonov <at> gmail <dot> com
>> _______________________________________________
>> MINC-development mailing list
>> MINC-development at bic.mni.mcgill.ca
>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development
>>
> _______________________________________________
> MINC-development mailing list
> MINC-development at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development



-- 
Best regards,

 Vladimir S. Fonov ~ vladimir <dot> fonov <at> gmail <dot> com
-------------- next part --------------
# histogram for class 1
#  domain: 762.440430  1646.982788
#  entropy: 6.01581
#  bin centers     counts
  762.440430       1.447669
  766.885366       0.552331
  771.330303       3.073278
  775.775239       0.926722
  780.220176       0.000000
  784.665112       0.850277
  789.110049       3.817778
  793.554985       6.906856
  797.999921       6.762096
  802.444858       7.913423
  806.889794       6.777823
  811.334731       5.608207
  815.779667       6.814382
  820.224604       6.449176
  824.669540       6.559679
  829.114477       6.088694
  833.559413       4.173958
  838.004350       3.679496
  842.449286       3.735304
  846.894223       2.473919
  851.339159       4.580214
  855.784096       5.400192
  860.229032       7.675963
  864.673969       6.646347
  869.118905       10.421378
  873.563842       6.474981
  878.008778       4.486738
  882.453714       1.905386
  886.898651       0.825353
  891.343587       2.470996
  895.788524       7.367927
  900.233460       6.913462
  904.678397       7.428470
  909.123333       9.801539
  913.568270       5.002294
  918.013206       1.987693
  922.458143       0.000000
  926.903079       0.053249
  931.348016       1.461231
  935.792952       2.753523
  940.237889       7.306238
  944.682825       7.260273
  949.127762       9.900199
  953.572698       5.903782
  958.017635       8.002327
  962.462571       6.793283
  966.907508       3.806612
  971.352444       7.346011
  975.797380       3.020589
  980.242317       0.620485
  984.687253       3.105109
  989.132190       3.275449
  993.577126       5.112484
  998.022063       6.355876
  1002.466999       8.477482
  1006.911936       11.317079
  1011.356872       9.483536
  1015.801809       9.301709
  1020.246745       6.083716
  1024.691682       4.811832
  1029.136618       2.327153
  1033.581555       2.652375
  1038.026491       4.957259
  1042.471428       6.074258
  1046.916364       9.903309
  1051.361301       17.747053
  1055.806237       15.956049
  1060.251173       16.452220
  1064.696110       15.013615
  1069.141046       10.226624
  1073.585983       9.827730
  1078.030919       6.392239
  1082.475856       4.415314
  1086.920792       6.395196
  1091.365729       4.803960
  1095.810665       5.679394
  1100.255602       5.506968
  1104.700538       5.008241
  1109.145475       4.964117
  1113.590411       3.002147
  1118.035348       0.768761
  1122.480284       0.373945
  1126.925221       0.929551
  1131.370157       1.316145
  1135.815094       3.106421
  1140.260030       2.666595
  1144.704966       2.927134
  1149.149903       3.521045
  1153.594839       4.675928
  1158.039776       5.859348
  1162.484712       8.292773
  1166.929649       6.134157
  1171.374585       10.964160
  1175.819522       8.413206
  1180.264458       9.876023
  1184.709395       12.041172
  1189.154331       9.851449
  1193.599268       9.589801
  1198.044204       8.527290
  1202.489141       12.727298
  1206.934077       7.111811
  1211.379014       5.732835
  1215.823950       8.850487
  1220.268887       3.749084
  1224.713823       2.848379
  1229.158759       3.327016
  1233.603696       3.173960
  1238.048632       3.835445
  1242.493569       7.054581
  1246.938505       5.476561
  1251.383442       7.206010
  1255.828378       12.018696
  1260.273315       7.975020
  1264.718251       10.191979
  1269.163188       6.289566
  1273.608124       7.221610
  1278.053061       7.028103
  1282.497997       5.029646
  1286.942934       8.179201
  1291.387870       9.648955
  1295.832807       4.881832
  1300.277743       7.650331
  1304.722680       8.812455
  1309.167616       10.706653
  1313.612553       8.696293
  1318.057489       5.543139
  1322.502425       9.934663
  1326.947362       10.971928
  1331.392298       10.557439
  1335.837235       13.850549
  1340.282171       17.113863
  1344.727108       16.137149
  1349.172044       14.910294
  1353.616981       16.635084
  1358.061917       15.280699
  1362.506854       16.880990
  1366.951790       18.852471
  1371.396727       17.435907
  1375.841663       12.678090
  1380.286600       19.017567
  1384.731536       18.966903
  1389.176473       13.723907
  1393.621409       28.602219
  1398.066346       28.349066
  1402.511282       28.651345
  1406.956218       31.267845
  1411.401155       29.202626
  1415.846091       29.524402
  1420.291028       41.009052
  1424.735964       54.473590
  1429.180901       61.314355
  1433.625837       70.464902
  1438.070774       67.275569
  1442.515710       87.263301
  1446.960647       114.938172
  1451.405583       142.565679
  1455.850520       117.648674
  1460.295456       148.263480
  1464.740393       176.039954
  1469.185329       202.562838
  1473.630266       230.912587
  1478.075202       252.301830
  1482.520139       261.143650
  1486.965075       281.957559
  1491.410011       327.125955
  1495.854948       368.911220
  1500.299884       339.021942
  1504.744821       362.258481
  1509.189757       421.968816
  1513.634694       427.180589
  1518.079630       427.108408
  1522.524567       414.636241
  1526.969503       425.861907
  1531.414440       437.151681
  1535.859376       427.317379
  1540.304313       404.253271
  1544.749249       406.391972
  1549.194186       405.785079
  1553.639122       381.920617
  1558.084059       375.522970
  1562.528995       371.571284
  1566.973932       369.565316
  1571.418868       346.814070
  1575.863804       326.293463
  1580.308741       365.060218
  1584.753677       291.574570
  1589.198614       303.604119
  1593.643550       288.578612
  1598.088487       275.147026
  1602.533423       263.715674
  1606.978360       253.612239
  1611.423296       235.910310
  1615.868233       215.097082
  1620.313169       199.597936
  1624.758106       184.732453
  1629.203042       165.985221
  1633.647979       146.369801
  1638.092915       118.239870
  1642.537852       83.775335
  1646.982788       24.999533
-------------- next part --------------
0.000000     901.947518
0.005025     935.169154
0.010050     742.071774
0.015075     729.117219
0.020101     797.973074
0.025126     723.785074
0.030151     822.387538
0.035176     767.597697
0.040201     794.530142
0.045226     709.099250
0.050251     471.001490
0.055276     4994.342134
0.060302     1816.014460
0.065327     1797.742743
0.070352     2628.580089
0.075377     704.127626
0.080402     787.523999
0.085427     601.017553
0.090452     840.972770
0.095477     1326.579011
0.100503     922.424358
0.105528     699.006037
0.110553     806.431574
0.115578     3366.449631
0.120603     1036.200023
0.125628     966.703092
0.130653     1021.438706
0.135678     1095.679816
0.140704     1078.223778
0.145729     2734.414926
0.150754     2971.087574
0.155779     2458.595729
0.160804     1718.372134
0.165829     10939.509811
0.170854     716.199151
0.175879     778.521635
0.180905     721.402613
0.185930     882.630001
0.190955     916.106908
0.195980     610.761119
0.201005     459.465571
0.206030     997.371651
0.211055     1397.216820
0.216080     1202.367409
0.221106     1192.891891
0.226131     2075.992799
0.231156     17.107531
0.236181     2089.931432
0.241206     5366.627973
0.246231     524.446560
0.251256     4806.897356
0.256281     1693.110547
0.261307     1294.542256
0.266332     580.606275
0.271357     756.501403
0.276382     1000.608885
0.281407     1158.675823
0.286432     1069.388993
0.291457     1031.328054
0.296482     1838.378443
0.301508     1898.557393
0.306533     2332.421532
0.311558     1706.364894
0.316583     3307.770764
0.321608     1665.099074
0.326633     258.567210
0.331658     12.081025
0.336683     383.647012
0.341709     619.081599
0.346734     638.184823
0.351759     233.687428
0.356784     1600.112097
0.361809     495.223449
0.366834     871.580120
0.371859     799.145385
0.376884     1082.861882
0.381910     1030.443538
0.386935     1168.121049
0.391960     1182.704753
0.396985     1689.915040
0.402010     2117.896684
0.407035     432.523570
0.412060     4878.889542
0.417085     6317.919838
0.422111     713.337267
0.427136     13231.795166
0.432161     1317.671930
0.437186     959.566866
0.442211     1331.481584
0.447236     950.489411
0.452261     1373.577163
0.457286     32575.736083
0.462312     2225.563966
0.467337     3697.273867
0.472362     1365.481589
0.477387     1188.250101
0.482412     1426.958929
0.487437     1424.812139
0.492462     5219.614498
0.497487     168.109705
0.502513     756.143528
0.507538     168.109705
0.512563     5219.614498
0.517588     1424.812139
0.522613     1426.958929
0.527638     1188.250101
0.532663     1365.481589
0.537688     3697.273867
0.542714     2225.563966
0.547739     32575.736083
0.552764     1373.577163
0.557789     950.489411
0.562814     1331.481584
0.567839     959.566866
0.572864     1317.671930
0.577889     13231.795166
0.582915     713.337267
0.587940     6317.919838
0.592965     4878.889542
0.597990     432.523570
0.603015     2117.896684
0.608040     1689.915040
0.613065     1182.704753
0.618090     1168.121049
0.623116     1030.443538
0.628141     1082.861882
0.633166     799.145385
0.638191     871.580120
0.643216     495.223449
0.648241     1600.112097
0.653266     233.687428
0.658291     638.184823
0.663317     619.081599
0.668342     383.647012
0.673367     12.081025
0.678392     258.567210
0.683417     1665.099074
0.688442     3307.770764
0.693467     1706.364894
0.698492     2332.421532
0.703518     1898.557393
0.708543     1838.378443
0.713568     1031.328054
0.718593     1069.388993
0.723618     1158.675823
0.728643     1000.608885
0.733668     756.501403
0.738693     580.606275
0.743719     1294.542256
0.748744     1693.110547
0.753769     4806.897356
0.758794     524.446560
0.763819     5366.627973
0.768844     2089.931432
0.773869     17.107531
0.778894     2075.992799
0.783920     1192.891891
0.788945     1202.367409
0.793970     1397.216820
0.798995     997.371651
0.804020     459.465571
0.809045     610.761119
0.814070     916.106908
0.819095     882.630001
0.824121     721.402613
0.829146     778.521635
0.834171     716.199151
0.839196     10939.509811
0.844221     1718.372134
0.849246     2458.595729
0.854271     2971.087574
0.859296     2734.414926
0.864322     1078.223778
0.869347     1095.679816
0.874372     1021.438706
0.879397     966.703092
0.884422     1036.200023
0.889447     3366.449631
0.894472     806.431574
0.899497     699.006037
0.904523     922.424358
0.909548     1326.579011
0.914573     840.972770
0.919598     601.017553
0.924623     787.523999
0.929648     704.127626
0.934673     2628.580089
0.939698     1797.742743
0.944724     1816.014460
0.949749     4994.342134
0.954774     471.001490
0.959799     709.099250
0.964824     794.530142
0.969849     767.597697
0.974874     822.387538
0.979899     723.785074
0.984925     797.973074
0.989950     729.117219
0.994975     742.071774
1.000000     935.169154
-------------- next part --------------
0.000000     762.440430
0.005025     766.885366
0.010050     771.330303
0.015075     775.775239
0.020101     0.000000
0.025126     784.665112
0.030151     789.110049
0.035176     793.554985
0.040201     797.999922
0.045226     802.444858
0.050251     806.889795
0.055276     811.334731
0.060302     815.779668
0.065327     820.224604
0.070352     824.669541
0.075377     829.114477
0.080402     833.559414
0.085427     838.004350
0.090452     842.449287
0.095477     846.894223
0.100503     851.339159
0.105528     855.784096
0.110553     860.229032
0.115578     864.673969
0.120603     869.118905
0.125628     873.563842
0.130653     878.008778
0.135678     882.453715
0.140704     886.898651
0.145729     891.343588
0.150754     895.788524
0.155779     900.233461
0.160804     904.678397
0.165829     909.123334
0.170854     913.568270
0.175879     918.013207
0.180905     -0.000000
0.185930     926.903079
0.190955     931.348016
0.195980     935.792952
0.201005     940.237889
0.206030     944.682825
0.211055     949.127762
0.216080     953.572698
0.221106     958.017635
0.226131     962.462571
0.231156     966.907508
0.236181     971.352444
0.241206     975.797381
0.246231     980.242317
0.251256     984.687254
0.256281     989.132190
0.261307     993.577127
0.266332     998.022063
0.271357     1002.467000
0.276382     1006.911936
0.281407     1011.356872
0.286432     1015.801809
0.291457     1020.246745
0.296482     1024.691682
0.301508     1029.136618
0.306533     1033.581555
0.311558     1038.026491
0.316583     1042.471428
0.321608     1046.916364
0.326633     1051.361301
0.331658     1055.806237
0.336683     1060.251174
0.341709     1064.696110
0.346734     1069.141047
0.351759     1073.585983
0.356784     1078.030920
0.361809     1082.475856
0.366834     1086.920792
0.371859     1091.365729
0.376884     1095.810665
0.381910     1100.255602
0.386935     1104.700538
0.391960     1109.145475
0.396985     1113.590411
0.402010     1118.035348
0.407035     1122.480284
0.412060     1126.925221
0.417085     1131.370157
0.422111     1135.815094
0.427136     1140.260030
0.432161     1144.704967
0.437186     1149.149903
0.442211     1153.594840
0.447236     1158.039776
0.452261     1162.484713
0.457286     1166.929649
0.462312     1171.374585
0.467337     1175.819522
0.472362     1180.264458
0.477387     1184.709395
0.482412     1189.154331
0.487437     1193.599268
0.492462     1198.044204
0.497487     1202.489141
0.502513     1206.934077
0.507538     1211.379014
0.512563     1215.823950
0.517588     1220.268887
0.522613     1224.713823
0.527638     1229.158760
0.532663     1233.603696
0.537688     1238.048633
0.542714     1242.493569
0.547739     1246.938505
0.552764     1251.383442
0.557789     1255.828378
0.562814     1260.273315
0.567839     1264.718251
0.572864     1269.163188
0.577889     1273.608124
0.582915     1278.053061
0.587940     1282.497997
0.592965     1286.942934
0.597990     1291.387870
0.603015     1295.832807
0.608040     1300.277743
0.613065     1304.722680
0.618090     1309.167616
0.623116     1313.612553
0.628141     1318.057489
0.633166     1322.502426
0.638191     1326.947362
0.643216     1331.392298
0.648241     1335.837235
0.653266     1340.282171
0.658291     1344.727108
0.663317     1349.172044
0.668342     1353.616981
0.673367     1358.061917
0.678392     1362.506854
0.683417     1366.951790
0.688442     1371.396727
0.693467     1375.841663
0.698492     1380.286600
0.703518     1384.731536
0.708543     1389.176473
0.713568     1393.621409
0.718593     1398.066346
0.723618     1402.511282
0.728643     1406.956218
0.733668     1411.401155
0.738693     1415.846091
0.743719     1420.291028
0.748744     1424.735964
0.753769     1429.180901
0.758794     1433.625837
0.763819     1438.070774
0.768844     1442.515710
0.773869     1446.960647
0.778894     1451.405583
0.783920     1455.850520
0.788945     1460.295456
0.793970     1464.740393
0.798995     1469.185329
0.804020     1473.630266
0.809045     1478.075202
0.814070     1482.520139
0.819095     1486.965075
0.824121     1491.410011
0.829146     1495.854948
0.834171     1500.299884
0.839196     1504.744821
0.844221     1509.189757
0.849246     1513.634694
0.854271     1518.079630
0.859296     1522.524567
0.864322     1526.969503
0.869347     1531.414440
0.874372     1535.859376
0.879397     1540.304313
0.884422     1544.749249
0.889447     1549.194186
0.894472     1553.639122
0.899497     1558.084059
0.904523     1562.528995
0.909548     1566.973931
0.914573     1571.418868
0.919598     1575.863804
0.924623     1580.308741
0.929648     1584.753677
0.934673     1589.198614
0.939698     1593.643550
0.944724     1598.088487
0.949749     1602.533423
0.954774     1606.978360
0.959799     1611.423296
0.964824     1615.868233
0.969849     1620.313169
0.974874     1624.758106
0.979899     1629.203042
0.984925     1633.647979
0.989950     1638.092915
0.994975     1642.537852
1.000000     1646.982788


More information about the MINC-development mailing list