]> git.donarmstrong.com Git - mothur.git/commitdiff
cluster.split command
authorwestcott <westcott>
Thu, 20 May 2010 15:28:20 +0000 (15:28 +0000)
committerwestcott <westcott>
Thu, 20 May 2010 15:28:20 +0000 (15:28 +0000)
clustersplitcommand.cpp

index 9545083f555383d5b48fa4f8e167a93ccd242558..1e4e42fa6f4e3e4a3eb4fab97bcf35472bfe5d67 100644 (file)
@@ -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; }