This is part of my CUDA code. But last part of this code says some error message.
unsigned int *mat_count; off_t *mat_position; unsigned int *matches_count; off_
Compile your application with debug flags nvcc -G -g and try running your application inside cuda-memcheck or cuda-gdb. It might give you a hint where the problem might lie.
nvcc -G -g
cuda-memcheck
cuda-gdb
Just run
cuda-memcheck ./yourApp