Parameterized partition_size

Hi Greg,
Hope that you will accept this modification.
Best,
-Razi