INTEGER iG,jG,lG, l
lG= (jG-1)*nPx*length + (iG-1)*length + l
global(lG) = local(l)
global(lG) = temp(l)
local(l) = global(lG)
temp(l) = global(lG)