allocate r and r_prime MPIs before use