trying to use recieve at rank==0 to write images once computation is complete