adjust matrix size to be a multiple of comm_sz