From 5412970cac5fbb63312d4dd279851f0482787901 Mon Sep 17 00:00:00 2001 From: westcott Date: Thu, 20 May 2010 15:28:20 +0000 Subject: [PATCH] cluster.split command --- clustersplitcommand.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/clustersplitcommand.cpp b/clustersplitcommand.cpp index 9545083..1e4e42f 100644 --- a/clustersplitcommand.cpp +++ b/clustersplitcommand.cpp @@ -242,6 +242,12 @@ int ClusterSplitCommand::execute(){ dividedNames[(processToAssign-1)].push_back(distName[i]); } + //not lets reverse the order of ever other process, so we balance big files running with little ones + for (int i = 0; i < processors; i++) { + int remainder = ((i+1) % processors); + if (remainder) { reverse(dividedNames[i].begin(), dividedNames[i].end()); } + } + createProcesses(dividedNames); if (m->control_pressed) { return 0; } -- 2.39.2