global memory writing problem

i found the problem