lookup->set(binNumber, abundance);
rank->set(abundance, rank->get(abundance)+1);
- if((i == 0) || (i+1) % increment == 0){
+ if((i == 0) || ((i+1) % increment == 0) || (ends.count(i+1) != 0)){
rcd->updateRankData(rank);
}
}
- if(numSeqs % increment != 0){
+ if((numSeqs % increment != 0) || (ends.count(numSeqs) != 0)){
rcd->updateRankData(rank);
}
//loop through and create all the processes you want
while (process != processors) {
- int pid = fork();
+ pid_t pid = fork();
if (pid > 0) {
processIDS.push_back(pid); //create map from line number to pid so you can append files in correct order later
//pass numSeqs to parent
for(int i=0;i<displays.size();i++){
- string tempFile = toString(getpid()) + toString(i) + ".rarefact.temp";
+ string tempFile = m->mothurGetpid(process) + toString(i) + ".rarefact.temp";
displays[i]->outputTempFiles(tempFile);
}
exit(0);