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(1,i,j)=0.25* (a(2,i-1,j)+a(2,i+1,j)+ &
  a(2,i,j-1)+a(2,i,j+1))

!a=a+1 !to make IBM happy
write(6,*) a(1,2,2)
return
end
