I need to run 3000 instances of kmeans and therefore would like to parllelize the code. However as soon as I'm starting to call kmeans from within a boost::thread group the results of kmeans look bad and are not random anymore. I guess inside a boost::threadGroup the random number generator just doesn't work anymore. Does anyone have a good suggestion how to solve this issue? Maybe there is even a better way to parralelize the execution of kmeans? Any help would be appreciated :)