I fixed that problem, there was a subtlety with the cudaCalloc function I had defined. Now I think there is a problem with the cellID array somewhere :-(