X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimeracheckcommand.cpp;h=ac092083a53944207b926a6bb9d725a2249b571a;hb=f663afa231c9bc1b5e18e0ea3bdd2b2ee784f5b2;hp=18554399e43220b596723a745142b49d2d8c123e;hpb=8c616f2509abd2fb9485a38607c1b439d243b85c;p=mothur.git diff --git a/chimeracheckcommand.cpp b/chimeracheckcommand.cpp index 1855439..ac09208 100644 --- a/chimeracheckcommand.cpp +++ b/chimeracheckcommand.cpp @@ -217,6 +217,7 @@ int ChimeraCheckCommand::execute(){ if (m->control_pressed) { delete chimera; return 0; } + if (outputDir == "") { outputDir = m->hasPath(fastaFileNames[i]); }//if user entered a file with a path then preserve it string outputFileName = outputDir + m->getRootName(m->getSimpleName(fastaFileNames[i])) + "chimeracheck.chimeras"; outputNames.push_back(outputFileName); @@ -269,8 +270,8 @@ int ChimeraCheckCommand::execute(){ //wait on chidren for(int j = 1; j < processors; j++) { - char buf[4]; - MPI_Recv(buf, 4, MPI_CHAR, j, tag, MPI_COMM_WORLD, &status); + char buf[5]; + MPI_Recv(buf, 5, MPI_CHAR, j, tag, MPI_COMM_WORLD, &status); } }else{ //you are a child process MPI_Recv(&numSeqs, 1, MPI_INT, 0, tag, MPI_COMM_WORLD, &status); @@ -288,9 +289,9 @@ int ChimeraCheckCommand::execute(){ if (m->control_pressed) { MPI_File_close(&inMPI); MPI_File_close(&outMPI); for (int j = 0; j < outputNames.size(); j++) { remove(outputNames[j].c_str()); } delete chimera; return 0; } //tell parent you are done. - char buf[4]; + char buf[5]; strcpy(buf, "done"); - MPI_Send(buf, 4, MPI_CHAR, 0, tag, MPI_COMM_WORLD); + MPI_Send(buf, 5, MPI_CHAR, 0, tag, MPI_COMM_WORLD); } //close files