X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=aligncommand.cpp;h=8215de301b646f4d4571944de85dddb40478e7e5;hb=36a6b02cf7f09d2bc34376b588944a9ca73429c5;hp=389235a034918aa556d95e40bd05d98e95cc49ed;hpb=e8c014de33edac1fb91d7593e143bf1f5107ffce;p=mothur.git diff --git a/aligncommand.cpp b/aligncommand.cpp index 389235a..8215de3 100644 --- a/aligncommand.cpp +++ b/aligncommand.cpp @@ -16,7 +16,7 @@ #include "aligncommand.h" #include "referencedb.h" -//test comm + //********************************************************************************************************************** vector AlignCommand::setParameters(){ try { @@ -422,7 +422,7 @@ int AlignCommand::execute(){ #else vector 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