diff --git a/HW10/MakePermutationMatrix.cpp b/HW10/MakePermutationMatrix.cpp index be27ff3..ef8d162 100644 --- a/HW10/MakePermutationMatrix.cpp +++ b/HW10/MakePermutationMatrix.cpp @@ -13,7 +13,7 @@ std::vector MakePermutationMatrix::MakePermutation(std::vector sou std::sort(source.begin(), source.end()); std::vector myPerm = source; std::vector nextPerm = source; - auto offset = myPerm.size()/size; + auto offset = (myPerm.size()+1)/size; //return vector should be the size of number of processors as they are going to only return their own smallest. if(rank)