From: westcott Date: Thu, 20 May 2010 15:28:20 +0000 (+0000) Subject: cluster.split command X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=5412970cac5fbb63312d4dd279851f0482787901 cluster.split command --- 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; }