]> git.donarmstrong.com Git - mothur.git/blobdiff - screenseqscommand.cpp
bug fixes
[mothur.git] / screenseqscommand.cpp
index c3080d9ed8785e0b62ecb1e03f27583425beb5d9..581264cbe62b1ecc6b56a848476bdccff1d31545 100644 (file)
@@ -220,10 +220,10 @@ int ScreenSeqsCommand::execute(){
                                numSeqsPerProcessor = numFastaSeqs / processors;
                                int startIndex =  pid * numSeqsPerProcessor;
                                if(pid == (processors - 1)){    numSeqsPerProcessor = numFastaSeqs - pid * numSeqsPerProcessor;         }
-                       cout << pid << '\t' << numSeqsPerProcessor << '\t' <<   startIndex << endl;
+               //      cout << pid << '\t' << numSeqsPerProcessor << '\t' <<   startIndex << endl;
                                //align your part
                                driverMPI(startIndex, numSeqsPerProcessor, inMPI, outMPIGood, outMPIBadAccnos, MPIPos, badSeqNames);
-                       cout << pid << " done" << endl;
+               //cout << pid << " done" << endl;
                                if (m->control_pressed) { MPI_File_close(&inMPI);  MPI_File_close(&outMPIGood);  MPI_File_close(&outMPIBadAccnos);  return 0; }
 
                                for (int i = 1; i < processors; i++) {
@@ -253,10 +253,10 @@ int ScreenSeqsCommand::execute(){
                                numSeqsPerProcessor = numFastaSeqs / processors;
                                int startIndex =  pid * numSeqsPerProcessor;
                                if(pid == (processors - 1)){    numSeqsPerProcessor = numFastaSeqs - pid * numSeqsPerProcessor;         }
-               cout << pid << '\t' << numSeqsPerProcessor << '\t' <<   startIndex << endl;             
+               //cout << pid << '\t' << numSeqsPerProcessor << '\t' <<         startIndex << endl;             
                                //align your part
                                driverMPI(startIndex, numSeqsPerProcessor, inMPI, outMPIGood, outMPIBadAccnos, MPIPos, badSeqNames);
-cout << pid << " done" << endl;
+//cout << pid << " done" << endl;
                                if (m->control_pressed) { MPI_File_close(&inMPI);  MPI_File_close(&outMPIGood);  MPI_File_close(&outMPIBadAccnos); return 0; }
                                
                                //send bad list 
@@ -662,8 +662,12 @@ int ScreenSeqsCommand::driver(linePair* filePos, string goodFName, string badAcc
                        count++;
                        }
                        
-                       unsigned long int pos = inFASTA.tellg();
-                       if ((pos == -1) || (pos >= filePos->end)) { break; }
+                       #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+                               unsigned long int pos = inFASTA.tellg();
+                               if ((pos == -1) || (pos >= filePos->end)) { break; }
+                       #else
+                               if (inFASTA.eof()) { break; }
+                       #endif
                        
                        //report progress
                        if((count) % 100 == 0){ m->mothurOut("Processing sequence: " + toString(count)); m->mothurOutEndLine();         }