]> git.donarmstrong.com Git - mothur.git/blobdiff - distancecommand.cpp
added checks to make sure windows processes completed their tasks.
[mothur.git] / distancecommand.cpp
index 16fcbf56247bb73bc979f50d4b06ee4ec20e1e7c..19094e9e76ee76981b9d5bd501df3876d401b387 100644 (file)
@@ -594,6 +594,9 @@ void DistanceCommand::createProcesses(string filename) {
                
                //Close all thread handles and free memory allocations.
                for(int i=0; i < pDataArray.size(); i++){
+            if (pDataArray[i]->count != (pDataArray[i]->endLine-pDataArray[i]->startLine)) {
+                m->mothurOut("[ERROR]: process " + toString(i) + " only processed " + toString(pDataArray[i]->count) + " of " + toString(pDataArray[i]->endLine-pDataArray[i]->startLine) + " sequences assigned to it, quitting. \n"); m->control_pressed = true; 
+            }
                        CloseHandle(hThreadArray[i]);
                        delete pDataArray[i];
                }