]> git.donarmstrong.com Git - mothur.git/blobdiff - aligncommand.cpp
added unix to ifdefs. minor changes while testing 1.24.0.
[mothur.git] / aligncommand.cpp
index f03a9017d4867f1d8634a0ef72a25f1590bf13b6..8215de301b646f4d4571944de85dddb40478e7e5 100644 (file)
@@ -422,7 +422,7 @@ int AlignCommand::execute(){
 #else
 
                        vector<unsigned long long> positions; 
-               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                        positions = m->divideFile(candidateFileNames[s], processors);
                        for (int i = 0; i < (positions.size()-1); i++) {        lines.push_back(new linePair(positions[i], positions[(i+1)]));  }
                #else
@@ -430,7 +430,8 @@ int AlignCommand::execute(){
                                lines.push_back(new linePair(0, 1000));
                        }else {
                                positions = m->setFilePosFasta(candidateFileNames[s], numFastaSeqs); 
-                               
+                               if (positions.size() < processors) { processors = positions.size(); }
+                
                                //figure out how many sequences you have to process
                                int numSeqsPerProcessor = numFastaSeqs / processors;
                                for (int i = 0; i < processors; i++) {
@@ -617,7 +618,7 @@ int AlignCommand::driver(linePair* filePos, string alignFName, string reportFNam
                        }
                        delete candidateSeq;
                        
-                       #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+                       #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                                unsigned long long pos = inFASTA.tellg();
                                if ((pos == -1) || (pos >= filePos->end)) { break; }
                        #else
@@ -826,7 +827,7 @@ int AlignCommand::createProcesses(string alignFileName, string reportFileName, s
        try {
                int num = 0;
                processIDS.resize(0);
-#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
+#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                int process = 1;
                
                //loop through and create all the processes you want