Commit 6081b482 by Kirill Terekhov

Fix for kmeans partitioner

parent 6318a6b6
......@@ -1265,8 +1265,10 @@ namespace INMOST
}
if( package == 3 ) //KMEANS
{
int total_points = 0;
int K = (int)m->GetProcessorsNumber(); //number of clusters
//std::cout << "Start K-means on " << m->GetProcessorRank() << " clusters " << K << std::endl;
int max_iterations = 100;
#if defined(USE_OMP)
#pragma omp parallel for reduction(+:total_points)
......@@ -1553,7 +1555,7 @@ namespace INMOST
#pragma omp parallel for
#endif
for(int j = 0; j < total_points; ++j)
mat[m->CellByLocalID(points_node[j])] = points_cluster[j]+1;
mat[m->CellByLocalID(points_node[j])] = points_cluster[j];
//m->ExchangeData(mat,CELL,0);
}
EXIT_FUNC();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment