Problem solved for 1-8 threads in 1 block. Now there is a problem with multiple block, i.e., with 9+ threads.