Hoi Alessio, I presume that by now you also found that we have a memory leak: CPU time : 61308.65 sec. Max Memory : 873 MB Max Swap : 920 MB It seems to me that the messed up Ks indices occur only at the end of this particular job. is this true in all cases? If yes, then it's probably a memory problem. I guess we'll have to find the memory leak. It'll speed up the job significantly. BUT: I also think it would be very useful if you could prepare a set of chains containing not more than 10^6 -- 10^7 (???) events. It does not seem very useful to spend a day in the queue when we can merge histograms and trees in a much shorter time. Cheers, --U.