subroutine update(a)
real, dimension(:,:) :: a
!HPF$ PROCESSORS P(2,2)
!HPF$ DISTRIBUTE *(BLOCK,BLOCK) onto *P :: a

integer n,m

n=size(a,dim=1)
m=size(a,dim=2)
forall(i=2:n-1,j=2:m-1) a(i,j)=0.25* (a(i-1,j)+a(i+1,j)+a(i,j-1)+a(i,j+1))
write(6,*) a(2,2)
return
end

