Commit 73200945 by Kirill Terekhov

Fix points distribution in k-means clustering partitioner

parent 6081b482
......@@ -1327,7 +1327,8 @@ namespace INMOST
{
for(int k = 0; k < (int) m->GetProcessorsNumber(); ++k)
total_global_points += npoints[k];
total_local_points = (int)ceil((double)total_global_points/(double)m->GetProcessorsNumber());
total_local_points = (int)floor((double)total_global_points/(double)m->GetProcessorsNumber());
std::cout << total_global_points << " " << total_local_points << " " << m->GetProcessorRank() << " " << total_global_points - (m->GetProcessorsNumber()-1)*total_local_points << std::endl;
std::vector<double> points_center_global(m->GetProcessorRank() == 0 ? total_global_points*3 : 1);
displs[0] = 0;
......
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