## Bug #1705

### examples/charm++/kmeans occasionally loops forever, seen on uth-linux-x86_64

Start date:

10/05/2017

Due date:

% Done:

0%

**Description**

We've seen this failure a few times, but never debugged it. I've added some prints and after a dozen or so runs, got this:

Iteration 36937 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36938 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36939 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36940 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36941 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36942 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36943 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36944 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36945 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36946 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36947 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36948 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36949 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36950 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01 Iteration 36951 i 3, x'-x 5.794072e-01, y'-y 5.794072e-01

### History

#### #1 Updated by Phil Miller almost 2 years ago

Looks like a floating point associativity failure in the use of the `sum_double`

reduction:

(gdb) p means[3] $26 = {x = 0.57940721684981966, y = 0.37208395089429952} (gdb) p oldMeans[3] XX $27 = {x = 0.57940721684981955, y = 0.37208395089429952} ^^

#### #2 Updated by Phil Miller almost 2 years ago

**Status**changed from*New*to*Implemented*

#### #3 Updated by Phil Miller almost 2 years ago

**Target version**set to*6.8.1***Status**changed from*Implemented*to*Merged*