m->mothurOutEndLine(); m->mothurOutEndLine();
#else
m->mothurOutJustToLog("Linux version");
- >m->mothurOutEndLine(); m->mothurOutEndLine();
+ m->mothurOutEndLine(); m->mothurOutEndLine();
#endif
#else
#endif
//header
- m->mothurOut("mothur v.1.8");
+ m->mothurOut("mothur v.1.9");
m->mothurOutEndLine();
- m->mothurOut("Last updated: 2/02/2010");
+ m->mothurOut("Last updated: 4/16/2010");
m->mothurOutEndLine();
m->mothurOutEndLine();
m->mothurOut("by");
m->mothurOutEndLine();
#ifdef USE_MPI
- m->mothurOutJustToLog("Using MPI\n");
+ m->mothurOutJustToLog("Using MPI\tversion ");
+ int version, subversion;
+ MPI_Get_version(&version, &subversion);
+ m->mothurOutJustToLog(toString(version) + "." + toString(subversion) + "\n");
#endif
//srand(54321);
while(bail == 0) { bail = mothur->getInput(); }
+ //closes logfile so we can rename
+ m->closeLog();
+
string outputDir = mothur->getOutputDir();
- string newlogFileName = outputDir + logFileName;
-
- //need this because m->mothurOut makes the logfile, but doesn't know where to put it
- rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp
+ string tempLog = mothur->getLogFileName();
+ bool append = mothur->getAppend();
+
+ string newlogFileName;
+ if (tempLog != "") {
+ newlogFileName = outputDir + tempLog;
+
+ if (!append) {
+ //need this because m->mothurOut makes the logfile, but doesn't know where to put it
+ rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp
+
+ }else {
+ ofstream outNewLog;
+ openOutputFileAppend(newlogFileName, outNewLog);
+ outNewLog << endl << endl << "*********************************************************************************" << endl << endl;
+ outNewLog.close();
+
+ appendFiles(logFileName, newlogFileName);
+ remove(logFileName.c_str());
+ }
+ }else{
+ newlogFileName = outputDir + logFileName;
+ //need this because m->mothurOut makes the logfile, but doesn't know where to put it
+ rename(logFileName.c_str(), newlogFileName.c_str()); //logfile with timestamp
+ }
+
delete mothur;
#ifdef USE_MPI