X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimeraslayercommand.cpp;h=e7dc92e5919d1f5f7078fd5a11171cbb39030861;hb=f3e0de2c55da5c524abb3b404f77cb84aa1ddd34;hp=41661da085060fcd66913f31764232dbbacce342;hpb=a935b75dd890da5ae7f09e5e6179f90ab2955348;p=mothur.git diff --git a/chimeraslayercommand.cpp b/chimeraslayercommand.cpp index 41661da..e7dc92e 100644 --- a/chimeraslayercommand.cpp +++ b/chimeraslayercommand.cpp @@ -868,8 +868,8 @@ int ChimeraSlayerCommand::MPIExecuteGroups(string outputFileName, string accnosF map >::iterator itFile; vector filenames; for(itFile = fileToPriority.begin(); itFile != fileToPriority.end(); itFile++) { filenames.push_back(itFile->first); } - - int numGroupsPerProcessor = filenames.size() / processors; + + int numGroupsPerProcessor = ceil(filenames.size() / (double) processors); int startIndex = pid * numGroupsPerProcessor; int endIndex = (pid+1) * numGroupsPerProcessor; if(pid == (processors - 1)){ endIndex = filenames.size(); }