program ex2
      implicit none
      real,allocatable :: z(:)[*]
      integer :: image
      allocate(z(3)[*])
      write(*,*) 'z allocated on image',this_image()
      if (this_image()==1) then
          z = 1.2
          do image = 2, num_images()
            z(:)[image] = z
         end do
      end if
      sync all
      write(*,*) 'z=',z,' on image',this_image()
end
      
