X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=pintail.cpp;h=b04efea9ba2c59b06dff4bf599d492dc2f9cd0e2;hb=002421a439168e2610a2b62f1318f21c7202fe6d;hp=c0ea90436628e8a86dbce69f894d8f3a353b7a27;hpb=1d7a10dc3dafd1606d6255bdb54e02429cbee47c;p=mothur.git diff --git a/pintail.cpp b/pintail.cpp index c0ea904..b04efea 100644 --- a/pintail.cpp +++ b/pintail.cpp @@ -249,8 +249,9 @@ int Pintail::doPrep() { } } //*************************************************************************************************************** -int Pintail::print(ostream& out, ostream& outAcc) { +Sequence* Pintail::print(ostream& out, ostream& outAcc) { try { + int index = ceil(deviation); //is your DE value higher than the 95% @@ -279,7 +280,7 @@ int Pintail::print(ostream& out, ostream& outAcc) { for (int m = 0; m < expectedDistance.size(); m++) { out << expectedDistance[m] << '\t'; } out << endl; - return 0; + return NULL; } catch(exception& e) { @@ -289,9 +290,9 @@ int Pintail::print(ostream& out, ostream& outAcc) { } #ifdef USE_MPI //*************************************************************************************************************** -int Pintail::print(MPI_File& out, MPI_File& outAcc) { +Sequence* Pintail::print(MPI_File& out, MPI_File& outAcc) { try { - bool results = false; + string outputString = ""; int index = ceil(deviation); @@ -319,7 +320,7 @@ int Pintail::print(MPI_File& out, MPI_File& outAcc) { MPI_File_write_shared(outAcc, buf, length, MPI_CHAR, &statusAcc); delete buf; - results = true; + return NULL; } outputString += "Observed\t"; @@ -339,7 +340,7 @@ int Pintail::print(MPI_File& out, MPI_File& outAcc) { MPI_File_write_shared(out, buf2, length, MPI_CHAR, &status); delete buf2; - return results; + return NULL; } catch(exception& e) { m->errorOut(e, "Pintail", "print"); @@ -560,7 +561,11 @@ void Pintail::createProcessesQuan() { out.close(); exit(0); - }else { m->mothurOut("unable to spawn the necessary processes."); m->mothurOutEndLine(); exit(0); } + }else { + m->mothurOut("[ERROR]: unable to spawn the necessary processes."); m->mothurOutEndLine(); + for (int i = 0; i < processIDS.size(); i++) { kill (processIDS[i], SIGINT); } + exit(0); + } } //parent does its part