use cudaGetLastError, while n >= 10^8 error occurs