X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=summarysharedcommand.cpp;h=d93fb6e775392b5436b6dadbb99c88761e862de8;hp=9893ea747a1a58799280b259c0950f47837b1af7;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=4b54ce99af7db8019ea907cd7c2edf789369ada9 diff --git a/summarysharedcommand.cpp b/summarysharedcommand.cpp index 9893ea7..d93fb6e 100644 --- a/summarysharedcommand.cpp +++ b/summarysharedcommand.cpp @@ -703,7 +703,7 @@ int SummarySharedCommand::process(vector thisLookup, string vector pDataArray; DWORD dwThreadIdArray[processors-1]; - HANDLE hThreadArray[processors-1]; + HANDLE hThreadArray[processors-1]; //Create processor worker threads. for( int i=1; i thisLookup, string temp->setGroup(thisLookup[k]->getGroup()); newLookup.push_back(temp); } + //for each bin for (int k = 0; k < thisLookup[0]->getNumBins(); k++) { @@ -742,6 +743,9 @@ int SummarySharedCommand::process(vector thisLookup, string //Close all thread handles and free memory allocations. for(int i=0; i < pDataArray.size(); i++){ + if (pDataArray[i]->count != (pDataArray[i]->end-pDataArray[i]->start)) { + m->mothurOut("[ERROR]: process " + toString(i) + " only processed " + toString(pDataArray[i]->count) + " of " + toString(pDataArray[i]->end-pDataArray[i]->start) + " groups assigned to it, quitting. \n"); m->control_pressed = true; + } m->appendFiles((sumFileName + toString(processIDS[i]) + ".temp"), sumFileName); m->mothurRemove((sumFileName + toString(processIDS[i]) + ".temp"));