X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=distancecommand.cpp;h=19094e9e76ee76981b9d5bd501df3876d401b387;hp=73a38bfe023025be8b5533e20f72d28539a09cde;hb=1a20e24ee786195ab0e1cccd4f5aede7a88f3f4e;hpb=deba0af0ccdcb6005ed5b2b82649b137c63fbdf7 diff --git a/distancecommand.cpp b/distancecommand.cpp index 73a38bf..19094e9 100644 --- a/distancecommand.cpp +++ b/distancecommand.cpp @@ -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]; } @@ -809,7 +812,7 @@ int DistanceCommand::driverMPI(int startLine, int endLine, MPI_File& outMPI, flo } if(i % 100 == 0){ - //m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); + m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); cout << i << '\t' << (time(NULL) - startTime) << endl; } @@ -826,7 +829,7 @@ int DistanceCommand::driverMPI(int startLine, int endLine, MPI_File& outMPI, flo } - //m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); + m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); cout << (endLine-1) << '\t' << (time(NULL) - startTime) << endl; delete distCalculator; return 1; @@ -904,7 +907,7 @@ int DistanceCommand::driverMPI(int startLine, int endLine, string file, unsigned if(i % 100 == 0){ - //m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); + m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); cout << i << '\t' << (time(NULL) - startTime) << endl; } @@ -920,7 +923,7 @@ int DistanceCommand::driverMPI(int startLine, int endLine, string file, unsigned delete buf; } - //m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); + m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); cout << (endLine-1) << '\t' << (time(NULL) - startTime) << endl; MPI_File_close(&outMPI); delete distCalculator; @@ -999,7 +1002,7 @@ int DistanceCommand::driverMPI(int startLine, int endLine, string file, unsigned if(i % 100 == 0){ - //m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); + m->mothurOut(toString(i) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); cout << i << '\t' << (time(NULL) - startTime) << endl; } @@ -1015,7 +1018,7 @@ int DistanceCommand::driverMPI(int startLine, int endLine, string file, unsigned delete buf; } - //m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); + m->mothurOut(toString(endLine-1) + "\t" + toString(time(NULL) - startTime)); m->mothurOutEndLine(); cout << (endLine-1) << '\t' << (time(NULL) - startTime) << endl; MPI_File_close(&outMPI); delete distCalculator;