X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=clustersplitcommand.cpp;h=1e4e42fa6f4e3e4a3eb4fab97bcf35472bfe5d67;hb=5412970cac5fbb63312d4dd279851f0482787901;hp=9545083f555383d5b48fa4f8e167a93ccd242558;hpb=843884c927a9f910fbc2d8e3032903c313a7e2f4;p=mothur.git 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; }