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++) {
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
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(); }