Synchronous kmeans.