X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mothur.cpp;h=6631489a1f67fa5ba486108c0421d562a8953fa5;hb=17a6a53298a907c005fa93fb82af9e533adcda09;hp=a3eef76a2766d5ae69c824b0ee4cf4b5e3f14a51;hpb=99c986582ae659c205411639a8e9fa88fb680cd0;p=mothur.git diff --git a/mothur.cpp b/mothur.cpp index a3eef76..6631489 100644 --- a/mothur.cpp +++ b/mothur.cpp @@ -12,6 +12,7 @@ #include "globaldata.hpp" #include "mothurout.h" + /**************************************************************************************************/ GlobalData* GlobalData::_uniqueInstance = 0; @@ -99,7 +100,11 @@ int main(int argc, char *argv[]){ m->mothurOutEndLine(); m->mothurOut("Type 'quit()' to exit program"); m->mothurOutEndLine(); - + + #ifdef USE_MPI + m->mothurOutJustToLog("Using MPI\n"); + MPI_Init(&argc, &argv); + #endif //srand(54321); srand( (unsigned)time( NULL ) ); @@ -130,7 +135,7 @@ int main(int argc, char *argv[]){ mothur = new InteractEngine(argv[0]); } - while(bail == 0) { bail = mothur->getInput(); } + while(bail == 0) { bail = mothur->getInput(); } string outputDir = mothur->getOutputDir(); string newlogFileName = outputDir + logFileName; @@ -139,7 +144,11 @@ int main(int argc, char *argv[]){ rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp delete mothur; - + + #ifdef USE_MPI + MPI_Finalize(); + #endif + return 0; } catch(exception& e) {