solve least squares with l2 locally, repartitioning data